"INCA" defined means in Questa or not?

in the code:
ifdef INCA include “ovm.svh”
else include “ovm_macros.svh”
import ovm_pkg::*;
`endif
which part of code is in Questa?
if INCA is defined, the codes are used in Questa or not?

in the code:
ifdef INCA include “ovm.svh”
else include “ovm_macros.svh”
import ovm_pkg::*;
`endif
which part of code is in Questa?
if INCA is defined, the codes are used in Questa or not?

Hi,

INCA, SVPP macros are automatically defined when you use Incisive tool. So “`else” part is meant for Questa.

If you manually define INCA while using Questa, it will be treated as normal macro:)

Thanks,
Saurabh Sharma

Thank you very much for your reply.
However, there is another question here. Look at the codes in ovm_pair.svh, from line 93 to line 106.

[I]virtual function string convert2string;*
string s;
ifndef INCA* *$sformat( s , "built-in pair : %p , %p" ,* *first ,* *second );* *else
$sformat( s , "built-in pair : " ,
first , " , ",
second );
`endif
return s;
endfunction

[/I]
I think the else part is for Incisive tool, because I find the corresponding part in AVM3 update3(in file avm_pair.svh, from line 94 to line 102):

[I]virtual function string convert2string;*
string s;
$sformat( s , “built-in pair : %p , %p” ,
first ,
second );
return s;
endfunction

[/I]

Do you think it is perhaps omitted while converting AVM to OVM?
Thank you very much again.

I think the else part is for Incisive tool, because I find the corresponding part in AVM3 update3(in file avm_pair.svh, from line 94 to line 102):

Hi,

Yes, You are correct here “`else” part is for Incisive tool. This function will return the same string, INCA macro is used here just to show that OVM comes from 2 different but close friends:D

BR,
Saurabh

No, the functions do not return the same string. %p is for pretty printing, which is a new feature in the 1800-2008 LRM. It descends through the class object and prints the values of all the class properties. Without %p and when firstand secondare class handles, that has always been illegal without a format specifier.

Dave

Thank you for your reply, but I am a little confused. Do you mean it is illegal in the else part?
Thank you very much!

Hi Dave,

Thanks I learnt something new.

but

[HTML]Do you mean it is illegal in the else part?[/HTML]

BR,
Saurabh

OK, illegalmay be too strong a word; undefined, definitely. Handles, which include classe, object variables, events, virtual interfaces, and chandles have no user-visible defined values. The $display family of system tasks say that unformatted arguments be displayed by default as a decimal number, and that any other aggregate typed argument be formatted. There is no explicit cast of a handle to an integral value defined, so I believe any implicit cast of a handle is illegal.

Dave

Thank you for your reply. I wish a new version of OVM can come out soon with all the little problems fixed.

`ifndef INCA
means for Questa