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

Simulating ROM( MegaWizard Plug-in manager)

Altera_Forum
Honored Contributor II
2,937 Views

Hi, 

 

I am trying to implement a system in VERILOG which uses ROM: 1-PORT from the MegaWizard Plug-in Manager. I want to simulate the system using Modelsim-Altera.  

 

I converted the .mif file to .hex file, and made changes in the megawizard created .v file to accept the .hex file as the memory initialization file.  

 

I ran a RTL-level simulation through Quartus- 7.2 ( web edition) to open the Modelsim window. I created a new project which uses the current modelsim.ini file. 

 

I compiled the altera_mf.v file and tried to simulate the top level.  

 

But it gives me errors like 

 

** warning: (vsim-3534) [fofir] - failed to open file "memory_init.hex" for reading. 

# no such file or directory. (errno = enoent) : c:/altera/72/quartus/eda/sim_lib/altera_mf.v(785) 

 

After reading on the altera website, I inserted the line 

 

Veriuser=\eda\mentor\modelsim\convet_hex2ver.dll in the current modelsim.ini file.  

 

But it again gives me an error like 

 

Unable to find \eda\mentor\modelsim\convet_hex2ver.dll 

 

Where am i going wrong? Can anyone list the steps for simulating the ROM correctly? 

 

Thanks.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,573 Views

I hadn't have correct results with modelsim altera and RTL simulations. 

 

Usually, i use the alltsyncram megafunction in ROM mode and a gate level simulation in modelsim altera 6.1g and quartus 7.2.
0 Kudos
Altera_Forum
Honored Contributor II
1,573 Views

Several years ago I encountered the same issue. I believe to remember that convert_hex2ver.dll was missing the the installation folder. I copied this file from an older version of modelsim into the current installation and that helped.

0 Kudos
Altera_Forum
Honored Contributor II
1,573 Views

I've encountered this problem hours before. I copy the Hex file to the folder where the projects file is, and clear the path information in .v file, like altsyncram_component.init_file = "line_kbyte_buff.hex" 

Then it can work. And the .ver files also generated after simulation. :D
0 Kudos
Altera_Forum
Honored Contributor II
1,573 Views

I have a different simulation problem that the Modelsim (I use the ModelTech Modelsim not the Altera Modelsim) did not complain at all but the ROM output (q) was always zeros. 

 

I found that the .hex file must be at the same directory as the ROM .v file while you create the ROM and while you use the ROM in simulation. 

 

After I did that, it worked! ;)
0 Kudos
Reply