RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: Modport to class connection
Prev Next
You are not authorized to post a reply.

Author Messages
VLADUser is Offline

Posts:3

02/10/2009 4:09 AM  
Hi guys, I'm trying to pass a modport to a class, but I don't seem to get it right. The structure of the test env I've built is someting like this: interface if; ... modport A(...); modport B(...); endinterface program testbench; if i_if(); env my_env=new(i_if); ... endprogram class env; virtual interface if env_if; driver drv1, drv2; function new(virtual if i_if); env_if = i_if; endfunction function run; drv1 = new(env_if.A); //here is were I'd like to connect the mod port to the driver drv2 = new(env_if.B); ... endfunction endclass And there is of course a driver class were I use the signals from modports. I'd be very greatfull if somebody could tell me how to make the connection between driver and modport, and also how to call the signals from modports inside the driver. And the modports contain modport expressions. Thanks!
You are not authorized to post a reply.
Forums > General Discussion > Main Discussion Area > Modport to class connection



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement