- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi...
I have written a project which require a look up table which is stored in ROM i have created a .mif file to intialise the data in ROM I am using Modelsim for simulation. in the project folder i have project files, testbech and .mif file... when i run the project it is not getting data from mif file.............what could be the problem please suggest. ThanksLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make the the megafunction file points to the correct path of the file. It doesn't matter if the mif file is in the project folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is common problem when having mif file relative path determined from Quartus level (in megawizard) then moving to ModelSim the path may become wrong from ModelSim relative level.
The remedy is to make the path same from either Quartus or ModelSim folder i.e. put the mif at same level as both folders.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you launch your simulation with a tcl script, you could also insert lines to copy the mif file from your quartus directory to the modelsim project one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- It is common problem when having mif file relative path determined from Quartus level (in megawizard) then moving to ModelSim the path may become wrong from ModelSim relative level. The remedy is to make the path same from either Quartus or ModelSim folder i.e. put the mif at same level as both folders. --- Quote End --- they are in the same folder. mif file is not getting compiled .please tell me how to put mif file in the work directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I meant same level (not same folder) i.e. your structure like this:
- quartus (folder - ModelSim(folder) - files(folder) then put mif in files folde1. so that way the path in Megawizard becomes: ../files/name.mif which is correct from modelsim as well. You may also just copy mif inside modelsim folder- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a TCL code example to copy all .hex and .mif files from a quartus directory to a modelsim one (workdir) :
set workdir $yourmodelsimdirectory
set memoryfilesdir $yourmemoryfilesdirectory foreach datadir [list "$workdir"] { foreach datatype [list "hex" "mif"] { foreach g [glob -nocomplain "$yourmemoryfilesdir*.$datatype"] { file copy -force $g . } } } You just have to adjust the paths set in bold to your directory structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An alternate method is to use the copy command with a double "\\". Specific example Below:
copy ..\\..\\..\\vivado\\14_5\\LM_Cases\\5_params\\Optimized1\\impl\\verilog\\*.dat- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page