How to process mif file in modelsim
It's well-kown that the .mif file is the a file of Altera FPGA tools used to initiate the memory such as ROM,RAM and so on. Howerver,when you want to simulate the design in modelsim, how to process the mif file, what should you do?
Solution 1:
The ModelSim tool does not support the memory initialization file (.mif) format and requires you to generate a .hex file as specified in 1430.html. Once you have the initial memory contents specified in the .hex format, please note the following:
If you are simulating in a VHDL environment, the ModelSim tool will automatically reference the .hex file you have created and no additional steps are required.
If you are simulating in a Verilog environment, the ModelSim tool requires an additional .dll file that is included with the qu(at)rtus II software. To use this .dll file, please take the following steps:
Open the modelsim.ini file (Make sure to open the copy that the ModelSim tool is currently using. If you have a modelsim.ini in your project directory, that file will be used.)
Search for the following lines:
; List of dynamically loaded objects for Verilog PLI applications
; Veriuser = veriuser.sl
Remove the semicolon (

Veriuser = \eda\mentor\modelsim\convert_hex2ver.dll
Save the changes, close the. INI file and re-start the ModelSim tool.
Note: if you are unable to save the changes, please make sure to change the permissions on the modelsim.ini file from the Properties menu.
Solution 2:
1)To turn a .mif into .hex just open the .mif in qu(at)rtus II, then save the file as a .hex and qu(at)rtus II will do the conversion.
2)modify the file.v that is generated by megaward , and then, in the file replace the .mif into the .hex.
Labels: Modelsim
1 Comments:
i cant seem to run message shows me this after following your steps. Memory address read on line 513 of file "romy.ver" is out of bounds specified for readmem command. (Current address [256], address range [0:255]) : C:/altera/11.0/modelsim_ae/altera/verilog/src/altera_mf.v(44994)
Post a Comment
Subscribe to Post Comments [Atom]
<< Home