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


Tutorials



RECIEVER


Reciever is a tranctor. Start the collection of packet from dut in the run() task and send them to score_board through rcv2sb channel.

CODE:reciever.sv
 
class reciever extends avm_verification_component;
 static tlm_blocking_put_if#(packet) put_sb;
  virtual switch_if intf;
  int port;
  string name;
  function new(string nm, int port);
    super.new(nm);
    this.name =nm;
    this.port = port;
  endfunction
    
  

  task run;
     byte received_bytes[$] ;
    packet rcv_pkt,pkt;
    pkt = new();
 
forever
  begin
      @(posedge (intf.ready[port]));
        while (intf.ready[port]) begin
             intf.read <= 4'b0001 << port;
             @(negedge intf.clock);
             received_bytes.push_back(intf.data_out[port]);
             end
             intf.read <= 4'h0;

    pkt.unpack(received_bytes);
    received_bytes = {};
    rcv_pkt = new pkt;
     put_sb.put(rcv_pkt);
  end

  endtask
    
endclass 

Index
Avm Introduction
Dut Specification
Rtl
Top
Interface
Environment
Packet
Packet Generator
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