--- Quote Start ---
I absolutely agree with you but how do you associate a module (or a file) with a library ...
--- Quote End ---
Hmm, good question.
I haven't used Qsys a great deal. However, in SOPC builder I found that VHDL libraries were not well supported. I just looked at the add_file documentation, and it does not have an option for the library in which to compile it.
I also found that the automatically generated instances always missed the lines:
Library mylib;
using mylib.mycomponent.all;
So I resorted to using the callbacks to create my own top-level instances. Quartus does not complain about these missing library calls, but Modelsim does.
I'm not sure if this 'feature' has been carried through to Qsys.
Cheers,
Dave