Code Browser Pages:
Files in
rvm_eth.tar



call_back.vr
cfg_intf.vr
cfg_xtor.vr
chan.vr
cov.vr
defines.vr
env.vr
Current file: host_driver.vr
host_intf.vr
host_xtor_rx.vr
host_xtor.vr
phy_driver.vr
phy_intf.vr
phy_xtor_rx.vr
phy_xtor.vr
pkt.vr
pro.vr
run
rx_pkt.vr
sb.vr
timescale.v
top.v



#ifndef HOST_DRIVER_CLASS 
#define HOST_DRIVER_CLASS 

class host_driver extends rvm_xactor{

   task new(string name);

   function bit        read_CPU_init_end ();
   function bit        read_Rx_mac_ra    ();
   function bit [31:0] read_Rx_mac_data  ();
   function bit [1:0]  read_Rx_mac_BE    ();
   function bit        read_Rx_mac_pa    ();
   function bit        read_Rx_mac_sop   ();
   function bit        read_Rx_mac_eop   ();
   function bit        read_Tx_mac_wa    ();

   task drive_Reset      (bit        Reset      ) ;
   task drive_Rx_mac_rd  (bit        Rx_mac_rd  ) ;
   task drive_Tx_mac_wr  (bit        Tx_mac_wr  ) ;
   task drive_Tx_mac_data(bit[31:0]  Tx_mac_data) ;
   task drive_Tx_mac_BE  (bit [1:0]  Tx_mac_BE  ) ;
   task drive_Tx_mac_sop (bit        Tx_mac_sop ) ;
   task drive_Tx_mac_eop (bit        Tx_mac_eop ) ;
   task posedge_clk();

}

task host_driver::new(string name){
  super.new("driver",name);
}

function bit        host_driver::read_CPU_init_end ()  { read_CPU_init_end  = host_intf.CPU_init_end ; }
function bit        host_driver::read_Rx_mac_ra    ()  { read_Rx_mac_ra     = host_intf.Rx_mac_ra    ; }
function bit [31:0] host_driver::read_Rx_mac_data  ()  { read_Rx_mac_data   = host_intf.Rx_mac_data  ; }
function bit [1:0]  host_driver::read_Rx_mac_BE    ()  { read_Rx_mac_BE     = host_intf.Rx_mac_BE    ; }
function bit        host_driver::read_Rx_mac_pa    ()  { read_Rx_mac_pa     = host_intf.Rx_mac_pa    ; }
function bit        host_driver::read_Rx_mac_sop   ()  { read_Rx_mac_sop    = host_intf.Rx_mac_sop   ; }
function bit        host_driver::read_Rx_mac_eop   ()  { read_Rx_mac_eop    = host_intf.Rx_mac_eop   ; }
function bit        host_driver::read_Tx_mac_wa    ()  { read_Tx_mac_wa     = host_intf.Tx_mac_wa    ; }

task host_driver::drive_Reset      (bit        Reset      ) { host_intf.Reset       = Reset      ;  }
task host_driver::drive_Rx_mac_rd  (bit        Rx_mac_rd  ) { host_intf.Rx_mac_rd   = Rx_mac_rd  ;  }
task host_driver::drive_Tx_mac_wr  (bit        Tx_mac_wr  ) { host_intf.Tx_mac_wr   = Tx_mac_wr  ;  }
task host_driver::drive_Tx_mac_data(bit[31:0]  Tx_mac_data) { host_intf.Tx_mac_data = Tx_mac_data;  }
task host_driver::drive_Tx_mac_BE  (bit [1:0]  Tx_mac_BE  ) { host_intf.Tx_mac_BE   = Tx_mac_BE  ;  }
task host_driver::drive_Tx_mac_sop (bit        Tx_mac_sop ) { host_intf.Tx_mac_sop  = Tx_mac_sop ;  }
task host_driver::drive_Tx_mac_eop (bit        Tx_mac_eop ) { host_intf.Tx_mac_eop  = Tx_mac_eop ;  }
task host_driver::posedge_clk      (                      ) { @(posedge host_intf.clk);             }
#endif