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
AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect > Class Template Reference

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

#include <AxiSubordinateToReg.h>

Inheritance diagram for AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >:

Public Types

typedef axi::axi4< axiCfg > axi4_
 

Public Member Functions

 SC_CTOR (AxiSubordinateToCSReg)
 

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 [numControlReg]
 
sc_in< NVUINTW(axi4_::DATA_WIDTH)> regIn [numStatusReg]
 

Static Public Attributes

static const int kDebugLevel = 5
 
static const int numReg = numControlReg + numStatusReg
 
static const int controlRegAddrWidth = nvhls::log2_ceil<numControlReg>::val
 
static const int statusRegAddrWidth = nvhls::log2_ceil<numStatusReg>::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 numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
class AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >

An AXI subordinate containing memory-mapped registers.

Template Parameters
axiCfgA valid AXI config.
numControlRegThe number of control (local writable state) registers in the subordinate. Each register has a width equivalent to the AXI data width.
numStatusRegThe number of status (external read-only state) 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
AxiSubordinateToCSnReg is an AXI subordinate that saves its state in a bank of registers. The register state is accessible as an array of sc_out. Access to read-only status registers is provided as an array of sc_in. The status register address range immediately follows the control (read/write) register address range
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/AxiSubordinateToCSReg/run/while -PIPELINE_STALL_MODE stall
An AXI subordinate containing memory-mapped registers.

This may reduce area/power.

Definition at line 261 of file AxiSubordinateToReg.h.

Member Typedef Documentation

◆ axi4_

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
typedef axi::axi4<axiCfg> AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::axi4_

Definition at line 265 of file AxiSubordinateToReg.h.

Member Function Documentation

◆ SC_CTOR()

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::SC_CTOR ( AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >  )
inline

Definition at line 286 of file AxiSubordinateToReg.h.

◆ run()

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
void AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::run ( )
inlineprotected

Definition at line 298 of file AxiSubordinateToReg.h.

Member Data Documentation

◆ kDebugLevel

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::kDebugLevel = 5
static

Definition at line 263 of file AxiSubordinateToReg.h.

◆ clk

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<bool> AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::clk

Definition at line 267 of file AxiSubordinateToReg.h.

◆ reset_bar

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<bool> AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::reset_bar

Definition at line 268 of file AxiSubordinateToReg.h.

◆ if_axi_rd

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
axi4_::read::template subordinate AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::if_axi_rd

Definition at line 270 of file AxiSubordinateToReg.h.

◆ if_axi_wr

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
axi4_::write::template subordinate AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::if_axi_wr

Definition at line 271 of file AxiSubordinateToReg.h.

◆ numReg

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::numReg = numControlReg + numStatusReg
static

Definition at line 273 of file AxiSubordinateToReg.h.

◆ controlRegAddrWidth

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::controlRegAddrWidth = nvhls::log2_ceil<numControlReg>::val
static

Definition at line 274 of file AxiSubordinateToReg.h.

◆ statusRegAddrWidth

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::statusRegAddrWidth = nvhls::log2_ceil<numStatusReg>::val
static

Definition at line 275 of file AxiSubordinateToReg.h.

◆ bytesPerReg

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::bytesPerReg = axi4_::DATA_WIDTH >> 3
static

Definition at line 276 of file AxiSubordinateToReg.h.

◆ axiAddrBitsPerReg

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
const int AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::axiAddrBitsPerReg = nvhls::log2_ceil<bytesPerReg>::val
static

Definition at line 277 of file AxiSubordinateToReg.h.

◆ baseAddr

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<NVUINTW(numAddrBitsToInspect)> AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::baseAddr

Definition at line 279 of file AxiSubordinateToReg.h.

◆ regOut

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

Definition at line 282 of file AxiSubordinateToReg.h.

◆ regIn

template<typename axiCfg , int numControlReg, int numStatusReg, int numAddrBitsToInspect = axiCfg::addrWidth>
sc_in<NVUINTW(axi4_::DATA_WIDTH)> AxiSubordinateToCSReg< axiCfg, numControlReg, numStatusReg, numAddrBitsToInspect >::regIn[numStatusReg]

Definition at line 283 of file AxiSubordinateToReg.h.


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