Forum Discussion
Altera_Forum
Honored Contributor
18 years agoThe User Library inside of Quartus is very different than the VHDL definition of a library(which makes sense, since Quartus's Library settings are used in Verilog designs, schematic, etc.)
Anyway, a Quartus User Library is a pointer to look for missing files. But note that Quartus will only open source files that match the name of the entity/module being looked for. For example, let's say you have an HDL file that instantiates something called ingress. First Quartus will look for any entity/moduels named ingress in the files you've specifically added. If not, it will look in the project directory, followed by the User Library directories, for a design file called ingress. This would include ingress.vhd, ingress.v, ingress.bdf, invgress.vhdl, ingress.tdf, ingress.vqm, ingress.edif, etc. Note that Quartus does not read in all the files within a project directory or User Library. So if the name of your file is my_ingress.vhd, this will not match ingress and will not be read in. You will specifically have to add the file. This is especially common with packages, as the entities/constants they call out won't match the file name. It is generally recommended to specifically add files rather than rely on User Libraries(although many people successfully do User Libraries). This way Quartus does not read in a file you do not explicitly specify. And if it read in all the files in a User Library directory, then there would often be problems. Designers often have multiple copies of a design for testing, simulation, etc., which would now compete with each other for a definition. Lastly, VHDL libraries are a different beast altogether. When explicitly adding VHDL files, there is a Properties box on the right which can be used to specify which VHDL library a file is compiled into. (I've never been a fan of this in VHDL, in that the library construct occurs outside of the language and is done differently for every tool)