Hi there,
I am trying to forward reference a class that is defined in a package using the typedef method. But compiler doesnt seem to like this. Does anyone know the solution/syntax to this or is this even possible?
Example:
typedef class saja::c2;
//class-1
class c1;
c2 c;
endclass
package saja;
//class-2
class c2;
//c1 c;
endclass
endpackage
If I only do “typdef class c2”, the compiler complains:
The forward typedef of the class does not have a definition in the same
scope.
Please provide a definition to the forward class declaration.
However, if I do “typedef class saja::c2”, the compiler doesnt like it either:
Error-[SE] Syntax error
Following verilog source has syntax error :
“testbench.sv”, 4: token is ‘saja’
typedef class saja::c2;
Thanks.