Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

ModelSim MegaFunction ROM Simulation Problem

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

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.