Forum Discussion
Altera_Forum
Honored Contributor
18 years agoYou can have multiple entities with the same name, they just need to be compiled into different libraries. You can set the library when you add the source file to the project; otherwise, all the stuff in the file will be compiled into the "work" library. The Quartus II Handbook has all the gory details!
Auto-discovered entities are another matter. They automatically go into the "work" library. Also, Quartus II searches the user libraries in order. It stops when it finds a file called target_entity_name.{v,vhd,vhdl,etc} that contains a declaration for the target entity. You can have duplicates in your user libraries, but only one will ever be used based on the search order. I don't like auto-discovery of source files. It's a lazy feature and probably causes more grief than good. I highly recommend adding all your source files to the project explicitly.