--- Quote Start ---
Thanks very much. How can I map a library to a folder? E.g I want to map libraray "aaa" to folder "bbb", how can I do that?
Thanks.
--- Quote End ---
You can use either GUI or commands specific to Quartus or ModelSim and you either create library or map to existing one.
Quartus, see link below:
http://quartushelp.altera.com/current/mergedprojects/hdl/vhdl/vhdl_pro_libraries.htm The simplest Quartus example is this:
qsf:
set_global_assignment -name VHDL_FILE C:/project1/my_mult.vhd -library my_lib
set_global_assignment -name VHDL_FILE C:/project1/my_components.vhd -library my_lib
(alternatively use add files to project => properties => library then see the commands added in qsf)
Then in vhdl:
library my_lib;
use my_lib.my_components.all; -- assuming my_components is package
Modelsim.ini
altera_mf = C:/folder1/folder2/altera_mf
then altera_mf becomes visible to modelsim whenever it sees in the code the words library altera_mf
Quartus example can be useful to arrange all your components in one package without the need to declaring them at top of calling modules.
Modelsim mapping is useful to have all precompiled libraries in one area on your PC then point to them in any project without copying them around.