Altera_Forum
Honored Contributor
15 years agoHOWTO: implement inferring ROM with registered output in m9k from HDL code?
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