Altera_Forum
Honored Contributor
14 years agoSimulating MegaFunction ROM -- wrong path initialization file
I created a ROM MegaFunction using the MegaWizard and loaded an initialization .hex file. The path stored in the .v is a relative path.
When simulating the design in ModelSim, I get the following error:# ** Warning: (vsim-3534) - Failed to open file "./sine_rom/RomSin15x14.hex" for reading.# No such file or directory. (errno = ENOENT) : C:/altera/11.0/modelsim_ae/win32aloem/../altera/verilog/src/altera_mf.v(792)# Time: 0 ps Iteration: 0 Instance: /sinegen_jig/sinegen_inst/RomSin_inst/altsyncram_component# ERROR: cannot read ./sine_rom/RomSin15x14.hex.# ** Warning: (vsim-7) Failed to open readmem file "./sine_rom/RomSin15x14.ver" in read mode.# No such file or directory. (errno = ENOENT) : C:/altera/11.0/modelsim_ae/win32aloem/../altera/verilog/src/altera_mf.v(44994)# Time: 0 ps Iteration: 0 Instance: /sinegen_jig/sinegen_inst/RomSin_inst/altsyncram_component
Issuing "pwd" shows that the simulation directory is such that the relative path "./sine_rom/RomSin15x14.hex" is incorrect. If the .hex file were in the same directory as the quartus project file, then the this supposed bug would be masked, since Quartus II creates a copy of the .hex file in the simulation directory. Any suggestions to get around this without setting an absolute path or manually recreating the directory structure in the simulation directory?