Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

How to include user vhdl defined package in ModelSim-Altera RTL Simulation?

AIbra11
Novice
4,067 Views

I can compile my design in Quartus Prime Lite Edition.

I can run the RTL Simulation using ModelSi -Altera well.

The problem happens when I included a package vhdl file as follows:

1- I created user_pkg.vhd file and placed it in Sources folder, the file has a package called: example_package

2- The Testbench file imports example package as follows:

library work;

use work.example_package.all;

3- Quartus compiles successfully

4- Then ModelSim RTL Simulation crashes at:

 

# ** Error: (vcom-11) Could not find work.example_package

# ** Error (suppressible): Cannot find expanded name "work.example_package".

Unknown expanded name.

 

 

 -------------------------

 

 

I solved it by manually adding:

vcom -93 -work work {C:/intelFPGA_lite/Projects/....../user_pkg.vhd}

to the run_msim_rtl_verilog.do file

 

how to do that automatically in Quartus so that I don't have to do it everytime I launch rtl_sim?

 

3 Replies
RichardTanSY_Altera
3,850 Views

Try adding the user_pkg.vhd file in your projects and see if it helps.

0 Kudos
AIbra11
Novice
3,850 Views

Thank you Richard, however it didn't help,

I actually solved it by adding :

vcom -93 -work work {C:/intelFPGA_lite/Projects/......./Sources/user_pkg.vhd}

to:

C:/intelFPGA_lite/Projects/......./simulation/modelsim/[project_name]_run_msim_rtl_verilog.do

to include it in the list of compiled files

 

The problem is I have to do this manually, I hope there was a way to configure it automatically from Quartus.

 

 

0 Kudos
RichardTanSY_Altera
3,850 Views
0 Kudos
Reply