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

An AXI subordinate with its memory prepopulated from a file for use in testbenches. More...

#include <SubordinateFromFile.h>

Inheritance diagram for SubordinateFromFile< axiCfg >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_HAS_PROCESS (SubordinateFromFile)
 
 SubordinateFromFile (sc_module_name name_, std::string filename="mem.csv")
 

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
 
axi4_::WritePayload load_data_pld
 

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 SubordinateFromFile< axiCfg >

An AXI subordinate with its memory prepopulated from a file for use in testbenches.

Template Parameters
axiCfgA valid AXI config.
Overview
AxiSubordinateFromFile acts as an AXI subordinate in a testbench. It differs from Subordinate in that at the beginning of simulation time its internal state is prepopulated according to the contents of a CSV file. The CSV file format is as follows:
  • address_in_hex,data_in_hex

    It's best to specify the full DATA_WIDTH of data.

Definition at line 48 of file SubordinateFromFile.h.


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