Forum Discussion
Niv_Amsalem
New Contributor
3 years agoRom implementation on Quartus
Hi All,
i am working on a project with Stratix 10 Device.
i have tried to implement System Verilog Rom (not as IP) in my design.
the problem is that some ROM's Quartus translate correctly as a ...
hashkellfieldblocks
New Contributor
2 years agoThe input port mem clk should be input, not input mem.
The always block should use non-blocking assignment (<=) to assign values to mem_rd.
Here's the corrected module declaration:
verilog
Copy code
module rom_lp_M20K #(
parameter MEM_INIT = "", // Memory initialization file
parameter int unsigned MEM_DEPTH = 4,
parameter int unsigned ADDR_WIDTH = 2,
parameter int unsigned DATA_WIDTH = 64
)(
input clk,
input [ADDR_WIDTH-1:0] mem_addr,
input mem_cs,
output reg [DATA_WIDTH-1:0] mem_rd
);
And here's the corrected always block:
verilog
Copy code
always @ (posedge clk) begin
if (mem_cs) begin
mem_rd <= mem[mem_addr];
end
end
Greetings, if you dont mind would you follow up post research that have been at ChatGpt and contact at email [email protected]
https://chatgpt.com/share/a345ecbb-203f-4d63-8f9f-0cfeb86d098f?oai-dm=1
Thank you
The always block should use non-blocking assignment (<=) to assign values to mem_rd.
Here's the corrected module declaration:
verilog
Copy code
module rom_lp_M20K #(
parameter MEM_INIT = "", // Memory initialization file
parameter int unsigned MEM_DEPTH = 4,
parameter int unsigned ADDR_WIDTH = 2,
parameter int unsigned DATA_WIDTH = 64
)(
input clk,
input [ADDR_WIDTH-1:0] mem_addr,
input mem_cs,
output reg [DATA_WIDTH-1:0] mem_rd
);
And here's the corrected always block:
verilog
Copy code
always @ (posedge clk) begin
if (mem_cs) begin
mem_rd <= mem[mem_addr];
end
end
Greetings, if you dont mind would you follow up post research that have been at ChatGpt and contact at email [email protected]
https://chatgpt.com/share/a345ecbb-203f-4d63-8f9f-0cfeb86d098f?oai-dm=1
Thank you