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

altera_onchip_flash Modelsim simulation error

Altera_Forum
Honored Contributor II
1,753 Views

Hi, 

 

I'm trying to simulate the altera_onchip_flash for the MAX10 (10M25DA) FPGA by using the Altera-Modelsim. I cannot simulate the module because I get this eror: 

 

ERROR: ./e_OnChipFlash/synthesis/submodules/altera_onchip_flash.v(305): Instantiation of 'altera_onchip_flash_block' failed. The design unit was not found.  

 

Is there any way to solve this problem ? 

 

Thanks in advance 

 

Daniel
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
568 Views

Hi Daniel, 

I'm experiencing the same issue as well. It appears that Qsys delivers a file altera_onchip_flash_block.v in the following directory: /MAX10_FLASH/synthesis/submodules/rtl but it appears to be binary. If it was something that could be compiled, perhaps we could get past this issue. There doesn't appear to be a similar file in the /MAX10_FLASH/simulation sub-directory.
0 Kudos
Altera_Forum
Honored Contributor II
568 Views

Hi, 

 

I successed to solve this issue. When you run the Modelsim Simulation Tool from the Quartus software, it automatically creates a compile files *.do with all the modules available into your design. 

 

For the altera_on_chip_flash, Quartus points to the following files: 

 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/synthesis/submodules/altera_onchip_flash_util.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/synthesis/submodules/altera_onchip_flash.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/synthesis/submodules/altera_onchip_flash_avmm_data_controller.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/synthesis/submodules/altera_onchip_flash_avmm_csr_controller.v} 

 

In order to have the simulation working, you have to replace the synthesis folder with the simulation in the following way 

 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/simulation/submodules/altera_onchip_flash_util.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/simulation/submodules/altera_onchip_flash.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/simulation/submodules/altera_onchip_flash_avmm_data_controller.v} 

vlog -vlog01compat -work e_OnChipFlash +incdir+./qsys/e_OnChipFlash/synthesis/submodules{./qsys/e_OnChipFlash/simulation/submodules/altera_onchip_flash_avmm_csr_controller.v} 

 

 

Best Regards, 

Daniel
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

Hi, 

My problem occurred because I was not using Nativelink to generate the commands for Modelsim. I tried to create a *.do file by hand and probably missed some of the flags that Nativelink creates. Once I started using that, I had no issues and did not need to edit the *.do file created by Quartus to simulate my design.
0 Kudos
Reply