Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Simulating a design with Altera PLL in modelsim

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Hello,

I'm trying to simulate a design that uses an ALTPLL (Altera PLL).
This is the entity that uses the "altpll" component.

Code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;

LIBRARY altera_mf;
USE altera_mf.all;

ENTITY new_pll IS
PORT
(
areset : 	IN STD_LOGIC  := '0';
inclk0 : 	IN STD_LOGIC  := '0';
c0 :		OUT STD_LOGIC ;
locked :	OUT STD_LOGIC 
);
END new_pll;

When I compile the design in modelsim design I get the following errors:
# ** Error: C:/new_pll.vhd(42): Library altera_mf not found.
# ** Error: C:/new_pll.vhd(43): near "altera_mf": syntax error

I compiled
"altera_mf.vhd" and "altera_mf_components.vhd" prior that...yet the error does't go away.

What am I doing wrong?
 

You need to add the Altera libraries to modelsim
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
did you compile the files into the altera_mf library?
 

You need to add the Altera libraries to modelsim

How ?
Isn't just compiling the VHD files of the required libraries enough?
 

You have to add the library to modelsim's search path.

look in the ini or mpf file to find the library mapping for the ieee libraries and add the altera_mf library path in the same fashion.

There is a "how-to" in Altara's documentation on setting up the libraries for simulation in Modelsim.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
TrickyDicky,
did you compile the files into the altera_mf library?
What do you mean by: "into"?
I just compiled them and tried to compile my design file immediately afterwards. It fails.
 

Vcom -work altera_mf ....
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Vcom -work altera_mf ....
I'm not very familiar with the command line interface of Modelsim.
I use the GUI most of the time.

What exactly does the above command do?
How can I do the same with the GUI ?
 

That's why I suggested adding the libraries in the .mpf or .ini file that Modelsim uses.
If you add the libraries there, then you won't have to use the command line (I run simulations from a script, so for me command line is the norm)

They are simple map commands that tell where to find the location of altera_mf and the other libraries.

I normally just edit the .mpf text file directly, but you can add the changes in via:
http://quartushelp.altera.com/13.1/...mulation/modelsim/eda_pro_msim_setup_proj.htm
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top