Code Browser Pages:
Files in
vmm_switch_9.tar



Driver.sv
Current file: DrvrCovCallback.sv
Environment.sv
filelist
Globals.sv
interface.sv
Packet.sv
README.txt
Receiver.sv
rtl.sv
Scoreboard.sv
testcase.sv
top.sv



////////////////////////////////////////////////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////s           www.testbench.in           s////
////s                                      s////
////s             VMM Tutorial             s////
////s           gopi@testbench.in          s////
////s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s////
////////////////////////////////////////////////
`ifndef GUARD_DRVR_CALLBACK_1
`define GUARD_DRVR_CALLBACK_1

class DrvrCovCallback extends Driver_callbacks;
    Packet pkt;


    covergroup switch_coverage;

        length : coverpoint pkt.length;
        da     : coverpoint pkt.da {
                    bins p0 = { `P0 };
                    bins p1 = { `P1 };
                    bins p2 = { `P2 };
                    bins p3 = { `P3 }; }
        length_kind : coverpoint pkt.length_kind;
        fcs_kind : coverpoint pkt.fcs_kind;

        all_cross:  cross length,da,length_kind,fcs_kind;
    endgroup

    function new();
        switch_coverage = new();
    endfunction : new


    virtual task post_trans(Packet pkt);
        this.pkt = pkt;
        switch_coverage.sample();
    endtask: post_trans

endclass:DrvrCovCallback

`endif