I get an error because class x is not defined. However, since NC is defined, irun should not be looking under the `ifndef NC in any case.
This seems to be an OVM+irun related bug and I’ve opened up a service request for this, but if somebody has something clever to say I would be happy to hear it.
I would like to use just my own define and not the INCA one, mainly because I would like to check that the code under the ifdefs compiles and loads in Questa as well.
I don’t understand why there should be anything that prevents me from doing so.
Thanks for the semi-colon tip. Questa doesn’t issue any warning for it. Whose right?
This is a svpp issue. The problem is that svpp sees specializations, even if they live in conditional code, unless the conditional macro is INCA or SVPP (these are the only two macros that svpp understands).
So, to do what you want, there are two solutions.
Solution 1:
ifndef NC</font> <font color=#4169e1>ifndef SVPP //Add so svpp doesn’t make specialization type
avm_analysis_port#(x) m_request_phase_started; endif endif
Solution 2 (only needed if x is not available to nc) ifndef NC</font> <font color=#4169e1>class x; endclass</font> <font color=#4169e1>avm_analysis_port#(x) m_request_phase_started;</font><font color=#4169e1> endif
Oops, for the solution 2, the definition of the dummy class should have been in the ifdef NC section. Sorry. So, solution 2 should be: <font color=#4169e1>ifndef NC
class x; endclass
blabla
`endif