hwtLib.amba package

Submodules

hwtLib.amba.axi3 module

class hwtLib.amba.axi3.Axi3(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite

Axi3 bus interface

LEN_WIDTH = 4
LOCK_WIDTH = 2
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getIpCoreIntfClass()[source]
class hwtLib.amba.axi3.Axi3_addr(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_addr, hwtLib.amba.axi_intf_common.Axi_id

Axi3 address channel interface

LEN_WIDTH = 4
LOCK_WIDTH = 2
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3.Axi3_addrAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3.Axi3_addr_withUser(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3_addr

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3.Axi3_addr_withUserAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for Axi3_addr_withUser interface

input/output data stored in list under “data” property data contains tuples (id, addr, burst, cache, len, lock, prot, size, qos, user)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3.Axi3_b(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_b, hwtLib.amba.axi_intf_common.Axi_id

Axi3 write response channel interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3.Axi3_bAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for Axi3_b interface

input/output data stored in list under “data” property data contains tuples (id, resp)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3.Axi3_r(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_r, hwtLib.amba.axi_intf_common.Axi_id

Axi 3 read channel interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3.Axi3_rAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for Axi4_r interface

input/output data stored in list under “data” property data contains tuples (id, data, resp, last)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3.Axi3_w(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axis.AxiStream_withId

Axi3 write channel interface

class hwtLib.amba.axi3.Axi3_withAddrUser(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3

Axi3 bus interface with user signals on address channels

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getIpCoreIntfClass()[source]
class hwtLib.amba.axi3.IP_Axi3[source]

Bases: hwtLib.amba.axi3Lite.IP_Axi3Lite

IP core interface meta for Axi3 interface

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

postProcess(component, entity, allInterfaces, thisIf)[source]
class hwtLib.amba.axi3.IP_Axi3_withAddrUser[source]

Bases: hwtLib.amba.axi3.IP_Axi3

IP core interface meta for Axi3_withAddrUser interface

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

postProcess(component, entity, allInterfaces, thisIf)[source]

hwtLib.amba.axi3Lite module

class hwtLib.amba.axi3Lite.Axi3Lite(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getAddrStep()[source]
Returns:how many bits is one unit of address (f.e. 8 bits for char * pointer, 36 for 36 bit bram)
_getIpCoreIntfClass()[source]
_getWordAddrStep()[source]
Returns:size of one word in unit of address
_initSimAgent()[source]
class hwtLib.amba.axi3Lite.Axi3LiteAgent(intf)[source]

Bases: hwt.simulator.agentBase.AgentBase

Composite simulation agent with agent for every axi channel change of enable is propagated to each child

data for each agent is stored in agent for given channel (ar, aw, r, … property)

__init__(intf)[source]

Initialize self. See help(type(self)) for accurate signature.

getDrivers()[source]

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

getEnable()[source]
getMonitors()[source]

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

setEnable(en, sim)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_addr(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3Lite.Axi3Lite_addrAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables:data – iterable of addr
doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3Lite.Axi3Lite_b(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3Lite.Axi3Lite_bAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables:data – iterable of resp
doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3Lite.Axi3Lite_r(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3Lite.Axi3Lite_w(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi3Lite.Axi3Lite_wAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables:data – iterable of tuples (data, strb)
doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3Lite.AxiLite_rAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables:data – iterable of tuples (data, resp)
doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi3Lite.IP_Axi3Lite[source]

Bases: hwt.serializer.ip_packager.interfaces.intfConfig.IntfConfig

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

_toLowerCase(d)[source]
asQuartusTcl(buff: List[str], version: str, component, entity: hwt.hdl.entity.Entity, allInterfaces: List[hwt.synthesizer.interface.Interface], thisIf: hwt.synthesizer.interface.Interface)[source]

Add interface to Quartus tcl

Parameters:
  • buff – line buffer for output
  • version – Quartus version
  • intfName – name of top interface
  • component – component object from ipcore generator
  • entity – Entity instance of top unit
  • allInterfaces – list of all interfaces of top unit
  • thisIf – interface to add into Quartus TCL
get_quartus_map()[source]
postProcess(component, entity, allInterfaces, thisIf)[source]

hwtLib.amba.axi4 module

class hwtLib.amba.axi4.Axi4(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3

Basic AMBA AXI4 bus interface

Variables:
  • ar – read address channel
  • r – read data channel
  • aw – write address channel
  • w – write data channel
  • b – write acknowledge channel
LEN_WIDTH = 8
LOCK_WIDTH = 1
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getIpCoreIntfClass()[source]
class hwtLib.amba.axi4.Axi4_addr(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3_addr

Axi4 address channel interface (axi3 address channel with different size of len and lock signals

and additional qos signal)
LEN_WIDTH = 8
LOCK_WIDTH = 1
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi4.Axi4_addrAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi4.Axi4_b(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3_b

Axi4 write response channel interface (same as axi3)

class hwtLib.amba.axi4.Axi4_r(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3.Axi3_r

Axi4 read channel interface (same as axi3)

class hwtLib.amba.axi4.Axi4_w(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axis.AxiStream

Axi4 write channel interface (Axi3_w without id signal)

class hwtLib.amba.axi4.IP_Axi4[source]

Bases: hwtLib.amba.axi3.IP_Axi3

IP core interface meta for Axi4 interface

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

hwtLib.amba.axi4Lite module

class hwtLib.amba.axi4Lite.Axi4Lite(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite

Axi4-lite bus interface

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getIpCoreIntfClass()[source]
class hwtLib.amba.axi4Lite.Axi4Lite_addr(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_addr

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi4Lite.Axi4Lite_addrAgent(intf)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_addrAgent

Variables:data – iterable of addr
doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axi4Lite.Axi4Lite_b(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_b

class hwtLib.amba.axi4Lite.Axi4Lite_r(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_r

class hwtLib.amba.axi4Lite.Axi4Lite_w(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_w

class hwtLib.amba.axi4Lite.IP_Axi4Lite[source]

Bases: hwtLib.amba.axi3Lite.IP_Axi3Lite

IP core meta description for Axi4-lite interface

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

hwtLib.amba.axi4_rDatapump module

class hwtLib.amba.axi4_rDatapump.Axi_rDatapump(axiAddrCls=<class 'hwtLib.amba.axi4.Axi4_addr'>)[source]

Bases: hwtLib.amba.axi_datapump_base.Axi_datapumpBase

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
addrHandler(addRmSize, rErrFlag)[source]
arIdHandler(lastReqDispatched)[source]
dataHandler(rmSizeOut)[source]
remSizeToStrb(remSize, strb)[source]
class hwtLib.amba.axi4_rDatapump.TransEndInfo(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.interfaces.std.HandshakeSync

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded

hwtLib.amba.axi4_streamToMem module

class hwtLib.amba.axi4_streamToMem.Axi4streamToMem[source]

Bases: hwt.synthesizer.unit.Unit

Most simple DMA for AXI4 interface.

0x0 control reg.

rw bit 0 - on/off (1 means on) r bit 1 - idle

0x4 baseAddr

Length of written data is specified by DATA_LEN. Input data is splited on smaller frames to fit MAX_BUTST_LEN.

If there is transaction pending idle flag is 0, if on/off is set to 0 in this state unit continues until all data are send and then stayes off. This could be use as synchronization with the software.

  1. driver enables this unit, then tests while not idle.
  2. then waits while idle.
  3. then reads the data and back to 1

or unit is enabled and driver disables it only for the time of reading.

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
axiWAddrHandler(st, baseAddr, actualAddr, lenRem)[source]

AXI write addr logic

connectRegisters(st, onoff, baseAddr)[source]

connection of axilite registers

dataWFeed(st, lenRem, actualLenRem)[source]

Connection between din and axi.w channel

mainFsm(st, onoff, lenRem, actualLenRem)[source]
w_allAck(st)[source]

In this clk data word will be transfered

hwtLib.amba.axi4_wDatapump module

class hwtLib.amba.axi4_wDatapump.Axi_wDatapump(axiAddrCls=<class 'hwtLib.amba.axi4.Axi4_addr'>, axiWCls=<class 'hwtLib.amba.axi4.Axi4_w'>)[source]

Bases: hwtLib.amba.axi_datapump_base.Axi_datapumpBase

__init__(axiAddrCls=<class 'hwtLib.amba.axi4.Axi4_addr'>, axiWCls=<class 'hwtLib.amba.axi4.Axi4_w'>)[source]

Initialize self. See help(type(self)) for accurate signature.

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_impl()[source]

implementations

  • implement functionality of design there
  • called after _declr
axiAwHandler(wErrFlag)[source]
axiBHandler()[source]
axiWHandler(wErrFlag)[source]
class hwtLib.amba.axi4_wDatapump.BFifoIntf(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.interfaces.std.Handshaked

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
class hwtLib.amba.axi4_wDatapump.WFifoIntf(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.interfaces.std.Handshaked

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded

hwtLib.amba.axiDatapumpIntf module

class hwtLib.amba.axiDatapumpIntf.AddrSizeHs(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.interfaces.std.Handshaked

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axiDatapumpIntf.AddrSizeHsAgent(intf)[source]

Bases: hwt.interfaces.agents.handshaked.HandshakedAgent

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axiDatapumpIntf.AxiRDatapumpIntf(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

Interface of read datapump driver

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axiDatapumpIntf.AxiRDatapumpIntfAgent(intf)[source]

Bases: hwt.simulator.agentBase.AgentBase

Composite agent with agent for every AxiRDatapumpIntf channel enable is shared

__init__(intf)[source]

Initialize self. See help(type(self)) for accurate signature.

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.axiDatapumpIntf.AxiWDatapumpIntf(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

Interface of write datapump driver

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axiDatapumpIntf.AxiWDatapumpIntfAgent(intf)[source]

Bases: hwt.simulator.agentBase.AgentBase

Composite agent with agent for every AxiRDatapumpIntf channel enable is shared

__init__(intf)[source]

Initialize self. See help(type(self)) for accurate signature.

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

class hwtLib.amba.axi_datapump_base.Axi_datapumpBase(axiAddrCls=<class 'hwtLib.amba.axi4.Axi4_addr'>)[source]

Bases: hwt.synthesizer.unit.Unit

Variables:
  • MAX_TRANS_OVERLAP (param) – max number of concurrent transactions
  • driver – interface which is used to drive this datapump (AxiRDatapumpIntf or AxiWDatapumpIntf)
__init__(axiAddrCls=<class 'hwtLib.amba.axi4.Axi4_addr'>)[source]

Initialize self. See help(type(self)) for accurate signature.

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
axiAddrDefaults()[source]
getAxiLenMax()[source]
getBurstAddrOffset()[source]
getSizeAlignBits()[source]
useTransSplitting()[source]

hwtLib.amba.axi_datapump_utils module

hwtLib.amba.axi_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.axi_intf_common module

hwtLib.amba.axi_intf_common.AxiMap(prefix, listOfNames, d=None)[source]
class hwtLib.amba.axi_intf_common.Axi_hs(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.interfaces.std.HandshakeSync

AXI handshake interface with ready and valid signal (same as HandshakeSync just vld is valid and rd is ready) transaction happens when both ready and valid are high

Variables:
  • ready – when high slave is ready to receive data
  • valid – when high master is sending data to slave
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axi_intf_common.Axi_id(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
class hwtLib.amba.axi_intf_common.Axi_strb(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
class hwtLib.amba.axi_intf_common.Axi_user(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded

hwtLib.amba.axis module

class hwtLib.amba.axis.AxiStream(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axis.AxiStream_withoutSTRB, hwtLib.amba.axi_intf_common.Axi_strb

AxiStream_withoutSTRB with strb signal

Variables:strb – byte strobe signal, has bit for each byte of data, data valid if corresponding bit ins strb signal is high
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axis.AxiStreamAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for AxiStream interface

input/output data stored in list under “data” property data contains tuples (data, strb, last)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axis.AxiStream_withId(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_id, hwtLib.amba.axis.AxiStream

AxiStream with id signal

Variables:id – id signal, usually identifies type or destination of frame
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axis.AxiStream_withIdAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for AxiStream_withId interface

input/output data stored in list under “data” property data contains tuples (id, data, strb, last)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axis.AxiStream_withUserAndNoStrb(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axis.AxiStream_withoutSTRB, hwtLib.amba.axi_intf_common.Axi_user

AxiStream_withoutSTRB with user signal

Variables:user – generic signal with user specified meaning
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
class hwtLib.amba.axis.AxiStream_withUserAndStrb(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axis.AxiStream, hwtLib.amba.axi_intf_common.Axi_user

AxiStream with user signal

Variables:user – generic signal with user specified meaning
_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_initSimAgent()[source]
class hwtLib.amba.axis.AxiStream_withUserAndStrbAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for AxiStream_withUserAndStrb interface

input/output data stored in list under “data” property data contains tuples (data, strb, user, last)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axis.AxiStream_withoutSTRB(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs

Bare AMBA AXI-stream interface

Variables:
  • IS_BIGENDIAN – Param which specifies if interface uses bigendian byte order or litleendian byte order
  • DATA_WIDTH – Param which specifies width of data signal
  • data – main data signal
  • last – signal which if high this data is last in this frame
Attention:

no checks are made for endianity, this is just information

Note:

bigendian for interface means that items which are send through this interface has reversed byte endianity that means that most significant byte is is on lower address than les significant ones f.e. litle endian value 0x1a2b will be 0x2b1a but iterface itselelf is not reversed in any way

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded
_getIpCoreIntfClass()[source]
_initSimAgent()[source]
class hwtLib.amba.axis.AxiStream_withoutSTRBAgent(intf)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for AxiStream_withoutSTRB interface

input/output data stored in list under “data” property data contains tuples (data, strb, last)

doRead(s)[source]

extract data from interface

doWrite(s, data)[source]

write data to interface

class hwtLib.amba.axis.IP_AXIStream[source]

Bases: hwt.serializer.ip_packager.interfaces.intfConfig.IntfConfig

Class which specifies how to describe AxiStream interfaces in IP-core

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

hwtLib.amba.axis.packAxiSFrame(dataWidth, structVal, withStrb=False)[source]

pack data of structure into words on axis interface

hwtLib.amba.axis.unpackAxiSFrame(structT, frameData, getDataFn=None, dataWidth=None)[source]

opposite of packAxiSFrame

hwtLib.amba.constants module

hwtLib.amba.constants.BYTES_IN_TRANS(n)[source]

hwtLib.amba.fullDuplexAxiStream module

class hwtLib.amba.fullDuplexAxiStream.FullDuplexAxiStream(masterDir=<DIRECTION.OUT: 1>, asArraySize=None, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_config()[source]

Configure object parameters

  • setup all parameters on this object, use Param class instances to allow use of parameter inheritance
  • called in __init__ of class
_declr()[source]

declarations

  • do all declarations of externally accessible objects there (Interfaces)
  • _declr method is called after _config
  • if this object is Unit all interfaces are threaten as externally accessible interfaces if this object is Interface all subinterfaces are loaded

Module contents