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

Error while simulating with ModelSim

Altera_Forum
Honored Contributor II
4,443 Views

Hello guys 

I'm still a very beginner in Quartus II and FPGA programming in general. 

 

I'm still trying to run the simple example of hello world available in the quartus folder using the altera manual here www.altera.com/literature/an/an351.pdf (http://www.altera.com/literature/an/an351.pdf) and after making all the steps (making the design with SOPC builder, adding the file in the Quartus II) i'm trying to simulate with ModelSim (having the "hello world" signal after it has been converted from C language to VHDL). 

 

I have the following errors 

 

 

--- Quote Start ---  

# ** Error: (vcom-11) Could not find ./vhdl_libs/altera.altera_europa_support_lib.# ** Error: C:/SAMY/SOPC_Test/onchip_memory2_0.vhd(19): (vcom-1195) Cannot find expanded name: 'altera.altera_europa_support_lib'.# ** Error: C:/SAMY/SOPC_Test/onchip_memory2_0.vhd(19): Unknown record element "altera_europa_support_lib". 

 

--- Quote End ---  

 

 

Then  

 

 

--- Quote Start ---  

# ** Error: C:/SAMY/SOPC_Test/onchip_memory2_0.vhd(32): VHDL Compiler exiting# ** Error: C:/Applications/Modeltech/win32/vcom failed. 

 

--- Quote End ---  

 

 

But as i searched in several posts, i things the last two errors are very commun and may just mean that the simulation was aborted. 

 

Any Ideas?! 

 

It's kinda urgent. Big thanks for your help !
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
2,098 Views

You need to compile the altera_europa_support_lib.vhd file found in the  

 

altera\quartus\libraries\vhdl\altera  

 

sub-directory. 

Hope this helps
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Yes in fact, I found the lib files that were missing.  

 

After i finish the IPs architecture with the SOPC builder, i succeded in generating and also in building the project with the Nios IDE but the weird fact is that the vhd files (that were generated) are not added to the quartus project and so i cannot simulate the results with ModelSim. 

 

Any ideas?! 

 

Thanks alot
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

In SOPC Builder on the System Generation page there is a button "Run Simulator". When you click this Modelsim should open with the correct project and run a script which creates some shortcuts - a description of these should appear in the transcript window. You should then be able to compile the VHDL and memory contents each with one command.

0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Thank you for your response. Thanks to your help i made big progress and i'll soon be able to help those who have the same problem i had (specially while trying to simulate the very simple "hello world" example, Altera AN 351). 

 

In fact now i'm able to add the IPs (with SOPC Builder), to generate the VHDL files, create and build the project with Nios IDE, and then running the simulation with modelsim by entering "s". Though i can't find the "hello world" phrase in the txd signal ( signal out of the UART according to documentation). 

 

The error seem to be in the UART since the uart rxd signal is Undefined (in red in modelsim) and txd value has always "1" so i suspect the program is not processed (simulated actually) or there's a communication problem (nios - uart) or even the architecture i've designed with SOPC is malfunctionning. I've used 3 IPs : the cpu nios, the onchi memory and the UART. 

 

Please any ideas? (this shoul be the final step ! ) 

 

thanks and read you soon
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Just one thought - how long are you running your simulation for? You may have to run it for a while to see something come out depending on your baud rate and what the NIOS code is doing.

0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Thank you, that was the problem. I was running the simulation for 200 us thinking the "hello world" shoul appear in the txd_data from the very beginning, i had the right signal after about 500us, very stupid !! 

Now i can help any who wants to simulate the example of the AN 351 altera example (hello world). 

 

For me, the next step is to simulate the hole architecture without the Nios IDE, using simulink and the files generated by the sopc builder (and so quartus)
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

No worries - I have been caught out by that before.

0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

by the way, anyone knows where i can find examples (other than those provided with the quartus,...) of architectures designed with the SOPC builder and simulated with modelsim (without using the Nios IDE) ?? 

 

thx
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

 

--- Quote Start ---  

 

The error seem to be in the UART since the uart rxd signal is Undefined (in red in modelsim) and txd value has always "1" so i suspect the program is not processed (simulated actually) or there's a communication problem (nios - uart) or even the architecture i've designed with SOPC is malfunctionning. I've used 3 IPs : the cpu nios, the onchi memory and the UART. 

 

--- Quote End ---  

 

 

I have the same problem. I was running the simulation for 800us and got an error: 

# 2281 ns: ERROR: cpu_test_bench/M_en is 'x' 

# Break in Module cpu_test_bench at ../cpu_test_bench.v line 572 

 

I use Quartus 9.1 and NiosII EDS 9.1. I don't connect a hardware board to my computer. 

 

Any ideas?
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

With 9.1 SP2 I get 

 

# Error: ????????? 

#  

# Unable to replace existing ini file (modelsim.ini). File can not be renamed. 

 

Does anyone else?
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

hi, 

I am getting error while simulating the quarus project which has instantiated RAMs and SOPC builder.I got the compiled result but struck up with simulating it. 

I got the following errors: 

Error: (vcom-11) Could not find altera.altera_europa_support_lib. 

Error: E:/niosprocessor1/nios.vhd(24): (vcom-1195) Cannot find expanded name "altera.altera_europa_support_lib". 

# ** Error: E:/niosprocessor1/nios.vhd(24): Unknown expanded name. 

 

I add the library altera.altera_europa_support_lib. to model sim and compiled it but am getting same errors. 

Pls help me to remove these errors.... 

thank you
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Hi,Guys 

i am a beginner in operating Quartus II and FPGA programming. 

ia m trying to run Hello world program.when i am runing the system in Nios 2 SBT i am getting the following error. can someone help me Plz....... 

 

 

# Unable to locate ModelSim executable file 'vsim.exe' at the given path: C:\altera\New folder\simulation\modelsim\vsim.exe
0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Just a guess... try to install Modelsim in a folder without a space in the name.

0 Kudos
Altera_Forum
Honored Contributor II
2,098 Views

Thankyou daixiwen. 

guru your advices just worked out correctly. 

now the program is running fine. 

i am also getting the output. 

can u suggest me some more examples through which i can learn more. 

once again Thankyou
0 Kudos
Reply