Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16612 Discussions

HOWTO: implement inferring ROM with registered output in m9k from HDL code?

Altera_Forum
Honored Contributor II
1,199 Views

Hi, 

In Quartus II web edition 9.1, I inserted a template: 

module rom_test_inf # (parameter DATA_WIDTH=8, parameter ADDR_WIDTH=10) ( input addr, input clk, output reg q ); // Declare the ROM variable reg rom; initial begin $readmemb("rom_init_file.txt", rom); end always @ (posedge clk) begin q <= rom; end endmodule  

the registers of output were NOT in m9k as I expected, but extra registers. 

as attachments. 

the last figure is what I want while it was implemented from megafunction. 

but how from HDL code? 

thanks
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
485 Views

Your apparently refering to RTL view. As far as I know, all Quartus internal ROM/RAM needs at least one register (either implemented as address or output register). Because the template uses only one register level, Quartus can't but implement the register in the RAM/ROM block, whatever the RTL view tells. So if the ROM is infered at all, everything should be O.K.

0 Kudos
Reply