hwtLib.amba.datapump package

This package contains a AxiDatapump interfaces and components for them

note:

AxiDatapump interface is simplified AXI-3/4 interface

Subpackages

Submodules

hwtLib.amba.datapump.base module

class hwtLib.amba.datapump.base.AxiDatapumpBase(axiCls=<class 'hwtLib.amba.axi4.Axi4'>)[source]

Bases: HwModule

Variables:
  • ~.MAX_TRANS_OVERLAP – max number of concurrent transactions

  • ~.CHUNK_WIDTH – number of bits for one transaction chunk (a transaction is defined as a stream of chunks, if CHUNK_WIDTH==DATA_WIDTH it means that the transaction size % DATA_WIDTH == 0)

  • ~.MAX_CHUNKS – maximum number of chunks in a transaction

  • ~.ALIGNAS – specifies alignment requirement for a data type t (in bits), same functionality as C++11 alignas specifier, used to discard alignment logic

  • ~.driver – interface which is used to drive this datapump (AxiRDatapumpIntf or AxiWDatapumpIntf)

__annotations__ = {}
__init__(axiCls=<class 'hwtLib.amba.axi4.Axi4'>)[source]
addrAlign(addr: RtlSignal)[source]
addrHandler(req: AddrSizeHs, axiA: Axi3_addr | Axi3Lite_addr | Axi4_addr | Axi4Lite_addr, transInfo: HwIORdVldSync, errFlag: RtlSignal)[source]

Propagate read/write requests from req to axi address channel and store extra info using transInfo interface.

addrIsAligned(addr: RtlSignal)[source]
axiAddrDefaults(a: Axi3_addr | Axi3Lite_addr | Axi4_addr | Axi4Lite_addr)[source]
encodeShiftValue(SHIFT_OPTIONS: List[int], addrOffset: RtlSignal, shift: RtlSignal)[source]
getAxiLenMax()[source]
getBurstAddrOffset()[source]
getLen_t()[source]
getShiftOptions()[source]
getSizeAlignBits()[source]
hasAlignmentError(addr: RtlSignal)[source]
isAlwaysAligned()[source]
isCrossingWordBoundary(addr, rem)[source]
useTransSplitting()[source]

hwtLib.amba.datapump.intf module

class hwtLib.amba.datapump.intf.AddrSizeHs(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIODataRdVld

HDL params:
  • ID_WIDTH - default value 4 of type int

  • ADDR_WIDTH - default value 32 of type int

  • DATA_WIDTH - default value 64 of type int

  • MAX_LEN - default value 511 of type intmaximum value of len (number of words - 1)

  • USE_STRB - default value True of type bool

HDL IO:
  • id - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 4bits> - UNKNOWN

  • addr - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 32bits> - UNKNOWN

  • len - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 9bits> - UNKNOWN

  • rem - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 3bits> - UNKNOWN

  • vld - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • rd - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN (Master=IN)

__annotations__ = {}
_initSimAgent(sim: HdlSimulator)[source]
class hwtLib.amba.datapump.intf.AddrSizeHsAgent(sim: HdlSimulator, hwIO: HwIODataRdVld, allowNoReset=False)[source]

Bases: HwIODataRdVldAgent

__annotations__ = {}
get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.datapump.intf.HwIOAxiRDatapump(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIO

HwIO of read datapump driver

HDL params:
  • ID_WIDTH - default value 0 of type int

  • ADDR_WIDTH - default value 32 of type int

  • DATA_WIDTH - default value 64 of type int

  • MAX_BYTES - default value 4096 of type int

  • USE_STRB - default value True of type bool

HDL IO:
__annotations__ = {}
_initSimAgent(sim: HdlSimulator)[source]
class hwtLib.amba.datapump.intf.HwIOAxiRDatapumpAgent(sim: HdlSimulator, hwIO)[source]

Bases: AgentBase

Composite agent with agent for every HwIOAxiRDatapump channel enable is shared

__annotations__ = {}
__init__(sim: HdlSimulator, hwIO)[source]
property enable
getDrivers()[source]

Called before simulation to collect all drivers of interfaces from this agent

getMonitors()[source]

Called before simulation to collect all monitors of interfaces from this agent

class hwtLib.amba.datapump.intf.HwIOAxiWDatapump(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIO

HwIO of write datapump driver

HDL params:
  • ID_WIDTH - default value 4 of type int

  • ADDR_WIDTH - default value 32 of type int

  • DATA_WIDTH - default value 64 of type int

  • MAX_LEN - default value 511 of type int

  • USE_STRB - default value True of type bool

HDL IO:
__annotations__ = {}
_initSimAgent(sim: HdlSimulator)[source]
class hwtLib.amba.datapump.intf.HwIOAxiWDatapumpAgent(sim: HdlSimulator, hwIO)[source]

Bases: AgentBase

Composite agent with agent for every HwIOAxiRDatapump channel enable is shared

__annotations__ = {}
__init__(sim: HdlSimulator, hwIO)[source]
property enable
getDrivers()[source]

Called before simulation to collect all drivers of interfaces from this agent

getMonitors()[source]

Called before simulation to collect all monitors of interfaces from this agent

hwtLib.amba.datapump.r module

class hwtLib.amba.datapump.r.Axi_rDatapump(axiCls=<class 'hwtLib.amba.axi4.Axi4'>)[source]

Bases: AxiDatapumpBase

Forward request to axi address read channel and collect data to data channel form axi read data channel

  • Blocks data channel when there is no request pending.

  • If req len is wider transaction is internally split to multiple axi transactions, but returned read data is a single packet as originally requested.

  • errorRead stays high when there was error on axi read channel it will not affect unit functionality

  • id of driver is a different id than is used on AXI this is because the id on driver side is used to distinguish between transactions and on AXI side it has to be same to assert that the transactions will be finished in-order.

HDL params:
  • MAX_TRANS_OVERLAP - default value 16 of type int

  • ALIGNAS - default value 8 of type int

  • CHUNK_WIDTH - default value 64 of type int

  • MAX_CHUNKS - default value 64 of type int

  • ID_WIDTH - default value 4 of type int

  • ADDR_WIDTH - default value 32 of type int

  • USER_WIDTH - default value 0 of type int

  • ADDR_USER_VAL - default value None of type None

  • DATA_WIDTH - default value 64 of type int

  • ID_VAL - default value 0 of type int

  • CACHE_VAL - default value 3 of type int

  • PROT_VAL - default value 0 of type int

  • QOS_VAL - default value 0 of type int

  • USE_STRB - default value True of type bool

  • AXI_CLS - default value <class ‘hwtLib.amba.axi4.Axi4’> of type type

HDL IO:
  • clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE

  • rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE

  • axi - of type hwtLib.amba.axi4.Axi4 - MASTER

  • errorRead - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • driver - of type hwtLib.amba.datapump.intf.HwIOAxiRDatapump - SLAVE

HDL components:
schematic
__annotations__ = {}
dataHandler(rErrFlag: RtlSignal, rmSizeOut: TransEndInfo)[source]
remSizeToStrb(remSize: RtlSignal, strb: RtlSignal, isFirstWord, isLastWord)[source]
storeTransInfo(transInfo: TransEndInfo, isLast: bool)[source]
class hwtLib.amba.datapump.r.TransEndInfo(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIORdVldSync

HDL params:
  • ID_WIDTH - default value 0 of type int

  • DATA_WIDTH - default value 64 of type int

  • HAS_PROPAGATE_LAST - default value True of type bool

  • SHIFT_OPTIONS - default value (0,) of type tuple

HDL IO:
  • rem - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 3bits> - UNKNOWN

  • propagateLast - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • vld - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • rd - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN (Master=IN)

__annotations__ = {}

hwtLib.amba.datapump.sim_ram module

class hwtLib.amba.datapump.sim_ram.AxiDpSimRam(cellWidth, clk, rDatapumpHwIO=None, wDatapumpHwIO=None, parent=None)[source]

Bases: SimRam

Dense RAM for simulation purposes with axi datapump interfaces

Variables:

~.data – memory dict

__annotations__ = {}
__init__(cellWidth, clk, rDatapumpHwIO=None, wDatapumpHwIO=None, parent=None)[source]
Parameters:
  • cellWidth – width of items in memory

  • clk – clk signal for synchronization

  • parent – parent instance of SimRam (memory will be shared with this instance)

_registerOnClock()[source]
checkRequests()[source]

Check if any request has appeared on interfaces

doRead()[source]
doWrite()[source]
doWriteAck(_id)[source]
onReadReq()[source]
onWriteReq()[source]
parseReq(req)[source]

hwtLib.amba.datapump.utils module

hwtLib.amba.datapump.utils.connectDp(parent, controller, datapump, axi, exclude=None)[source]

Connect datapump with it’s controller(s) and axi

Parameters:
  • controller – (controller compatible with Axi_wDatapump or Axi_rDatapump) or list/tuple/generator of them

  • datapump – Axi_wDatapump or Axi_rDatapump

  • axi – axi(3/4) interface which datapump should use

hwtLib.amba.datapump.w module

class hwtLib.amba.datapump.w.Axi_wDatapump(axiCls=<class 'hwtLib.amba.axi4.Axi4'>)[source]

Bases: AxiDatapumpBase

Axi3/Axi3Lte/Axi4/Axi4Lite to axi write datapump,

HDL params:
  • MAX_TRANS_OVERLAP - default value 16 of type int

  • ALIGNAS - default value 8 of type int

  • CHUNK_WIDTH - default value 64 of type int

  • MAX_CHUNKS - default value 64 of type int

  • ID_WIDTH - default value 4 of type int

  • ADDR_WIDTH - default value 32 of type int

  • USER_WIDTH - default value 0 of type int

  • ADDR_USER_VAL - default value None of type None

  • DATA_WIDTH - default value 64 of type int

  • ID_VAL - default value 0 of type int

  • CACHE_VAL - default value 3 of type int

  • PROT_VAL - default value 0 of type int

  • QOS_VAL - default value 0 of type int

  • USE_STRB - default value True of type bool

  • AXI_CLS - default value <class ‘hwtLib.amba.axi4.Axi4’> of type type

HDL IO:
  • clk - of type hwt.hwIOs.std.HwIOClk with dtype=<HBits, 1bit> - SLAVE

  • rst_n - of type hwt.hwIOs.std.HwIORst_n with dtype=<HBits, 1bit, n> - SLAVE

  • axi - of type hwtLib.amba.axi4.Axi4 - MASTER

  • errorWrite - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - MASTER

  • driver - of type hwtLib.amba.datapump.intf.HwIOAxiWDatapump - SLAVE

HDL components:
schematic
__annotations__ = {}
axiBHandler()[source]
axiWHandler(wErrFlag: RtlSignal)[source]
storeTransInfo(transInfo: WFifoIntf, isLast: bool)[source]
class hwtLib.amba.datapump.w.BFifoIntf(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIODataRdVld

HDL IO:
  • isLast - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • vld - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • rd - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN (Master=IN)

__annotations__ = {}
_initSimAgent(sim: HdlSimulator)[source]
class hwtLib.amba.datapump.w.WFifoIntf(masterDir=DIRECTION.OUT, hdlName: str | dict[str, str] | None = None, loadConfig=True)[source]

Bases: HwIODataRdVld

HDL params:
  • SHIFT_OPTIONS - default value (0,) of type tuple

HDL IO:
  • vld - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN

  • rd - of type hwt.hwIOs.std.HwIOSignal with dtype=<HBits, 1bit> - UNKNOWN (Master=IN)

__annotations__ = {}
_initSimAgent(sim: HdlSimulator)[source]