Forum Discussion
7 Replies
- Altera_Forum
Honored Contributor
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> - Altera_Forum
Honored Contributor
--- 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:
--- Quote Start --- packages should be in appropriate libraries --- Quote End --- What do you mean "appropriate libraries"?library pkgs; context pkgs.all_func; ... contect all_func is library pkgs; use f1_pkg.all; use f2_pkg.all; ... end context; - Altera_Forum
Honored Contributor
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; - Altera_Forum
Honored Contributor
BTW, does Quartus Prime supports the context statement?
I'm receiving the following error:
for the following file contents (this file is defined as VHDL-2008 file in the Project Settings):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"
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!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; - Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
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)? - Altera_Forum
Honored Contributor
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.