Different Approaches to compile OVM code between Cadence Incisive and Mentor QuestaSim

In the OVM user guide, it says:

In order to compile OVM applications, different approaches are recommended depending on your choice
of simulator.
For Cadence Incisive, the best approach is:
• to add ./src to the include path on the command line, that is, +incdir+/…/src
• to add the following directive at the top of your various SystemVerilog files
include "ovm.svh" For Mentor Graphics QuestaSim, the best approach is:• to add ./src to the include path on the command line, that is, +incdir+/.../src • to add ./src/ovm_pkg.sv to the front of the list of files being compiled • to add the following directives to your various SystemVerilog files include “ovm_macros.svh”
import ovm_pkg::*;

I’m just curious why there’s different recommendations for different simulators. Does it have something to do with the different handling to compilation unit between two simulators?

Thanks
Bill

Both methods should work with Cadence Incisive Simulator.

Bill,

We would prefer that you use a package for the reasons listed in my article. We also provide a pre-compiled package that saves you the task of always having to recompile it yourself.

Thanks Pjigar and Dave.
Now I understand the difference between `include and import.
It seems to me that import ovm_pkg and include ovm_macro is the better option for both of the simulators.

Thanks
Bill