FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
6269 Discussions

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

HKühn
Beginner
808 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
594 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

0 Kudos
Reply