I am trying to create typedef for interface that my class uses, but facing following error:
interface A();
logic a;
endinterface
typedef A myIf; // <-- syntax error here
class B;
virtual myIf intf;
int x;
function new();
endfunction
endclass
I do understand:
typedef virtual A myIf;
is perfectly legal. But above is not working :-(
Any suggestion?
My intention is to supply custom named interface to class/module(s) via typedef.
So as I can change :
typedef A myIf;
to
typedef B myIf;
instead of changing everywhere.