System verilog Compilation error

Status
Not open for further replies.

Sindhiya C R

Newbie level 4
Joined
Sep 4, 2013
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
45
Hi,
We can use typedef inside the class for include another class. I am having class as base,and interface as network and I have instantiated this interface inside the base class..While compiling this base class it showing error in interface instantiation
I tried as below..But it shows error only

//Interface
interface network();

//input/output

modport mod(cb)
endinterface

//BASE class
typedef network.mod intf;
class base;
virtual interface network.mod intf;
endclass

or any other way to avoid compilation error while compiling this base class with interface?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…