Yes, you can use interface with bind :
// Interface interface my_if( input IntReg ); endinterface: my_if // Interface bind bind intModule my_if my_if0( .IntReg(IntReg) );
Then enter the register as follows:
virtual my_if _if = top.DUT.IntModule.my_if0; $display ("[Time %0t ps] IntReg value = %x", $time, _if.IntReg);
Full example with sim results on EDA Playground: http://www.edaplayground.com/s/4/115
source share