Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,164 Views

How to simulate NCO using Modelsim

hello,  

 

i want to implement a pipeline ADC and I need to use a sine input, i just learned that i can use NCO to generate the waveform, 

 

when i compiled in quartus ii, there are errors like "Error (204009): Can't generate netlist output files because the license for encrypted file "***/nco-library/asj_nco_madx_cen.v" is not available", and someone told me i should compile and simulate directly in Modelsim. 

 

So i tried Modelsim and i have some questions on simulation: 

 

Altera guidebook suggests that i should add .vo file to the compile directory, and i compiled it with my top-level verilog file and testbench, but there are errors when simulating like "Error: (vsim-3033) Instantiation of 'altmult_add' failed. The design unit was not found.", i dont know how to deal with that. 

 

furthermore, do i need to specify the precompiled libraries?  

just as the page suggests(http://quartushelp.altera.com/15.0/mergedprojects/eda/simulation/modelsim/eda_pro_msim_func_sim.htm

 

thanks in advance~
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
173 Views

Yes, you will need to point ModelSim at some pre-compiled libraries. 

 

Refer to Altera's "modelsim tcl scripting examples (https://www.altera.com/support/support-resources/design-examples/design-software/tcl/tcl-modelsim.ht...)" for details on using the Altera libraries for simulation. The scripts encompass libraries for all devices - you can strip out what you don't need. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
173 Views

 

--- Quote Start ---  

Yes, you will need to point ModelSim at some pre-compiled libraries. 

 

Refer to Altera's "modelsim tcl scripting examples (https://www.altera.com/support/support-resources/design-examples/design-software/tcl/tcl-modelsim.ht...)" for details on using the Altera libraries for simulation. The scripts encompass libraries for all devices - you can strip out what you don't need. 

 

Cheers, 

Alex 

--- Quote End ---  

 

Thanks, Alex. I just used RAM IP to generate sinewave. But I don't really get it when I simulate in ModelSim why I need to add some libraries like eda/sim_lib/220model.v and eda/sim_lib/altera_mf.v to make my simulation work. How can I know which lib I need to add before simulation? 

 

Thanks in advance :)
Altera_Forum
Honored Contributor I
173 Views

Then you probably only need the altera_mf.v (Altera Mega Function) library. 

 

How do you know? The datasheet/documentation that comes with the IP or megafunction should identify which libraries are required. However, I'll admit to personally using a more iterative process - trial and error... 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
173 Views

 

--- Quote Start ---  

Then you probably only need the altera_mf.v (Altera Mega Function) library. 

 

How do you know? The datasheet/documentation that comes with the IP or megafunction should identify which libraries are required. However, I'll admit to personally using a more iterative process - trial and error... 

 

Cheers, 

Alex 

--- Quote End ---  

 

Thank you, Alex~
Reply