- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
In Quartus Prime, how can I define the compilation library each VHDL file? For example, I'd like the file top.vhd file will be compiled into 'work' library and all the *_pkg.vhd files will be compiled into 'pkgs' lib, etc. How can I do so? Thank you!Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why would you put all the packages in their own library? packages should be in appropriate libraries.
To set the library in the gui, in the file list in assignments-> settings, click properties and change the file's library there. Otherwise, in the .qsf: set_global_assignment -name VHDL_FILE <myfile> -library <mylib>- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- why would you put all the packages in their own library? packages should be in appropriate libraries. --- Quote End --- if I want to use the 'context' in the libraries clause, I must compile the context's related packages in a separate library (not to 'work' lib). Example:
library pkgs;
context pkgs.all_func;
...
contect all_func is
library pkgs;
use f1_pkg.all;
use f2_pkg.all;
...
end context;
--- Quote Start --- packages should be in appropriate libraries --- Quote End --- What do you mean "appropriate libraries"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A context can contain multiple libraries and multiple use clauses. No need to have all of the packages in a single library. A context also exists within a library.
eg:
context my_ctx is
library lib1;
use lib1.pkg1.all;
library lib2;
use lib2.lib2pkg.all;
end context my_ctx;
....
library some_othter_lib;
context some_other_lib.my_ctx;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW, does Quartus Prime supports the context statement?
I'm receiving the following error:Error (10500): VHDL syntax error at t_all.vhd(6) near text "context"; expecting "entity", or "architecture", or "use", or "library", or "package", or "configuration"
for the following file contents (this file is defined as VHDL-2008 file in the Project Settings):
context t_all is
library pkgs;
use pkgs.t_bit.all;
use pkgs.t_lpfsm.all;
use pkgs.t_des.all;
use pkgs.t_fifo.all;
use pkgs.t_ports.all;
use pkgs.t_tbl.all;
end context t_all;
It seems Questa Prime does not recognize the context keyword... So, how to fix/workaround? How can I use VHDL-2008 context statements with Quartus Prime? I'm using QuestaPrime v16.1. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quartus only has limited 2008 support in prime. Context is not one of them.
Prime Pro has full 2008 support, so if you have the licence, give that a go. Otherwise, you're limited to this: http://quartushelp.altera.com/14.1/mergedprojects/hdl/vhdl/vhdl_list_2008_vhdl_support.htm- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, I don't have a Pro license...
Can I include packages inside of other packages (just to make a walk around for 'context' problem)? Is there another way to walk around this issue (bisides declaring a long list of packets, which were included in the 'context' declaration)?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
no, packages cannot be included with other packages (hence why context was added to vhdl 2008). You just need to write out the long list.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page