I am developing a SystemVerilog monitor that extends ovm_monitor and I'd like to know how to import the ovm macros that I am using. I am using:
`ovm_component_utils_begin
`ovm_field_string
`ovm_component_utils_end
I tried the following at the top of my file, both of which do not compile:
import ovm_pkg::ovm_monitor;
import ovm_pkg::ovm_macros;
and
import ovm_pkg::ovm_monitor;
`include "ovm_macros.svh"
VCS compile error:
Error-[SE] Syntax error
Following verilog source has syntax error :
"my_monitor.svh", 58 (expanding macro): token is '#'
`ovm_component_utils_begin(my_monitor)
^
The following works, but I consider it bad practice to use * in the import statement:
import ovm_pkg::*