hwtLib.cesnet.mi32 package¶
Mi32 is simple bus interfaces commonly used as a service bus. This package contains various components and utilities for this interface.
Submodules¶
hwtLib.cesnet.mi32.axi4Lite_to_mi32 module¶
- class hwtLib.cesnet.mi32.axi4Lite_to_mi32.Axi4Lite_to_Mi32(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Bridge from AxiLite interface to MI32 interface
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
RW_PRIORITY - default value READ of type str
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
s - of type hwtLib.amba.axi4Lite.Axi4Lite - SLAVE
m - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
hwtLib.cesnet.mi32.buff module¶
- class hwtLib.cesnet.mi32.buff.Mi32AddrHs(masterDir=DIRECTION.OUT, hdl_name: Optional[Union[str, Dict[str, str]]] = None, loadConfig=True)[source]¶
Bases:
HandshakeSync
Equivalent of Mi32 address/write data channel with HandshakeSync compatible signal names
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
- HDL IO
addr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
read - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
write - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
be - of type hwt.interfaces.std.Signal with dtype=<Bits, 4bits> - MASTER
dwr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
vld - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
rd - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
- class hwtLib.cesnet.mi32.buff.Mi32Buff(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Buffer for Mi32 interface
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
ADDR_BUFF_DEPTH - default value 1 of type int
DATA_BUFF_DEPTH - default value 1 of type int
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
s - of type hwtLib.cesnet.mi32.intf.Mi32 - SLAVE
m - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
- HDL components
gen_addr_tmp_reg_0 - of type hwtLib.handshaked.reg.HandshakedReg
- _connect_Mi32AddrHs_to_Mi32(mi32ahs: Mi32AddrHs, mi32: Mi32)[source]¶
hwtLib.cesnet.mi32.builder module¶
- class hwtLib.cesnet.mi32.builder.Mi32Builder(parent: Unit, srcInterface: Union[Interface, HObjList], name: Optional[str] = None, master_to_slave: bool = True)[source]¶
Bases:
AxiBuilder
- BuffCdcCls = NotImplemented¶
hwtLib.cesnet.mi32.endpoint module¶
- class hwtLib.cesnet.mi32.endpoint.Mi32Endpoint(structTemplate, intfCls=<class 'hwtLib.cesnet.mi32.intf.Mi32'>, shouldEnterFn=None)[source]¶
Bases:
BusEndpoint
Delegate request from bus to fields of structure
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
bus - of type hwtLib.cesnet.mi32.intf.Mi32 - SLAVE
decoded - of type hwt.interfaces.structIntf.StructIntf with dtype=struct { <Bits, 32bits, unsigned> field0 <Bits, 32bits, unsigned> field1 } - MASTER
- __init__(structTemplate, intfCls=<class 'hwtLib.cesnet.mi32.intf.Mi32'>, shouldEnterFn=None)[source]¶
- Parameters
structTemplate – instance of HStruct which describes address space of this endpoint
intfCls – class of bus interface which should be used
shouldEnterFn – function(root_t, structFieldPath) return (shouldEnter, shouldUse) where shouldEnter is flag that means iterator over this interface should look inside of this actual object and shouldUse flag means that this field should be used (to create interface)
- _getAddrStep()¶
- Returns
how many bits is one unit of address (e.g. 8 bits for char * pointer, 36 for 36 bit bram)
- _getWordAddrStep()¶
- Returns
size of one word in unit of address
hwtLib.cesnet.mi32.interconnectMatrix module¶
- class hwtLib.cesnet.mi32.interconnectMatrix.Mi32InterconnectMatrix(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusInterconnect
Simple matrix interconnect for Mi32 interface
- HDL params
SLAVES - default value ((0, 256), (256, 256), (<class ‘hwtLib.abstract.busInterconnect.AUTO_ADDR’>, 256), (4096, 4096)) of type tuple
MASTERS - default value ({0, 1, 2, 3},) of type tuple
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
MAX_TRANS_OVERLAP - default value 4 of type int
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
s_0 - of type hwtLib.cesnet.mi32.intf.Mi32 - SLAVE
m_0 - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
m_1 - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
m_2 - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
m_3 - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
- HDL components
r_data_order - of type hwtLib.handshaked.fifo.HandshakedFifo
s_0_buff - of type hwtLib.cesnet.mi32.buff.Mi32Buff
hwtLib.cesnet.mi32.intf module¶
- class hwtLib.cesnet.mi32.intf.Mi32(masterDir=DIRECTION.OUT, hdl_name: Optional[Union[str, Dict[str, str]]] = None, loadConfig=True)[source]¶
Bases:
Interface
Simple memory interface similar to AvalonMM
- Variables
~.addr – r/w address
~.rd – read enable
~.wr – write enable
~.ardy – slave address channel ready
~.be – data byte mask for write
~.dwr – write data
~.drd – read data
~.drdy – read data valid
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
- HDL IO
addr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
rd - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
wr - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
ardy - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
be - of type hwt.interfaces.std.Signal with dtype=<Bits, 4bits> - MASTER
dwr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
drd - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - SLAVE (Master=IN)
drdy - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
- class hwtLib.cesnet.mi32.intf.Mi32AddrAgent(sim: HdlSimulator, intf: Handshaked, allowNoReset=False)[source]¶
Bases:
HandshakedAgent
- Variables
~.requests – request data, items are tuples (READ, address) or (WRITE, address, data, be_mask)
- Note
two valid signals “read”, “write”
- Note
one ready_n signal “waitrequest”
- Note
on write set data and byteenamble as well
- class hwtLib.cesnet.mi32.intf.Mi32Agent(sim: HdlSimulator, intf: Mi32, allowNoReset=False)[source]¶
Bases:
SyncAgentBase
Simulation agent for Mi32 bus interface
- Variables
~.requests – request data, items are tuples (READ, address) or (WRITE, address, data, be_mask)
~.rData – data read from interface
- __init__(sim: HdlSimulator, intf: Mi32, allowNoReset=False)[source]¶
- Parameters
rst – tuple (rst signal, rst_negated flag)
- getMonitors()[source]¶
Called before simulation to collect all monitors of interfaces from this agent
- property r_data¶
- property requests¶
hwtLib.cesnet.mi32.mi32SimMemSpaceMaster module¶
- class hwtLib.cesnet.mi32.mi32SimMemSpaceMaster.Mi32SimMemSpaceMaster(bus, registerMap)[source]¶
Bases:
AbstractMemSpaceMaster
Controller of BramPort simulation agent which keeps track of transactions and allows struct like data access
- Variables
~.req – request data, items are tuples (READ, address) or (WRITE, address, data, be_mask)
hwtLib.cesnet.mi32.sim_ram module¶
hwtLib.cesnet.mi32.sliding_window module¶
- class hwtLib.cesnet.mi32.sliding_window.Mi32SlidingWindow(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Address space window + offset register which allows to address bigger address space than available on input interface due size of its address signal
- Variables
~.WINDOW_SIZE – size of window to “m” interface also the address of offset register
- HDL params
DATA_WIDTH - default value 32 of type int
ADDR_WIDTH - default value 32 of type int
M_ADDR_WIDTH - default value 33 of type int
WINDOW_SIZE - default value 4096 of type int
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
m - of type hwtLib.cesnet.mi32.intf.Mi32 - MASTER
s - of type hwtLib.cesnet.mi32.intf.Mi32 - SLAVE
hwtLib.cesnet.mi32.to_axi4Lite module¶
- class hwtLib.cesnet.mi32.to_axi4Lite.Mi32_to_Axi4Lite(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Bridge from MI32 interface to AxiLite interface
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_WIDTH - default value 64 of type int
- HDL IO
clk - of type hwt.interfaces.std.Clk with dtype=<Bits, 1bit> - SLAVE
rst_n - of type hwt.interfaces.std.Rst_n with dtype=<Bits, 1bit> - SLAVE
m - of type hwtLib.amba.axi4Lite.Axi4Lite - MASTER
s - of type hwtLib.cesnet.mi32.intf.Mi32 - SLAVE