Hi,
As I set up a UVM environment, one of the options before me is to compile the individual packages separately and link them all in at the top level compile. I have some questions on this:
1.Is this advised/doable?
2.Given that tools have the intelligence to re-compile only the changed files, does this option save me any compile time at all?
I have tried this but have run into multiple issues ( as compared to just compiling all of them together). Any ideas/answers/suggestions would be highly appreciated.
The package concept in SystemVerilog was created to separate your code into independent re-usable units, with clear sets of dependencies. If you are having troubles compiling them separately, it is most likely because of compiler directives and macros that are not being re-included in each separate compilation.
Getting your packages to compile separately will clean up the dependencies, and make the packages more portable for re-use.
If you have a large number of files, or poor network performance, compiling the packages separately might improve performance since the compiler still has to access every file to see if it has changed. But that has to be traded with the overhead of invoking the compiler multiple times.
Hi Dave,
Thank you so much for the prompt reply. I have various problems, while I try to compile the libraries independently. I know I am doing something wrong, cant figure out what.
So, this is the flow I follow:
1.Compile the packages into separate libraries. When I do this , I have needed to use a pre-compiled “uvm” library ( into which I compile the uvm pkg only) as a reference library - not sure why.
2.At the top level - use all these compiled packages as reference libs.
I have gotten different kinds of errors. Can you please tell me if this is correct. I know, it’s hard to say much without details and/or the error messages… but is there something obvious that I am missing?