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
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.

Member Typedef Documentation

◆ axi4_

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
typedef axi::axi4<axiCfg> AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::axi4_

Definition at line 59 of file AxiSubordinateToReg.h.

Member Function Documentation

◆ SC_CTOR()

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::SC_CTOR ( AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >  )
inline

Definition at line 77 of file AxiSubordinateToReg.h.

◆ run()

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
void AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::run ( )
inlineprotected

Definition at line 89 of file AxiSubordinateToReg.h.

Member Data Documentation

◆ kDebugLevel

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::kDebugLevel = 5
static

Definition at line 57 of file AxiSubordinateToReg.h.

◆ clk

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<bool> AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::clk

Definition at line 61 of file AxiSubordinateToReg.h.

◆ reset_bar

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<bool> AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::reset_bar

Definition at line 62 of file AxiSubordinateToReg.h.

◆ if_axi_rd

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
axi4_::read::template subordinate AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::if_axi_rd

Definition at line 64 of file AxiSubordinateToReg.h.

◆ if_axi_wr

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
axi4_::write::template subordinate AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::if_axi_wr

Definition at line 65 of file AxiSubordinateToReg.h.

◆ regAddrWidth

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::regAddrWidth = nvhls::log2_ceil<numReg>::val
static

Definition at line 67 of file AxiSubordinateToReg.h.

◆ bytesPerReg

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::bytesPerReg = axi4_::DATA_WIDTH >> 3
static

Definition at line 68 of file AxiSubordinateToReg.h.

◆ axiAddrBitsPerReg

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::axiAddrBitsPerReg = nvhls::log2_ceil<bytesPerReg>::val
static

Definition at line 69 of file AxiSubordinateToReg.h.

◆ baseAddr

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<NVUINTW(numAddrBitsToInspect)> AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::baseAddr

Definition at line 71 of file AxiSubordinateToReg.h.

◆ regOut

template<typename axiCfg , int numReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_out<NVUINTW(axi4_::DATA_WIDTH)> AxiSubordinateToReg< axiCfg, numReg, numAddrBitsToInspect >::regOut[numReg]

Definition at line 74 of file AxiSubordinateToReg.h.


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