MatchLib
All Classes Namespaces Files Functions Modules Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
Manager< axiCfg, cfg > Class Template Reference

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

#include <Manager.h>

Inheritance diagram for Manager< axiCfg, cfg >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (Manager)
 

Public Attributes

axi4_::read::template manager if_rd
 
axi4_::write::template manager 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 = 1
 
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 Manager< axiCfg, cfg >

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

Template Parameters
axiCfgA valid AXI config.
cfgA valid config for the manager (such as managerCfg).
Overview
Manager is an AXI manager 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:
  • Manager 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.
  • Manager 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 Manager generates random requests according to the following algorithm:

Definition at line 87 of file Manager.h.

Member Typedef Documentation

◆ axi4_

template<typename axiCfg , typename cfg >
typedef axi::axi4<axiCfg> Manager< axiCfg, cfg >::axi4_

Definition at line 92 of file Manager.h.

Member Function Documentation

◆ SC_CTOR()

template<typename axiCfg , typename cfg >
Manager< axiCfg, cfg >::SC_CTOR ( Manager< axiCfg, cfg >  )
inline

Definition at line 111 of file Manager.h.

◆ run()

template<typename axiCfg , typename cfg >
void Manager< axiCfg, cfg >::run ( )
inlineprotected

Definition at line 120 of file Manager.h.

Member Data Documentation

◆ kDebugLevel

template<typename axiCfg , typename cfg >
const int Manager< axiCfg, cfg >::kDebugLevel = 1
static

Definition at line 91 of file Manager.h.

◆ if_rd

template<typename axiCfg , typename cfg >
axi4_::read::template manager Manager< axiCfg, cfg >::if_rd

Definition at line 94 of file Manager.h.

◆ if_wr

template<typename axiCfg , typename cfg >
axi4_::write::template manager Manager< axiCfg, cfg >::if_wr

Definition at line 95 of file Manager.h.

◆ reset_bar

template<typename axiCfg , typename cfg >
sc_in<bool> Manager< axiCfg, cfg >::reset_bar

Definition at line 97 of file Manager.h.

◆ clk

template<typename axiCfg , typename cfg >
sc_in<bool> Manager< axiCfg, cfg >::clk

Definition at line 98 of file Manager.h.

◆ localMem

template<typename axiCfg , typename cfg >
std::map<typename axi4_::Addr, typename axi4_::Data> Manager< axiCfg, cfg >::localMem

Definition at line 100 of file Manager.h.

◆ localMem_wstrb

template<typename axiCfg , typename cfg >
std::map<typename axi4_::Addr, NVUINT8 > Manager< axiCfg, cfg >::localMem_wstrb

Definition at line 101 of file Manager.h.

◆ validReadAddresses

template<typename axiCfg , typename cfg >
std::vector<typename axi4_::Addr> Manager< axiCfg, cfg >::validReadAddresses

Definition at line 102 of file Manager.h.

◆ validReadAddresses_q

template<typename axiCfg , typename cfg >
std::vector<typename axi4_::Addr> Manager< axiCfg, cfg >::validReadAddresses_q

Definition at line 103 of file Manager.h.

◆ validReadAddresses_ctr

template<typename axiCfg , typename cfg >
std::vector< long long > Manager< axiCfg, cfg >::validReadAddresses_ctr

Definition at line 104 of file Manager.h.

◆ bytesPerBeat

template<typename axiCfg , typename cfg >
const int Manager< axiCfg, cfg >::bytesPerBeat = axi4_::DATA_WIDTH >> 3
static

Definition at line 106 of file Manager.h.

◆ wResp

template<typename axiCfg , typename cfg >
const bool Manager< axiCfg, cfg >::wResp = axiCfg::useWriteResponses
static

Definition at line 107 of file Manager.h.

◆ done

template<typename axiCfg , typename cfg >
sc_out<bool> Manager< axiCfg, cfg >::done

Definition at line 109 of file Manager.h.


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