- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 RAM and some Not (i saw Register implementation).
my Syn flow it's like that:
Compile & Mapping - Synplify Premier 21.9
Place & Route - Quartus 21.2
can you please look at the code below and understand what is the issue?
Thanks
Niv.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking at a template in the text editor, there is no CS signal used. Also, why are you using a generate statement and a genvar that you are not using anywhere?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Have you tried to use any Quartus template for the ROM?
You may take a look a the template ROM insert template --> sv--> full design --> ram/rom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May I know if there is any update from previous reply?
As the snippet you posted is different from the Quartus template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i suspect that the Synplify Premier in the Mapping stage determine if it's implemented as Registers or not.
so it's under investigation.
i will update once i will have an answer.
Thanks
Niv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Niv,
Understood. Let me know if there is any other concern or update on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution, give Kudos and rate 10/10 survey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i have a question.
when i open Quartus IP of ROM i see that the address must be registered, why is that?
is that a mandatory demand for ROM?
Thanks
Niv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The keypoint is that block RAM hardware in all Intel FPGA families uses registered addresses. Read data can be optionally registered. Therefore HDL code that shall successfully infer block RAM must register address.
If you look at simple ROM HDL templates, the address register must not necessarily appear as such. If you register the ROM output, e.g. as in your code but without the read enable (cs) function, synthesis converts the data register into an address register.
The cs function in your code however blocks this possibility. You would need a second output register to make your code synthesizable in block RAM. That's due to properties of the FPGA hardware and has nothing to do with tool, e.g. Synplify limitations. Quartus software manual explains the requirements for RAM/ROM inference in detail, just study.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 codeblochness@gmail.com
https://chatgpt.com/share/a345ecbb-203f-4d63-8f9f-0cfeb86d098f?oai-dm=1
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
if this is and the previous late thread response are ChatGPT experiments, they clearly failed.
They miss to analyse the problem of the original post. The latest code is exactly reproducing the original problem and can't infer ROM, due to cs usage, as explained above.
The verbose ChatGPT answer "Register Address for QuartusROM" quoted above is at least partly misleading and doesn't help to solve the discussed problem. The key point is to understand what is required to infer memory from HDL code. Your code can be only mapped to FPGA hardware if it corresponds to the block RAM topology, need to understand which signals are unconditionally and which optionally registered.
I appreciate that you are not directly spamming the thread with ChatGPT answers.
Regards
Frank
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page