FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5275 Discussions

How to Simulate a ROM initialized with a *.if File is Modelsim-Altera.

HKühn
Beginner
368 Views

Hello, I am using Quartus Prime Lite Edition to programm a MAX10 (10M08SAU169C8G). I wanted to add a ROM which is initialized with a .mif File. The design compiles and ROM works fine on the FPGA. I am also able to simulate the design.

Only problem: The ROM's output is not as excepted. Appearently only every sixteenth values is correct. All other output are 0x00.

 

Attached you find the rom and the testbench to recreate the problem.

0 Kudos
1 Reply
AnandRaj_S_Intel
Employee
154 Views

Hi Holger,

 

Your ROM design is not having a write-enable(wren) signal?

The test bench is not correct, You have to consider read and write latency.

 

After giving address waiting for at least 2 clock cycles for read or write from the memory.

 

For example, you can refer below project which can be run using do,do file or testbench.do file.

 

Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

 

 

Regards

Anand

MemInit1.JPG

Reply