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
Subordinate< axiCfg > Class Template Reference

An AXI subordinate for use in a testbench. More...

#include <Subordinate.h>

Inheritance diagram for Subordinate< axiCfg >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (Subordinate)
 

Public Attributes

axi4_::read::template subordinate if_rd
 
axi4_::write::template subordinate if_wr
 
sc_in< bool > reset_bar
 
sc_in< bool > clk
 
std::queue< typename axi4_::ReadPayloadrd_resp
 
std::queue< typename axi4_::Addr > rd_resp_addr
 
std::queue< typename axi4_::AddrPayloadwr_addr
 
std::queue< typename axi4_::WritePayloadwr_data
 
std::queue< typename axi4_::WRespPayloadwr_resp
 
std::map< typename axi4_::Addr, typename axi4_::Data > localMem
 
std::map< typename axi4_::Addr, NVUINT8 > localMem_wstrb
 
std::vector< typename axi4_::Addr > validReadAddresses
 

Static Public Attributes

static const int kDebugLevel = 1
 
static const int bytesPerBeat = axi4_::DATA_WIDTH >> 3
 

Protected Member Functions

void run_rd ()
 
void run_wr ()
 

Detailed Description

template<typename axiCfg>
class Subordinate< axiCfg >

An AXI subordinate for use in a testbench.

Template Parameters
axiCfgA valid AXI config.
Overview
This test structure acts as an AXI subordinate memory, responding to read and write requests and generating responses. An internal memory, initially unpopulated, stores the values of AXI write requests and is accessed for read requests. The block enforces the following by assertion:
  • Read requests are only valid if the address has previously been written to.
  • Write data beats must each assert at least one strobe bit.

Definition at line 45 of file Subordinate.h.

Member Typedef Documentation

◆ axi4_

template<typename axiCfg >
typedef axi::axi4<axiCfg> Subordinate< axiCfg >::axi4_

Definition at line 48 of file Subordinate.h.

Member Function Documentation

◆ SC_CTOR()

template<typename axiCfg >
Subordinate< axiCfg >::SC_CTOR ( Subordinate< axiCfg >  )
inline

Definition at line 68 of file Subordinate.h.

◆ run_rd()

template<typename axiCfg >
void Subordinate< axiCfg >::run_rd ( )
inlineprotected

Definition at line 80 of file Subordinate.h.

◆ run_wr()

template<typename axiCfg >
void Subordinate< axiCfg >::run_wr ( )
inlineprotected

Definition at line 147 of file Subordinate.h.

Member Data Documentation

◆ kDebugLevel

template<typename axiCfg >
const int Subordinate< axiCfg >::kDebugLevel = 1
static

Definition at line 47 of file Subordinate.h.

◆ if_rd

template<typename axiCfg >
axi4_::read::template subordinate Subordinate< axiCfg >::if_rd

Definition at line 50 of file Subordinate.h.

◆ if_wr

template<typename axiCfg >
axi4_::write::template subordinate Subordinate< axiCfg >::if_wr

Definition at line 51 of file Subordinate.h.

◆ reset_bar

template<typename axiCfg >
sc_in<bool> Subordinate< axiCfg >::reset_bar

Definition at line 53 of file Subordinate.h.

◆ clk

template<typename axiCfg >
sc_in<bool> Subordinate< axiCfg >::clk

Definition at line 54 of file Subordinate.h.

◆ rd_resp

template<typename axiCfg >
std::queue<typename axi4_::ReadPayload> Subordinate< axiCfg >::rd_resp

Definition at line 56 of file Subordinate.h.

◆ rd_resp_addr

template<typename axiCfg >
std::queue<typename axi4_::Addr> Subordinate< axiCfg >::rd_resp_addr

Definition at line 57 of file Subordinate.h.

◆ wr_addr

template<typename axiCfg >
std::queue<typename axi4_::AddrPayload> Subordinate< axiCfg >::wr_addr

Definition at line 58 of file Subordinate.h.

◆ wr_data

template<typename axiCfg >
std::queue<typename axi4_::WritePayload> Subordinate< axiCfg >::wr_data

Definition at line 59 of file Subordinate.h.

◆ wr_resp

template<typename axiCfg >
std::queue<typename axi4_::WRespPayload> Subordinate< axiCfg >::wr_resp

Definition at line 60 of file Subordinate.h.

◆ localMem

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

Definition at line 62 of file Subordinate.h.

◆ localMem_wstrb

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

Definition at line 63 of file Subordinate.h.

◆ validReadAddresses

template<typename axiCfg >
std::vector<typename axi4_::Addr> Subordinate< axiCfg >::validReadAddresses

Definition at line 64 of file Subordinate.h.

◆ bytesPerBeat

template<typename axiCfg >
const int Subordinate< axiCfg >::bytesPerBeat = axi4_::DATA_WIDTH >> 3
static

Definition at line 66 of file Subordinate.h.


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