Different Ways To Design ROM Verilog HDL
ROM is an acronym for Read-Only Memory. It refers to computer memory chips containing permanent or semi-permanent data. ROM is non-volatile; even after you turn off your computer, the contents of ROM will remain. You may see In any ASIC and FPGA designs. Combinational Block module ROM_code(data, addr, Enable); parameter width=16; output reg [width-1:0] data; input[3:0] addr; input Enable; reg [width-1:0] ROM[width-1:0]; always @(Enable) begin ROM[0] =16'h2000; ROM[1] =16'h2001; ROM[2] =16'h2002; ROM[3] =16'h2003; ROM[4] =16'h2004;; ROM[5] =16'h2051; ROM[6] =16'h2301; ROM[7] =16'h2061; ROM[8] =16'h9001; ROM[9] =16'h2201; ROM[10]=16'h1001; ROM[11]=16'h2101; ROM[12]=16'h2901; ROM[13]=16'h2050; ROM[14]=16'h2301; ROM[15]=16'h2071; Data=ROM[addr]; end endmodule Sequential Logic module ROM_code(data, addr, clk); parameter width=16; output reg [width-1:0] data; input[3:0] addr; input clk; reg [width-1:0] ROM[width-1:0]; a...
Comments
Post a Comment