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

Megafunctions in ModelSim

Altera_Forum
Honored Contributor II
1,407 Views

Hello 

I making sort of test here: I made adder using Quartus megafunction LPM_ADD_SUB and I want to simulate in ModelSim-Altera. 

 

The adder has only dataA/B inputs and RESULT output.  

 

The ModelSim project contains the adder verilog file from the megafunction wizard and lpm_add_sum.v. 

 

For defining the inputs using modelsim console with the following: 

 

force dataa 01111000 0 

force datab 01111100 0 

run 6000000 

 

The result is Z... :eek: :confused: :(  

WHY?? 

 

When I add clock/clocken/reset to the adder the result is the same. 

 

I think i have all the libraries included. 

Or i cant simulate megafunctions with ModelSim??
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
352 Views

Of course you can simulate designs containing Megafunctions, but you may have to reference libraries. With Verilog, this seems always somewhat more complicated to me, but it should work anyway. The important point is: You get a clear warning when ModelSim fails to instantiate a modul referenced in your design, but by default, it won't stop simulation on this error. (You can change the default behaviour e.g. in ModelSim.ini).

0 Kudos
Altera_Forum
Honored Contributor II
352 Views

could you please elaborate on how to reference libraries? or may be point to a link which does so? 

thnx...
0 Kudos
Altera_Forum
Honored Contributor II
352 Views

Can you share the vlog + vsim commands that you have run ? 220model.v is required to the compiled or referenced from work directory while simulating LPM modules.

0 Kudos
Altera_Forum
Honored Contributor II
352 Views

please help me, i synthesis exponential and logarithm in quartuos, but modelsim dont answer.

0 Kudos
Reply