___Hi, everyone. I have instantiated a PLL
using the Megawizard in Quartus II. Then I wanted to simulate it using ModelSim SE
because Quartus II 10.1 doesn't have a built-in simulator. I copied builtInPLL.vhd (output of the Megawizard) and PLL_tb.vhd (testbench) to the directory of the ModelSim project. But when I compiled builtInPLL.vhd, it gave out the following error messages:
Error: builtInPLL.vhd(39): Library altera_mf not found.
Error: builtInPLL.vhd(40): (vcom-1136) Unknown identifier "altera_mf".
relevant lines in builtInPLL.vhd:
LIBRARY altera_mf;
USE altera_mf.all;
I googled these messages but found nothing really helpful. I copied altera_mf.vhd from ..\eda\sim_lib
and compiled it with builtInPLL.vhd. Modelsim still gave me the messages above. And many files with suffix .dat
and .dbs
were created in the work directory. What are they?
Where is the library altera_mf
located? And how can I simulate a megafunction using ModelSim SE.
Any help will be appreciated.Thanks.
Standard ModelSim SE does not come with Altera library support, so you have to
install the Altera specific libraries like altera_mf
. There is an example
Tcl script for this at ModelSim Tcl Scripting
Examples under Library Setup Script (VHDL).
As an alternative you can consider using the ModelSim-Altera version, which
comes with pre-installed Altera libraries, like the altera_mf
. This ModelSim
version can be found at ModelSim-Altera
Software.
There is even a free version called "ModelSim-Altera Starter Edition".