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

An AXI slave containing memory-mapped registers. More...

#include <AxiSlaveToReg.h>

Inheritance diagram for AxiSlaveToReg< axiCfg, numReg, numAddrBitsToInspect >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (AxiSlaveToReg)
 

Public Attributes

sc_in< bool > clk
 
sc_in< bool > reset_bar
 
axi4_::read::template slave if_axi_rd
 
axi4_::write::template slave if_axi_wr
 
sc_in< NVUINTW(numAddrBitsToInspect)> baseAddr
 
sc_out< NVUINTW(axi4_::DATA_WIDTH)> regOut [numReg]
 

Static Public Attributes

static const int kDebugLevel = 5
 
static const int regAddrWidth = nvhls::log2_ceil<numReg>::val
 
static const int bytesPerReg = axi4_::DATA_WIDTH >> 3
 
static const int axiAddrBitsPerReg = nvhls::log2_ceil<bytesPerReg>::val
 

Protected Member Functions

void run ()
 

Detailed Description

template<typename axiCfg, int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
class AxiSlaveToReg< axiCfg, numReg, numAddrBitsToInspect >

An AXI slave containing memory-mapped registers.

Template Parameters
axiCfgA valid AXI config.
numRegThe number of registers in the slave. Each register has a width equivalent to the AXI data width.
numAddrBitsToInspectThe number of address bits to inspect when determining which slave to direct traffic to. If this is less than the full address width, the routing determination will be made based on the number of address LSBs specified. (Default: axiCfg::addrWidth)
Overview
AxiSlaveToReg is an AXI slave that saves its state in a bank of registers. The register state is accessible as an array of sc_out.
Usage Guidelines

This module sets the stall mode to flush by default to mitigate possible RTL bugs that can occur in the default stall mode. If you are confident that this class of bugs will not occur in your use case, you can change the stall mode via TCL directive:

directive set /path/to/AxiSlaveToReg/run/while -PIPELINE_STALL_MODE stall

This may reduce area/power.

Definition at line 55 of file AxiSlaveToReg.h.


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