Forum Discussion

AIbra11's avatar
AIbra11
Icon for New Contributor rankNew Contributor
6 years ago

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

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