Driver is a tranctor. It is extension of rvm_xactor. Get the packets from gen2drv_chan chennel and drive them on to dut interface. Put the packets in to drv2sb_chan channel.
CODE:driver.vr #ifndef DRVR_CLASS
#define DRVR_CLASS
//Transactors shall be implemented in classes derived from the rvm_xactor
//All threads shall be started in the extension of the rvm_xactor::main_t() method
//Extensions of the rvm_xactor::main_t() method shall fork a call to super.main_t()
task drvr_xtor::main_t(){
super.main_t();
rvm_note(this.log," STARTED main task ");
while(1){
//wait_if_stopped_or_empty(this.gen2drv_chan);
pkt = this.gen2drv_chan.get_t();
sprintf(this.msg,"pkt da %x pkt sa %x pkt len %d \n",pkt.da,pkt.sa,pkt.len);
rvm_note(this.log,msg);
if (!cast_assign(drv_pkt, pkt.copy()))
rvm_fatal(this.log, "Attempting to copy to a non Packet instance");
drive(drv_pkt);
@(posedge intf.clk);
this.drv2sb_chan.sneak(drv_pkt);