Basic syntax error : Macro `uvm_object_utils_begin is undefined

Hello,

my UVM environnement was recompiling UVM sources each time. it works correctly but was not the clean way to process.

This is why I removed in my source code all lines that include uvm_macros.svh and I keep only “import uvm_pkg::*;” lines.

But now, I have a syntax error in a file that contains one class :

Macro `uvm_object_utils_begin is undefined.

The file with the class is included in a package that contains the line : “import uvm_pkg::*;”

Do I need to import something else to have the right to use uvm_object_utils_begin ?

or is it a problem with my questa configuration ? mti_uvm is correctly declared…

note : I use UVM 1.1d version

In reply to iostrym:

Import and include are two separate concepts which needs to be understood. Read Dave’s article to get a better understanding.

Essentially you want to import the UVM package and include the uvm_macros.svh. DO NOT include the uvm_package.sv.

Thanks a lot.

in fact my UVM code was already correct. I previously already removed the `include the uvm_package.sv that make Questa recompiling all UVM sources.

I did a mistake by removing the `include uvm_macros.svh that is needed. thanks a lot for your help