How to run test bench

Testbench Details

Architecture

Fig. 1: Testbench Architecture

Components

Transaction

Signals encapsulated in transaction class is shown below:

class axi_transaction#(d_width = 16, a_width = 16) extends uvm_sequence_item;

    //  Group: Variables
    bit [8:0] id;
    rand bit [a_width-1:0] addr;
    rand bit [7:0] data [][];
    rand bit [2:0] b_size;
    rand bit [3:0] b_len;
    rand B_TYPE b_type;
    bit b_last;
    bit [1:0] b_resp;
    bit [1:0] r_resp [];
endclass

Transaction class also has various constraints as per the AXI specifications and for directed cases.

Transaction class also encapsulates helper function like do_print(), do_compare(axi_transaction rhs), do_copy(axi_transaction rhs) etc.

Sequence

Generates new packet which is sent to the driver. Two sequences are used in this VIP to implement parallel read and write operations of AXI.

Master

Sequencer

In AXI, the read and write channels have no dependency on each other and thus 2 sequencers are used to properly simulate this behaviour. Both the sequncers run in parallel in 2 different processes and driver can accept packets from any or both of these seqeuncer without any dependency.

Driver

Driver runs 2 processes in parallel, one to receive the packet from write seqeuncer and drive the write transaction, and the other process to receive the packet from read sequencer and drive the read transaction.

Monitor

Monitors the interface from the Master side, thus acts as input monitor for Write Address Channel, Write Data Channel & Read Address channels, and output monitor for Read Data Channel & Burst Response Channel.

Slave

Driver

Slave driver decodes the address and stores received data in an associative array. Address decoding supports both aligned and unaligned transfers.

Error Response:

In this version, slave driver doesnot support byte_lane_selection, it assumes for each transfer data starts from 0 bit of data bus, but it can ignore data bytes in case of unaligned transfer as mentioned in AXI specifications.

Monitor

Monitors the interface from the slave side, thus acts as output monitor for Write Address Channel, Write Data Channel & Read Address channels, and input monitor for Read Data Channel & Burst Response Channel.

Scoreboard

Compares packet received from master and slave monitor and compares it. Packet having same ID’s are compared and log is created.

This project is governed by MIT License