Altera_Forum
Honored Contributor
16 years agoInferring ROM module
Hello everyone, I am currently designing 8-bit resolution Sinusoidal Wave Generator. I chose the look-up table method which needs a ROM module (256x8bit). I am using verilog coding and synthesize using Quartus II 9.1 on cyclone II device family. Here is my sub-module for the look-up table :
module LUT256 (
ADDR, // Address input
DataOut, // Data output
RE, // Read Enable
CE // Chip Enable
) /* synthesis romstyle = "M4K" */;
input ADDR;
output DataOut;
input RE,CE;
(* romstyle = "M4K" *) reg mem ;
wire DataOut;
assign DataOut = (CE && RE) ? mem : 8'b0;
initial begin
$readmemb("sine_value.list", mem); // sine_value is pre-calcualted value
end
endmodule The problem is, when I view the Technology Map Viewer (post mapping), the sub-module doesn't synthesize into ROM but instead into logic cells. RTL Viewer shows that the sub-module synthesized into memory module though. I also changed the appropriate settings in Quartus II analysis&synthesis settings for ROM/RAM to infer ROM/RAM module. Can someone please explain how to fix this problem. Thank you in advance.