- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My custom library "cbgb" becomes unavailable in ModelSim as soon as I create a ModelSim project. This causes my project source code files to fail compilation because ModelSim cannot find the library I reference in the source code. All the files in the custom library compile w/o errors. The project compiles fine in Quartus and works in HW. The project compiles fine and simulates in another simulator. I start ModelSim from command line. Updating the library does nothing. Refreshing the library changes it from unavailable to empty.
modelsim_compile_errors_1.png shows the compilation errors
source_lib_declare_1.png shows the lines of code in question
modelsim_libs_before_project_1.png shows the libraries before creating a project
modelsim_libs_after_project_1.png shows the libraries after creating a project
ModelSim Intel FPGA Starter Edition 2020.1
Quartus Prime Version 20.1.0 Lite Edition
CentOS Stream release 8
Linux RedHat Enterprise kernel 5.9.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help, ShyanYewT_Intel. I got my ModelSim project to compile following your suggestions, though not exactly. The steps:
1. Started ModelSim from command line from my Linux installation directory (../modelsim_ase/linuxaloem).
2. Created new library "cbgb" and mapping to it.
3. Compiled files into "cbgb" from personal repository directory (../libraries/cbgb/..). "cbgb" appears in Library window with all its compiled files.
4. Created new project "pert" in personal project directory (../projects/../modelsim). Copied settings from (../modelsim_ase/linuxaloem/modelsim.ini) since there was no modelsim.ini in my project directory. This file is different from the read-only master modelsim.ini found in (../modelsim_ase). It got created sometime during the previous steps. "cbgb" library changes to empty "cbgb (unavailable)" in Library window.
5. Added files to project directory (../project/../modelsim/pert).
6. Edited "cbgb (unavailable)" library's Pathname to point to existing library (../modelsim_ase/linuxaloem/cbgb). "cbgb" library appears in Library window with all its compiled files.
7. Compiled my project.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't see any picture attached here.
Since you are using Quartus lite edition, I would suggest that you use the Nativelink feature that automatically help to compile your design, Altera IP, simulation model libraries, and testbench.
You may checkout the webpage below.
https://www.intel.com/content/www/us/en/programmable/documentation/aym1499789502823.html
If you would like to run without Nativelink, you could refer to the simulation flow here.
Hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did attach the 4 pictures to my original post, but they didn't show up. I couldn't find the Edit button for my original post either. So I'm attaching the pictures again, hoping they'll show up this time. If not, the ModelSim compilation errors are like:
../per_fsm.vhd : (vcom-1598) Library "cbgb" not found.
../per_fsm.vhd : (vcom-1136) Unknown identifier "cbgb".
Here are the relevant lines of code from per_fsm.vhd:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library cbgb;
use cbgb.i8b10b.all;
use cbgb.utils.all;
ModelSim cannot find my custom library "cbgb" since it appears as Unavailable as soon as I create a project. I had already successfully created the library "cbgb" and compiled all the files in it. The library and all its compiled files show up in the Library browser before I create a project, but then shows up as "cbgb (unavailable)" as soon as I create a project. I've followed the Intel and ModelSim simulation flows, tutorials, and examples, but they are not clear on how to work with multiple libraries. I need to use the "cbgb" library to compile the files inside my "work" library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you create a new project, when a window pop up, you will see a section calls "Copy Setting from".
By default, the Modelsim will direct to the modelsim.ini from the installation directory.
<install_dir>/modelsim_ae/modelsim.ini
Try to change it by browsing to the modelsim.ini in your project directory. See if the cbgb library still available.
If the above does not work, in your current project, you could try to add new library, mapping back to the existing cbgb library.
I hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help, ShyanYewT_Intel. I got my ModelSim project to compile following your suggestions, though not exactly. The steps:
1. Started ModelSim from command line from my Linux installation directory (../modelsim_ase/linuxaloem).
2. Created new library "cbgb" and mapping to it.
3. Compiled files into "cbgb" from personal repository directory (../libraries/cbgb/..). "cbgb" appears in Library window with all its compiled files.
4. Created new project "pert" in personal project directory (../projects/../modelsim). Copied settings from (../modelsim_ase/linuxaloem/modelsim.ini) since there was no modelsim.ini in my project directory. This file is different from the read-only master modelsim.ini found in (../modelsim_ase). It got created sometime during the previous steps. "cbgb" library changes to empty "cbgb (unavailable)" in Library window.
5. Added files to project directory (../project/../modelsim/pert).
6. Edited "cbgb (unavailable)" library's Pathname to point to existing library (../modelsim_ase/linuxaloem/cbgb). "cbgb" library appears in Library window with all its compiled files.
7. Compiled my project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am glad the issue has been resolved. I will now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page