`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 read_en_o; always @(posedge clk) read_en_o <= read_en; reg[9:0] address_o; always @(posedge clk) address_o <= address; assign data = (ce && read_en_o) ? mem[address_o] : 32'b0; /* 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("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 read_en_o; always @(posedge clk) read_en_o <= read_en; reg[9:0] address_o; always @(posedge clk) address_o <= address; assign data = (ce && read_en_o) ? mem[address_o] : 32'b0; /* 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("auxmask.micdata", mem); // memory_list is memory file end endmodule