Results 1 to 6 of 6

Thread: Megafunction library not found in ModelSim Altera

  1. #1
    Join Date
    Feb 2011
    Posts
    29
    Rep Power
    1

    Default Megafunction library not found in ModelSim Altera

    I'm trying to simulate a simple floating point calculation in ModelSim Altera 6.6c. I am using the ALTFP_DIV megafunction to do the calculation. When I compile my verilog files together with the altera_mf.v file and the testbench file in ModelSim, everything works fine.

    But when I start the simulation, it comes up with an error: 'Instantiation of 'lpm_add_sub' failed. The design unit was not found.' The same message applies to lpm_compare and lpm_mult too.

    I thought the altera_mf would take care of all those Altera specific libraries. Could someone please tell me where I am going wrong and help me get this simulation working?

    Thanks

  2. #2
    Join Date
    Oct 2008
    Posts
    3,523
    Rep Power
    1

    Default Re: Megafunction library not found in ModelSim Altera

    the lpm blocks are in the LPM library. you need to add the lpm library in modelsim:

    right click on the libraries window
    goto new -> library
    select map to existing library
    name : LPM
    find the 220model folder

  3. #3
    Join Date
    Feb 2011
    Posts
    29
    Rep Power
    1

    Thumbs up Re: Megafunction library not found in ModelSim Altera

    Thank you very much Tricky. I can simulate the lpm functions now.

  4. #4
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    1

    Unhappy Re: Megafunction library not found in ModelSim Altera

    Quote Originally Posted by Tricky View Post
    the lpm blocks are in the LPM library. you need to add the lpm library in modelsim:

    right click on the libraries window
    goto new -> library
    select map to existing library
    name : LPM
    find the 220model folder
    Hi Tricky,
    I am trying to implement the a 16 bit adder using LPMs as described in the Using_Library_Modules.pdf from the Altera website.
    I followed the exact steps the project compiled fine.
    but, when I try to simulate it, I get the same error 'Instantiation of 'lpm_add_sub' failed. The design unit was not found.'

    Tried to use the solution you gave in the earlier post, but, still not getting it to work.
    screenshot after mapping the library is attached for your reference.

    Please suggest.

    ------------------------------------
    Later I was able to resolve this issue by including the 220model directory under the library tab after selecting 'Start Simulation' from the menu.
    But, now i am getting another error 'Unresolved defparam reference to 'lpm_add_sub_component' in lpm_add_sub_component.lpm_direction'

    Please suggest a solution.

    Screenshot for the same is also attached.
    Attached Images Attached Images
    Last edited by hartejpal; October 14th, 2012 at 10:43 PM.

  5. #5
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    1

    Default Re: Megafunction library not found in ModelSim Altera

    hi all,

    it has been a year since hartejpal's last post, so i presumme that this problem of his has long gone. but right now i'm facing this problem. i've performed the suggestions given in this thread, i.e.:

    1. created new libraries, mapped to existing libraries 220model, altera, altera_mf
    2. clicked the simulate button, under the Design tab i chose the design file i wanted to simulate and under the Libraries tab i added the new libraries i have created earlier

    still i am getting the vsim 3033 error.."Instantiation of 'LPM_RAM_DQ' failed. The design unit was not found."

    i am using modelsim altera starter edition..what are other solutions that i can try..pls help, thanx..

  6. #6
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    1

    Default Re: Megafunction library not found in ModelSim Altera

    i've solved this vsim 3033 error by copying the 220model.v found in C:\altera\13.0sp1\quartus\eda\sim_lib into my modelsim working directory (for e.g. resource_library as in the Modelsim Tutorial pdf file - chapter 5 working with multiple libraries).

    besides the parts_lib folder, i also created lpm_lib (optional and arbitrary name ) folder under the same resource_library folder to segregate my custom modules and altera lpm modules.

    i then compiled the 220model.v in the resource_library directory into the lpm_lib library. it should be clearer if you refer to the tutorial pdf file page 39.

    maybe it's not the proper method but it works for me.

Similar Threads

  1. Library lpm not found
    By Ben007 in forum Quartus II and EDA Tools Discussion
    Replies: 10
    Last Post: April 19th, 2012, 04:36 AM
  2. Altera library missing- Modelsim
    By dilipvajravelu in forum Quartus II and EDA Tools Discussion
    Replies: 3
    Last Post: July 12th, 2011, 09:18 AM
  3. Replies: 2
    Last Post: March 12th, 2010, 09:41 AM
  4. ModelSim Altera and megafunction
    By PM998 in forum Quartus II and EDA Tools Discussion
    Replies: 4
    Last Post: October 14th, 2008, 08:56 PM
  5. How to Simulate ROM Megafunction in Altera-Modelsim
    By srinathtummalapalli in forum General Altera Discussion
    Replies: 3
    Last Post: September 4th, 2008, 06:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •