hwtLib.xilinx.ipif package¶
IPIF (IP IC) interface is simple bus interface used as a service bus in FPGA designs
Submodules¶
hwtLib.xilinx.ipif.axi4Lite_to_ipif module¶
- class hwtLib.xilinx.ipif.axi4Lite_to_ipif.Axi4Lite_to_Ipif(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Bridge from AxiLite interface to IPIF interface
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_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
s - of type hwtLib.amba.axi4Lite.Axi4Lite - SLAVE
m - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
hwtLib.xilinx.ipif.buff module¶
- class hwtLib.xilinx.ipif.buff.IpifBuff(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusBridge
Register or fifo for IPIF interface, used to break critical paths and buffer transactions
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_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.xilinx.ipif.intf.Ipif - SLAVE
m - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
hwtLib.xilinx.ipif.endpoint module¶
- class hwtLib.xilinx.ipif.endpoint.IpifEndpoint(structTemplate, intfCls=<class 'hwtLib.xilinx.ipif.intf.Ipif'>, shouldEnterFn=None)[source]¶
Bases:
BusEndpoint
Delegate request from bus to fields of structure
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_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.xilinx.ipif.intf.Ipif - SLAVE
decoded - of type hwt.interfaces.structIntf.StructIntf with dtype=struct { <Bits, 32bits, unsigned> field0 <Bits, 32bits, unsigned> field1 <Bits, 32bits, unsigned>[32] bramMapped } - MASTER
- __init__(structTemplate, intfCls=<class 'hwtLib.xilinx.ipif.intf.Ipif'>, 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.xilinx.ipif.interconnectMatrix module¶
- class hwtLib.xilinx.ipif.interconnectMatrix.IpifInterconnectMatrix(hdl_name_override: Optional[str] = None)[source]¶
Bases:
BusInterconnect
Simple matrix interconnect for IPIF 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
ADDR_WIDTH - default value 32 of type int
DATA_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
s_0 - of type hwtLib.xilinx.ipif.intf.Ipif - SLAVE
m_0 - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
m_1 - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
m_2 - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
m_3 - of type hwtLib.xilinx.ipif.intf.Ipif - MASTER
hwtLib.xilinx.ipif.intf module¶
- class hwtLib.xilinx.ipif.intf.Ipif(masterDir=DIRECTION.OUT, hdl_name: Optional[Union[str, Dict[str, str]]] = None, loadConfig=True)[source]¶
Bases:
Interface
IPIF - IP interface is interface which was often used in designs for Xilinx FPGAs around year 2012
shared address, validity signals, mask, write ack
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_WIDTH - default value 32 of type int
- HDL IO
bus2ip_cs - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
bus2ip_rnw - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
bus2ip_addr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
bus2ip_data - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
bus2ip_be - of type hwt.interfaces.std.Signal with dtype=<Bits, 4bits> - MASTER
ip2bus_data - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - SLAVE (Master=IN)
ip2bus_wrack - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
ip2bus_rdack - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
ip2bus_error - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
- READ = 1¶
- WRITE = 0¶
- class hwtLib.xilinx.ipif.intf.IpifAgent(sim: HdlSimulator, intf, allowNoReset=True)[source]¶
Bases:
SyncAgentBase
- Variables
~.requests – list of tuples (READ, address) or (WRITE, address, data, mask) used for driver
~.r_data – list of read data for driver
~.mem – if agent is in monitor mode (= is slave) all reads and writes are performed on mem object, index is word index
~.actual – actual request which is performed (in driver mode)
- Note
this behavior can be overriden by onRead/onWrite methods
- class hwtLib.xilinx.ipif.intf.IpifAgentState(value)[source]¶
Bases:
Enum
An enumeration.
- IDLE = 0¶
- READ = 1¶
- WRITE = 2¶
- class hwtLib.xilinx.ipif.intf.IpifWithCE(masterDir=DIRECTION.OUT, hdl_name: Optional[Union[str, Dict[str, str]]] = None, loadConfig=True)[source]¶
Bases:
Ipif
- HDL params
ADDR_WIDTH - default value 32 of type int
DATA_WIDTH - default value 32 of type int
REG_COUNT - default value 1 of type int
- HDL IO
bus2ip_cs - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
bus2ip_rnw - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
bus2ip_addr - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
bus2ip_data - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - MASTER
bus2ip_be - of type hwt.interfaces.std.Signal with dtype=<Bits, 4bits> - MASTER
ip2bus_data - of type hwt.interfaces.std.Signal with dtype=<Bits, 32bits> - SLAVE (Master=IN)
ip2bus_wrack - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
ip2bus_rdack - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
ip2bus_error - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - SLAVE (Master=IN)
bus2ip_rdce - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
bus2ip_wrce - of type hwt.interfaces.std.Signal with dtype=<Bits, 1bit> - MASTER
- _ag: Optional[AgentBase]¶
- _associatedClk: Optional[Interface]¶
- _associatedRst: Optional[Interface]¶
- _ctx: Optional[RtlNetlist]¶
- _direction: INTF_DIRECTION¶
- _hdl_port: Optional[HdlPortItem]¶
- _masterDir: DIRECTION¶
- _name: Optional[str]¶
- _parent: Optional['Unit']¶
- _setAttrListener: Optional[Callable[[str, object], None]]¶
hwtLib.xilinx.ipif.simMaster module¶
- class hwtLib.xilinx.ipif.simMaster.IPFISimMaster(bus, registerMap)[source]¶
Bases:
AbstractMemSpaceMaster
Controller of IPIF simulation agent which keeps track of transactions and allows struct like data access