hwtLib.amba package

Subpackages

Submodules

hwtLib.amba.ace module

class hwtLib.amba.ace.AR_MODE[source]

Bases: object

class BARRIER[source]

Bases: object

INNER = (1, 1, 0)
NON = (1, 0, 0)
OUTER = (1, 2, 0)
SYSTEM = (1, 3, 0)
class CACHE_MAINTENANCE[source]

Bases: object

class CLEAN_INVALID[source]

Bases: object

INNER = (0, 1, 9)
NON = (0, 0, 9)
OUTER = (0, 2, 9)
class CLEAN_SHARED[source]

Bases: object

INNER = (0, 1, 8)
NON = (0, 0, 8)
OUTER = (0, 2, 8)
class MAKE_INVALID[source]

Bases: object

INNER = (0, 1, 13)
NON = (0, 0, 13)
OUTER = (0, 2, 13)
class COHERENT[source]

Bases: object

class CLEAN_UNIQUE[source]

Bases: object

INNER = (0, 1, 11)
OUTER = (0, 2, 11)
class MAKE_UNIQUE[source]

Bases: object

INNER = (0, 1, 12)
OUTER = (0, 2, 12)
class READ_CLEAN[source]

Bases: object

INNER = (0, 1, 2)
OUTER = (0, 2, 2)
class READ_NOT_SHARED_DIRTY[source]

Bases: object

INNER = (0, 1, 3)
OUTER = (0, 2, 3)
class READ_ONCE[source]

Bases: object

INNER = (0, 1, 0)
OUTER = (0, 2, 0)
class READ_SHARED[source]

Bases: object

INNER = (0, 1, 1)
OUTER = (0, 2, 1)
class READ_UNIQUE[source]

Bases: object

INNER = (0, 1, 7)
OUTER = (0, 2, 7)
class DVM[source]

Bases: object

class COMPLETE[source]

Bases: object

INNER = (0, 1, 14)
OUTER = (0, 2, 14)
class MESSAGE[source]

Bases: object

INNER = (0, 2, 15)
OUTER = (0, 2, 15)
class NO_SNOOP[source]

Bases: object

class READ[source]

Bases: object

NON = (0, 0, 0)
SYSTEM = (0, 3, 0)
class hwtLib.amba.ace.Ace(masterDir=<DIRECTION.OUT: 1>, loadConfig=True)[source]

Bases: hwtLib.amba.axi4.Axi4

Variables
  • ac – Coherent address channel. snoop address input to the master

  • cr – Coherent response channel. used by the master to signal the response to snoops to the interconnect

  • cd – Coherent data channel. output from the master to transfer snoop data

AR_CLS

alias of Ace_addr

AW_CLS

alias of Ace_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_getIpCoreIntfClass()[source]
_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.ace.AceSnoop_addr(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

class hwtLib.amba.ace.AceSnoop_data(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

class hwtLib.amba.ace.AceSnoop_resp(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.ace.Ace_addr(masterDir=<DIRECTION.OUT: 1>, loadConfig=True)[source]

Bases: hwtLib.amba.axi4.Axi4_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

class hwtLib.amba.ace.BAR[source]

Bases: object

BARRIER = 1
IGNORE = 2
NORMAL = 0
SYNCHRONIZATION = 3
class hwtLib.amba.ace.CACHE[source]

Bases: object

DEVICE = 0
NON_CACHEABLE = 3
WRITE_BACK = 11
WRITE_THROUGH = 7
class hwtLib.amba.ace.DOMAIN[source]

Bases: object

INNER_SHARABLE = 1
NON_SHARABLE = 0
OUTER_SHARABLE = 2
SYSTEM = 3
hwtLib.amba.ace.setAceArMode(arbar, ardomain, arsnoop, transactionType)[source]

hwtLib.amba.aceLite module

class hwtLib.amba.aceLite.AceLite(masterDir=<DIRECTION.OUT: 1>, loadConfig=True)[source]

Bases: hwtLib.amba.axi4Lite.Axi4Lite

AR_CLS

alias of AceLite_addr

AW_CLS

alias of AceLite_addr

_getIpCoreIntfClass()[source]
_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.aceLite.AceLite_addr(masterDir=<DIRECTION.OUT: 1>, loadConfig=True)[source]

Bases: hwtLib.amba.axi4Lite.Axi4Lite_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]

hwtLib.amba.axi3 module

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

Bases: hwtLib.amba.axi3Lite.Axi3Lite

Axi3 bus interface

AR_CLS

alias of Axi3_addr

AW_CLS

alias of Axi3_addr

B_CLS

alias of Axi3_b

LEN_WIDTH = 4
LOCK_WIDTH = 2
R_CLS

alias of Axi3_r

W_CLS

alias of Axi3_w

_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_getIpCoreIntfClass()[source]
class hwtLib.amba.axi3.Axi3_addr(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3.Axi3_addrAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axi3.Axi3_addr, allowNoReset=False)[source]

Bases: hwtLib.amba.axis.AxiStreamAgent

Simulation agent for Axi3_addr interface

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

__init__(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axi3.Axi3_addr, allowNoReset=False)[source]
Parameters

rst – tuple (rst signal, rst_negated flag)

create_addr_req(addr, _len, _id=0, burst=1, cache=3, lock=0, prot=0, size=<object object>, user=None)[source]

Create a default AXI address transaction :note: transaction is created and returned but it is not added to a agent data

class hwtLib.amba.axi3.Axi3_b(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3.Axi3_bAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[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)

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axi3.Axi3_r(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3.Axi3_rAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[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)

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

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

Bases: hwtLib.amba.axi_intf_common.Axi_hs, hwtLib.amba.axi_intf_common.Axi_strb

Axi3 write channel interface (simplified AxiStream)

_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[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.

library
name
postProcess(component: ipCorePackager.component.Component, packager: hwt.serializer.ip_packager.IpPackager, thisIf: hwtLib.amba.axi3.Axi3)[source]
vendor
version

hwtLib.amba.axi3Lite module

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

Bases: hwt.synthesizer.interface.Interface

AR_CLS

alias of Axi3Lite_addr

AW_CLS

alias of Axi3Lite_addr

B_CLS

alias of Axi3Lite_b

R_CLS

alias of Axi3Lite_r

W_CLS

alias of Axi3Lite_w

_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_getAddrStep()[source]
Returns

how many bits is one unit of address (e.g. 8 bits for char * pointer, 36 for 36 bit bram)

_getIpCoreIntfClass()[source]
_getWordAddrStep()[source]
Returns

size of one word in unit of address

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3Lite.Axi3LiteAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf)[source]

Bases: pycocotb.agents.base.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__(sim: pycocotb.hdlSimulator.HdlSimulator, intf)[source]

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

create_addr_req(*args, **kwargs)[source]
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)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_addr(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_addrAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables

data – iterable of addr

create_addr_req(addr, prot=None)[source]
get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axi3Lite.Axi3Lite_b(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_bAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables

data – iterable of resp

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axi3Lite.Axi3Lite_r(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_w(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi3Lite.Axi3Lite_wAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables

data – iterable of tuples (data, strb)

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axi3Lite.AxiLite_rAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Variables

data – iterable of tuples (data, resp)

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axi3Lite.IP_Axi3Lite[source]

Bases: ipCorePackager.intfIpMeta.IntfIpMeta

__init__()[source]

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

_toLowerCase(d)[source]
asQuartusTcl(buff: List[str], version: str, component: ipCorePackager.component.Component, packager: hwt.serializer.ip_packager.IpPackager, 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

  • packager – instance of IpPackager which is packagin current design

  • allInterfaces – list of all interfaces of top unit

  • thisIf – interface to add into Quartus TCL

get_quartus_map()[source]
library
name
postProcess(component: ipCorePackager.component.Component, packager: hwt.serializer.ip_packager.IpPackager, thisIf: hwtLib.amba.axi3Lite.Axi3Lite)[source]
vendor
version

hwtLib.amba.axi4 module

class hwtLib.amba.axi4.Axi4(masterDir=<DIRECTION.OUT: 1>, 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

AR_CLS

alias of Axi4_addr

AW_CLS

alias of Axi4_addr

B_CLS

alias of Axi4_b

LEN_WIDTH = 8
LOCK_WIDTH = 1
R_CLS

alias of Axi4_r

W_CLS

alias of Axi4_w

_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

_getIpCoreIntfClass()[source]
class hwtLib.amba.axi4.Axi4_addr(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi4.Axi4_addrAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axi3.Axi3_addr, allowNoReset=False)[source]

Bases: hwtLib.amba.axis.AxiStreamAgent

__init__(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axi3.Axi3_addr, allowNoReset=False)[source]
Parameters

rst – tuple (rst signal, rst_negated flag)

create_addr_req(addr, _len, _id=0, burst=1, cache=3, lock=0, prot=0, size=<object object>, qos=0, user=None)[source]

Create a default AXI address transaction :note: transaction is created and returned but it is not added to a agent data

class hwtLib.amba.axi4.Axi4_b(masterDir=<DIRECTION.OUT: 1>, 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>, 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>, loadConfig=True)[source]

Bases: hwtLib.amba.axi_intf_common.Axi_hs, hwtLib.amba.axi_intf_common.Axi_strb

Axi4 write channel interface (Axi3_w without id signal)

_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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
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.

library
name
vendor
version

hwtLib.amba.axi4Lite module

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

Bases: hwtLib.amba.axi3Lite.Axi3Lite

Axi4-lite bus interface

AR_CLS

alias of Axi4Lite_addr

AW_CLS

alias of Axi4Lite_addr

B_CLS

alias of Axi4Lite_b

R_CLS

alias of Axi4Lite_r

W_CLS

alias of Axi4Lite_w

_getIpCoreIntfClass()[source]
class hwtLib.amba.axi4Lite.Axi4Lite_addr(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi4Lite.Axi4Lite_addrAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]

Bases: hwtLib.amba.axi3Lite.Axi3Lite_addrAgent

Variables

data – iterable of addr

create_addr_req(addr, prot=0)[source]
get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

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

Bases: hwtLib.amba.axi3Lite.Axi3Lite_b

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

Bases: hwtLib.amba.axi3Lite.Axi3Lite_r

class hwtLib.amba.axi4Lite.Axi4Lite_w(masterDir=<DIRECTION.OUT: 1>, 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.

library
name
vendor
version

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>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axi_intf_common.Axi_id(masterDir=<DIRECTION.OUT: 1>, loadConfig=True)[source]

Bases: hwt.synthesizer.interface.Interface

_config(default_id_width=0)[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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

class hwtLib.amba.axi_intf_common.Axi_strb(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

class hwtLib.amba.axi_intf_common.Axi_user(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

hwtLib.amba.axis module

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

Bases: hwtLib.amba.axi_intf_common.Axi_hs, hwtLib.amba.axi_intf_common.Axi_id, hwtLib.amba.axi_intf_common.Axi_user, hwtLib.amba.axi_intf_common.Axi_strb

AMBA AXI-stream interface

Variables
  • IS_BIGENDIAN – Param which specifies if interface uses bigendian byte order or little-endian byte order

  • HAS_STRB – if set strb signal is present

  • HAS_KEEP – if set keep signal is present

  • ID_WIDTH – if > 0 id signal is present and this is it’s width

  • DEST_WIDTH – if > 0 dest signal is present and this is it’s width

  • DATA_WIDTH – Param which specifies width of data signal

  • id – optional signal wich specifies id of transaction

  • dest – optional signal which specifies destination of transaction

  • data – main data signal

  • keep – optional signal which signalize which bytes should be keept and which should be discarded

  • strb – optional signal which signalize which bytes are valid

  • 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 have reversed byte endianity. That means that most significant byte is is on lower address than les significant ones f.e. little 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_getIpCoreIntfClass()[source]
_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axis.AxiStreamAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axis.AxiStream, allowNoReset=False)[source]

Bases: hwtLib.amba.sim.agentCommon.BaseAxiAgent

Simulation agent for AxiStream interface

input/output data stored in list under “data” property data contains tuples

Format of data tules is derived from signals on AxiStream interface Order of values coresponds to definition of interface signals. If all signals are present fotmat of tuple will be (id, dest, data, strb, keep, user, last)

Variables
  • _signals – tuple of data signals of this interface

  • _sigCnt – len(_signals)

__init__(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axis.AxiStream, allowNoReset=False)[source]
Parameters

rst – tuple (rst signal, rst_negated flag)

get_data()[source]

extract data from interface

set_data(data)[source]

write data to interface

class hwtLib.amba.axis.IP_AXIStream[source]

Bases: ipCorePackager.intfIpMeta.IntfIpMeta

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

__init__()[source]

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

library
name
vendor
version
hwtLib.amba.axis._axis_recieve_bytes(ag_data, D_B, use_keep, offset=0) → Tuple[int, List[int]][source]
hwtLib.amba.axis._axis_send_bytes(axis: hwtLib.amba.axis.AxiStream, data_B: List[int], withStrb, offset) → List[Tuple[int, int, int]][source]
hwtLib.amba.axis.axis_mask_propagate_best_effort(src: hwtLib.amba.axis.AxiStream, dst: hwtLib.amba.axis.AxiStream)[source]
hwtLib.amba.axis.axis_recieve_bytes(axis: hwtLib.amba.axis.AxiStream) → Tuple[int, List[int]][source]

Read data from AXI Stream agent in simulation and use keep signal to mask out unused bytes

hwtLib.amba.axis.axis_send_bytes(axis: hwtLib.amba.axis.AxiStream, data_B: List[int], offset=0) → None[source]
Parameters
  • axis – AxiStream master which is driver from the simulation

  • data_B – bytes to send

  • offset – number of empty bytes which should be added before data in frame (and use keep signal to mark such a bytes)

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

class hwtLib.amba.axis_fullduplex.AxiStreamFullDuplex(masterDir=<DIRECTION.OUT: 1>, 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 threated as externally accessible interfaces if this object is Interface instance all subinterfaces are loaded as well

_initSimAgent(sim: pycocotb.hdlSimulator.HdlSimulator)[source]
class hwtLib.amba.axis_fullduplex.AxiStreamFullDuplexAgent(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axis_fullduplex.AxiStreamFullDuplex)[source]

Bases: pycocotb.agents.base.AgentBase

__init__(sim: pycocotb.hdlSimulator.HdlSimulator, intf: hwtLib.amba.axis_fullduplex.AxiStreamFullDuplex)[source]

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

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

Constant used for a signals in AXI, AXI-lite interfaces.

hwtLib.amba.constants.BYTES_IN_TRANS(n)[source]
hwtLib.amba.constants.CACHE_DEFAULT = 3

ARCACHE[3:0]

AWCACHE[3:0]

Memory type

0000 0001 0010 0011

0000 0001 0010 0011

Device Non-bufferable Device Bufferable Normal Non-cacheable Non-bufferable Normal Non-cacheable Bufferable

1010 1110 (0110) 1010 1110

0110 0110 1110 (1010) 1110

Write-through No-allocate Write-through Read-allocate Write-through Write-allocate Write-through Read and Write-allocate

1011 1111 (0111) 1011 1111

0111 0111 1111 (1011) 1111

Write-back No-allocate Write-back Read-allocate Write-back Write-allocate Write-back Read and Write-allocate

hwtLib.amba.constants.LOCK_DEFAULT = 0

RESP

Response

Desciption

0b00 0b10 0b11

OKAY SLVERR DECERR

Normal access success Slave error Decode error

hwtLib.amba.constants.PROT_DEFAULT = 0
Note

“prot” is an access permissions signals that can be used to protect against illegal transactions.

PROT

Value

Function

[0]

[1]

[2]

0 | Unprivileged access 1 | Privileged access 0 | Secure access 1 | Non-secure access 0 | Data access 1 | Instruction access