|HOME |ABOUT |ARTICLES |ACK |FEEDBACK |TOC |LINKS |BLOG |JOBS |


Tutorials



SCOREBOARD




When the packet comes from reciever, the scoreboard gets the expected packet from drv2sb_chan channel and compare them.


CODE:scoreboard.vr
`ifndef SB_CLASS
`define SB_CLASS

class scoreboard extends rvm_xactor{
packet exp_pkt;
packet rcv_pkt;
integer no_drv_pkt;
integer no_rcv_pkt;
string msg;
packet_channel rcv2sb_chan;
packet_channel drv2sb_chan;

task new(packet_channel rcv2sb_chan = null,packet_channel drv2sb_chan = null);
virtual task main_t();

}

task scoreboard::new(packet_channel rcv2sb_chan ,packet_channel drv2sb_chan ){
super.new("Scoreboard","sb");
this.drv2sb_chan = drv2sb_chan;
this.rcv2sb_chan = rcv2sb_chan;
no_drv_pkt = 0;
no_rcv_pkt = 0;

rvm_note(log,"Scoreboard created");
}


task scoreboard::main_t(){
super.main_t();
rvm_note(this.log," STARTED main task ");
while(1){
rcv_pkt = rcv2sb_chan.get_t();
this.no_rcv_pkt++;
exp_pkt = drv2sb_chan.get_t();
this.no_drv_pkt++;

if(rcv_pkt.compare(exp_pkt,msg,0))
rvm_note(this.log,msg);
else
rvm_error(this.log,msg);
}
}




`endif














Index
Introduction
Rtl
Top
Interface
Program Block
Environment
Packet
Configuration
Driver
Reciever
Scoreboard

Report a Bug or Comment on This section - Your input is what keeps Testbench.in improving with time!





<< PREVIOUS PAGE

TOP

NEXT PAGE >>

copyright © 2007-2017 :: all rights reserved www.testbench.in::Disclaimer