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

How to Add Library Path for Modelsim Altera Starter Edition 10.3d Gate Level Simution

Altera_Forum
Honored Contributor II
8,153 Views

Hello, 

 

I'm having problem running gate level simulation using Modelsim Altera Starter Edition 10.3d due to missing design unit: 

 

# ** Error: (vsim-3033) PWM_Gen.vo(670): Instantiation of 'cycloneive_lcell_comb' failed. The design unit was not found.# # Region: /PWM_Gen# Searched libraries:# C:/Users/AsyrafToneExcel/Desktop/Verilog Codings/PWM_Generator_100kHz/QuartusII/simulation/modelsim/gate_work 

 

 

I've read some threads regarding this similar issue and found out that the command "vlog +incdir+<path>" can be used to add search directory. 

But after I use the command to add path, then a new Error occurred: 

 

 

ModelSim> vlog +incdir+C:\altera\15.0\quartus\eda\sim_lib# Model Technology ModelSim ALTERA vlog 10.3d Compiler 2014.10 Oct 7 2014# Start time: 11:50:26 on May 20,2015# vlog -reportprogress 300 "+incdir+C:ltera" .0quartusedasim_lib # ** Error: (vlog-7) Failed to open design unit file ".0quartusedasim_lib" in read mode. 

 

 

 

 

Did I mistype anything in that vlog command? 

 

Btw, I'm also using QuartusII 15.0 Web-Edition. 

 

Please help, thanks.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
5,831 Views

You need to add the 'cycloneive_atoms' library to your simulation. In the ModelSim console, or in your tcl script, add: vlib cycloneive_atoms vmap cycloneive_atoms ./cycloneive_atoms vlog -work ./cycloneive_atoms C:/altera/14.1/quartus/eda/sim_lib/cycloneive_atoms.v vsim -L cycloneive_atoms {your_top_level_test_bench} -t ns  

Substitute the location of your version of Quartus in place of "C:/altera/14.1" and the name of your test bench as appropriate. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
5,831 Views

 

--- Quote Start ---  

You need to add the 'cycloneive_atoms' library to your simulation. In the ModelSim console, or in your tcl script, add: vlib cycloneive_atoms vmap cycloneive_atoms ./cycloneive_atoms vlog -work ./cycloneive_atoms C:/altera/14.1/quartus/eda/sim_lib/cycloneive_atoms.v vsim -L cycloneive_atoms {your_top_level_test_bench} -t ns  

Substitute the location of your version of Quartus in place of "C:/altera/14.1" and the name of your test bench as appropriate. 

 

Cheers, 

Alex 

--- Quote End ---  

 

 

Thank you Alex. The "the design unit was not found" error has been solved. 

You help is much appreciated. 

 

However, I'm not really sure about the testbench file that you mentioned. 

Here is the screenshot of all the files in ..\QuartusII\simulation\modelsim folder (PWM_Gen is the name of the top module): 

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10686&stc=1  

 

Should I put the PWM_Gen.vo as the testbench file? 

Here is the screenshot of the do script: 

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10687&stc=1  

 

When I execute the do script, modelsim just open-up the PWM_Gen.vo file, without running simulations on it. 

 

Please help, I'm a newbie.
0 Kudos
Altera_Forum
Honored Contributor II
5,831 Views

Thanks Alex for your help. 

I've managed to run through without the "design unit was not found" error anymore :) 

 

However, I'm still not sure about which file to use as test-bench. 

Here's the do file that I've edited: 

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10695&stc=1  

 

And here's the screenshot of the list of files inside ..\QuartusII\simulation\modelsim folder: 

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10696&stc=1  

 

FYI, the top design unit name is PWM_Gen. 

 

Should I use the PWM_Gen.vo as testbench? 

Or should I use the testbench file that I've used for RTL description simulation? 

 

The reason I ask is that when I run the do file above, only the PWM_Gen.vo text file opened & no simulation is running. 

Did I miss some command lines in the do file to run the gate level simulation?
0 Kudos
Altera_Forum
Honored Contributor II
5,831 Views

Remove the curly brackets "{}" from around PWM_Gen.vo and add another line:run -all 

 

Whether 'PWM_Gen.vo' is the right file or not depends on whether there is any test stimulus in it. If it's just your top level design then no, it's not going to do much. 

 

Typically, I generate test stimulus in a separate 'PWM_Gen_tb.v' file in which the top level module is also instantiated. So, you'd end up passing 'PWM_Gen_tb.v' to the 'vsim' command. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
5,831 Views

Thanks again Alex. 

I'm starting to see the light on solving this issue. 

 

I've added the "run -all" command,  

here's the latest do file: 

 

https://www.alteraforum.com/forum/attachment.php?attachmentid=10743  

 

However, I've got the "No Design Loaded" error: 

 

https://www.alteraforum.com/forum/attachment.php?attachmentid=10744  

 

I thought the "vsim" command is to load the cycloneive_atoms & PWM_Gen design. 

 

Do I need to add anything else on the .do script so that the design is properly loaded? 

 

Sorry for the trouble.
0 Kudos
Altera_Forum
Honored Contributor II
5,831 Views

I had a similar problem in which I have been getting error# ** error: (vsim-3033) alstimschem.vo(825): instantiation of 'altera_pll_reconfig_tasks' failed. the design unit was not found. when I have run ModelSim-Altera Starter Edition. I wanted to share details of the problem and solution with the Forum.  

 

 

I am using schematic entry to create my schematic (.bdf file). I found that I could simulate the program with no problems when I used MegaWizard to create components LPM_MUX, LPM_MULT and LPM_ADD. But when I used MegaWizard to create ALTPLL, Altera_pll or ROM:1-PORT components, I would get the above error messagee for the PLLs when I simulate. If I disconnected the PLL's, simulation of the program with the ROM:1-Port would give# ** error: (vsim-3033) nofile(37): instantiation of 'generic_m10k' failed. the design unit was not found.  

 

I tried adding directories using Tools/Options/Libraries. I tried copying folders and files to folders that I knew the Quartus II and ModelSim was linking to. None of that worked. It is worth mentioning that I could download the program into my Cyclone V Starter Kit and everything would run as programmed. The only problem was with the simulation.  

 

 

 

the problem went away when i upgraded my quartus ii web edition from v13.1.0 to v15.0.0. (I did that upgrade a couple of weeks ago. But my compile times were going from 52 seconds to 1 min 11 seconds; therefore I switch back to V13.1.0. Looks like I'm stuck with the slower compile times if I want to simulate. And yes I have the Assignments/Settings/Compiler Settings configured for fastest compiling.)
0 Kudos
Reply