T
terabits
Guest
Hi
This is about usage of enum in interface..im seeing strange
errors !!!
pls see the following code
interface xclr;
typedef enum {red,blue,green} color;
color type1,type2;
modports tr1 (input type1,output type2....)
.....
endinterface
module tr1_type (xclr x,...);
typedef x.color clr; // here i am seeing an error saying x.color is
not visible
clr c1,c2,c3...;
//usage
assgin xyz = c1.blue ; // can i do this ?? (i want to assign ethe
value to some internal code)
assign x.type2 = 2; // output assignement (assign the output in the
interface with some value)
endmodule
test....
....xclr x1;
tr1_type tr (x1,...)
endmodule
rgds
This is about usage of enum in interface..im seeing strange
errors !!!
pls see the following code
interface xclr;
typedef enum {red,blue,green} color;
color type1,type2;
modports tr1 (input type1,output type2....)
.....
endinterface
module tr1_type (xclr x,...);
typedef x.color clr; // here i am seeing an error saying x.color is
not visible
clr c1,c2,c3...;
//usage
assgin xyz = c1.blue ; // can i do this ?? (i want to assign ethe
value to some internal code)
assign x.type2 = 2; // output assignement (assign the output in the
interface with some value)
endmodule
test....
....xclr x1;
tr1_type tr (x1,...)
endmodule
rgds