`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date:    22:26:53 12/18/2007 
// Design Name: 
// Module Name:    microstore 
// Project Name: 
// Target Devices: 
// Tool versions: 
// Description: 
//
// Dependencies: 
//
// Revision: 
// Revision 0.01 - File Created
// Additional Comments: 
//
//////////////////////////////////////////////////////////////////////////////////



//-----------------------------------------------------
// Design Name : rom_using_file
// File Name   : rom_using_file.v
// Function    : ROM using readmemh
// Coder       : Deepak Kumar Tala & JB
//-----------------------------------------------------

module micro_store (
address,
data,
read_en, // Read Enable 
ce,        // Chip Enable
clk);

input[9:0] address;
output[31:0] data; 
input read_en; 
input ce;

input clk; 


reg[31:0] mem[0:1024];

	
reg[31:0] data_out;

assign data = data_out;

always @(posedge clk)
	begin
		if (ce & read_en)
		 data_out = mem[address];
		else
		 data_out = 32'bz;
	end


/*
RAMB16_S36 gldata_rama (  .DO ( data ),
									.DOP ( gl_dopa0 ),
									.ADDR ( address[8:0] ),
									.CLK ( clk ),
									.DI ( gl_dia0 ),
									.DIP ( gl_dipa ),
									.EN ( ce ),
									.SSR ( 1'b0 ),
									.WE ( 1'b0 ));



`include "C:\\Dokumente und Einstellungen\\Jürgen Böhm\\Eigene Dateien\\lisp\\micasm\\mainmask.defparam"


*/

initial begin
  $readmemb("../lisp/micasm/mainmask.micdata", mem); // memory_list is memory file
end


endmodule

module micro_store_1 (
address,
data,
read_en, // Read Enable 
ce,        // Chip Enable
clk);

input[9:0] address;
output[31:0] data; 
input read_en; 
input ce; 

input clk;



reg[31:0] mem[0:1024] ;  

reg[31:0] data_out;

assign data = data_out;

always @(posedge clk)
	begin
		if (ce & read_en)
		 data_out = mem[address];
		else
		 data_out = 32'b0;
	end


/*

RAMB16_S36 gldata_ramb (  .DO ( data ),
									.DOP ( gl_dopa0 ),
									.ADDR ( address[8:0] ),
									.CLK ( clk ),
									.DI ( gl_dia0 ),
									.DIP ( gl_dipa ),
									.EN ( ce ),
									.SSR ( 1'b0 ),
									.WE ( 1'b0 ));


`include "C:\\Dokumente und Einstellungen\\J??rgen B??hm\\Eigene Dateien\\lisp\\micasm\\auxmask.defparam"




*/


initial begin
  $readmemb("../lisp/micasm/auxmask.micdata", mem); // memory_list is memory file
end


endmodule








