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

Using LPM components in Megawizard

Altera_Forum
Honored Contributor II
2,902 Views

Hi, 

I am newbie to altera Megawizard and want to create a design using lpm_counter. I opened Megawizard and created lpm_counter as per the manual. It craetes files like counter.v, counter_inst.v and counter_bb.v. In file counter.v there is instatiation of lpm_counter. 

 

lpm_counter lpm_counter_component( 

 

) 

When i try to simulate counter.v in modelsim, then there is error  

 

design 'lpm_counter' is not found. 

 

From where i can found component 'lpm_counter' ? If i have to specify some library, then where it is located ? I cannot figure it out through manuals. 

 

 

Regards 

Pankaj
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
1,753 Views

I think you need to add Altera libraries to Modelsim

0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

On my Quartus v9.1 for Linux system it is in /opt/altera9.1/modelsim_ase/altera/verilog/220model

0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

They're right. you should add a basic file,like 220 model.

0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

I'm facing a similar kind of problem. I instantiated an altmf_addsub core produced through Megawizard in my design. When I try to simulate this design through Nativelink in Modelsim I get the error in modelsim: 

Module 'add_subfunc' is not defined.  

"add_subfunc" is the name I gave to the created core. I used Nativelink feature previously for single precision multiply and it worked flawlessly without any input from me in the modelsim. I'm guessing this has something to do with lpm simulation library, since at the last screen megawizard shows it as a requirement for simulation.
0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

 

--- Quote Start ---  

I'm facing a similar kind of problem. I instantiated an altmf_addsub core produced through Megawizard in my design. When I try to simulate this design through Nativelink in Modelsim I get the error in modelsim: 

Module 'add_subfunc' is not defined.  

"add_subfunc" is the name I gave to the created core. I used Nativelink feature previously for single precision multiply and it worked flawlessly without any input from me in the modelsim. I'm guessing this has something to do with lpm simulation library, since at the last screen megawizard shows it as a requirement for simulation. 

--- Quote End ---  

 

 

Hi Guy's, 

 

be aware that the LPM's will be no longer supported by Quartus. Quartus 9.1 is the last version which fully support the LPM's.  

 

Kind regards 

 

GPK
0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

Are you trying an RTL simulation or a Gate Level simulation? 

 

Sometimes the RTL does not work while the Gate Level works. 

 

Try this and let me know
0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

@pletz, 

Does this mean I can no longer use megafunctions in my design and simulate them. Surely not! :( 

 

@nplttr, 

I am trying RTL simulation. I'll try gate level simulation right now!
0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

Same error with gate level simulations as well. 

I tried to run Gate level simulation and it asked me to run Netlist writer first. 

So, I did a full compilation of the project and then tried to run Gate level, this time I was able to successfully launch Modelsim but got the same error as with RTL simulation as in my first post: 

 

Module 'add_subfunc' is not defined.  

 

What to do?
0 Kudos
Altera_Forum
Honored Contributor II
1,753 Views

 

--- Quote Start ---  

@pletz, 

Does this mean I can no longer use megafunctions in my design and simulate them. Surely not! :( 

 

@nplttr, 

I am trying RTL simulation. I'll try gate level simulation right now! 

--- Quote End ---  

 

 

Hi, 

 

we are only talking about the LPM function. With Quartus 10.0 they ar no longer available 

in the Megawizard. As long as you will not change the LPM you can run P&R. If you need to 

change same you have to go back to version 9.1.  

 

Here what you can found in the release notes of Quartus 10.0: 

 

The MegaWizard Plug-In Manager no longer supports the 

following megafunctions: ALT3PRAM, ALTACCUMULATE, 

ALTGXB, ALTSHIFT_TAPS, ALTSQRT, LPM_ABS, 

LPM_ADD_SUB, LPM_AND, LPM_COMPARE, LPM_CONSTANT, 

LPM_COUNTER, LPM_DECODE, LPM_DIVIDE, LPM_FF, 

LPM_FIFO+, LPM_INV, LPM_LATCH, LPM_MUX, LPM_OR, 

LPM_RAM_DP, LPM_RAM_DP+, LPM_RAM_DQ, LPM_ROM, 

LPM_SHIFTREG, and LPM_XOR. You can compile designs that 

include the above megafunctions in the Quartus II software 

version 10.0, but you cannot create new instances or edit 

existing variations of these megafunctions. 

 

 

Kind regards 

 

GPK
0 Kudos
Reply