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

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

#include <AxiSubordinateToReg.h>

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

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (AxiSubordinateToReg)
 

Public Attributes

sc_in< bool > clk
 
sc_in< bool > reset_bar
 
axi4_::read::template subordinate if_axi_rd
 
axi4_::write::template subordinate 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 AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >

An AXI subordinate containing memory-mapped registers.

Template Parameters
axiCfgA valid AXI config.
numRegThe number of registers in the subordinate. Each register has a width equivalent to the AXI data width.
numAddrBitsToInspectThe number of address bits to inspect when determining which subordinate 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
AxiSubordinateToReg is an AXI subordinate 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/AxiSubordinateToReg/run/while -PIPELINE_STALL_MODE stall
An AXI subordinate containing memory-mapped registers.

This may reduce area/power.

Definition at line 55 of file AxiSubordinateToReg.h.


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