MatchLib
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
Master< axiCfg, cfg > Class Template Reference

An AXI master that generates random traffic for use in a testbench. More...

#include <Master.h>

Inheritance diagram for Master< axiCfg, cfg >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (Master)
 

Public Attributes

axi4_::read::template master if_rd
 
axi4_::write::template master if_wr
 
sc_in< bool > reset_bar
 
sc_in< bool > clk
 
std::map< typename axi4_::Addr, typename axi4_::Data > localMem
 
std::map< typename axi4_::Addr, NVUINT8 > localMem_wstrb
 
std::vector< typename axi4_::Addr > validReadAddresses
 
std::vector< typename axi4_::Addr > validReadAddresses_q
 
std::vector< long long > validReadAddresses_ctr
 
sc_out< bool > done
 

Static Public Attributes

static const int kDebugLevel = 0
 
static const int bytesPerBeat = axi4_::DATA_WIDTH >> 3
 
static const bool wResp = axiCfg::useWriteResponses
 

Protected Member Functions

void run ()
 

Detailed Description

template<typename axiCfg, typename cfg>
class Master< axiCfg, cfg >

An AXI master that generates random traffic for use in a testbench.

Template Parameters
axiCfgA valid AXI config.
cfgA valid config for the master (such as masterCfg).
Overview
Master is an AXI master block for use in testbenches. It generates read and write requests and checks the responses. The block supports AXI configurations with and without burst mode, write strobes, and write responses. The block enforces the following via assertion:
  • Master may not issue a read to an address it has not yet written to.
  • Read response data must match the most recent write data to the same address.
  • Master may not issue writes with no strobe bits asserted to an address and then read from that address.
  • Responses should assert the AXI "OKAY" response code.
  • The number of read (write) responses should not exceed the number of read (write) requests.

In addition, the block asserts a done signal only when each request has received a corresponding response. The Master generates random requests according to the following algorithm:

Definition at line 87 of file Master.h.


The documentation for this class was generated from the following file: