Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16613 Discussions

ModelSim MegaFunction ROM Simulation Problem

Altera_Forum
Honored Contributor II
2,255 Views

I have a design that I use Megafunction generated ROM. I am able to simulate the design in ModelSim until I add the Megafunction generated ROM .vhdl file into the project. At that point, when I start the simulation, the timer doesn't go past 0 ps and hangs. When I hit the break button, it takes about 2 minutes to break and it always breaks in the altera_mf.vhd file in an endless loop at about line 40274. 

 

I have narrowed this simulation not starting to the ROM megafunction. I can add all the other .vhd files and the simulation starts and gives me messages that there are files missing.  

 

Thanks, 

 

Glenn
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
777 Views

ModelSim hanging in an endless loop should be regarded as a bug, but happens sometimes, also to my experience. The point with ROM Megafunctions is, that ModelSim doesn't understand *.mif files for ROM initialisation (as far as I know) but needs *.hex files in ModelSim project base directory. A probably more simple way is to infer the ROM from HDL code (in VHDL, you can generate e. g. sine look-up tables from a few lines of code). This initialisation is understood by Quartus and ModelSim as well.

0 Kudos
Altera_Forum
Honored Contributor II
777 Views

Thanks for the help. You are 100% correct and now it is working. I would think that ModelSim-Altera would work like quartus and allow both .mif and .hex files.

0 Kudos
Reply