Altera_Forum
Honored Contributor
13 years agoQuartus II and Modelsim directory paths for memory init files
I have created four memory instances using the Megawizard Plug-In Manager. The RTL files are named dpdspram.vhd, dsp_rom.vhd, dsp_rom1.vhd and ram_dsp.vhd. I have also defined initialization files for each:
dpdspram <= Zero1.hex dsp_rom <= coef.hex dsp_rom1 <= coef1.hex ram_dsp <= ram.hex All of the files (RTL and hex) are in the folder SAHW_FPGA/filter/hdl. When I created the memories in the Plug-In Manager, the tool wants to use the directory SAHW_FPGA as the base directory. This means that in the .vhd files, the component mapping pointed to ./filter/hdl/<hex file>. So for example in dsp_rom.vhd the component declaration uses: init_file => "./filter/hdl/coef.hex" Thus it appears that Quartus wants to use SAHW_FPGA as the root directory for the Plug-In Manager. In ModelSim I have created a library, called Filter_modelsim which is in the SAHW_FPGA folder. That library includes all of the memory RTL files as well as the RTL for the filter components which use these memories. When I simulate my system in ModelSim, I get the following error: Failed to open VHDL file "./filter/hdl/coef.hex" in rb mode. This happens for each of the hex files. The results of a pwd command in the ModelSim transcript window is: C:/Users/pbaltz/Documents/SAHW_FPGA/filter Thus it appears that Modelsim wants to use SAHW_FPGA/filter as the root directory. So the problem I'm having is that ModelSim and Quartus want to use different root directories, so that they can't both find the .hex files. How can I modify the Modelsim root directory to match the Quartus setting? Or is the another way to accomplish what I am trying to do? Thanks, -phil