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

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

#include <SlaveFromFile.h>

Inheritance diagram for SlaveFromFile< axiCfg >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

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

Public Attributes

axi4_::read::template slave if_rd
 
axi4_::write::template slave 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 = 0
 
static const int bytesPerBeat = axi4_::DATA_WIDTH >> 3
 

Protected Member Functions

void run_rd ()
 
void run_wr ()
 

Detailed Description

template<typename axiCfg>
class SlaveFromFile< axiCfg >

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

Template Parameters
axiCfgA valid AXI config.
Overview
AxiSlaveFromFile acts as an AXI slave in a testbench. It differs from Slave 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 SlaveFromFile.h.


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