hwt.interfaces.agents package¶
This package contains a UVM like simulation agents to handle IO between circuit running in simulator and the code which drives the simulation.
Submodules¶
hwt.interfaces.agents.bramPort module¶
-
class
hwt.interfaces.agents.bramPort.
BramPortAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf)[source]¶ Bases:
hwt.interfaces.agents.bramPort.BramPort_withoutClkAgent
-
class
hwt.interfaces.agents.bramPort.
BramPort_withoutClkAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
A simulation agent for BramPort_withoutClk interface In slave mode acts as a memory, in master mode dispathes requests stored in “requests” dequeu
Variables: - requests – list of tuples (request type, address, [write data]) - used for driver
- data – list of data in memory, used for monitor
- mem – if agent is in monitor mode (= is slave) all reads and writes are performed on mem object
-
__init__
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf)[source]¶ Parameters: rst – tuple (rst signal, rst_negated flag)
hwt.interfaces.agents.fifo module¶
-
class
hwt.interfaces.agents.fifo.
FifoReaderAgent
(sim, intf, allowNoReset=False)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
Simulation agent for FifoReader interface
-
__init__
(sim, intf, allowNoReset=False)[source]¶ Parameters: rst – tuple (rst signal, rst_negated flag)
-
-
class
hwt.interfaces.agents.fifo.
FifoWriterAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
Simulation agent for FifoWriter interface
-
__init__
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]¶ Parameters: rst – tuple (rst signal, rst_negated flag)
-
hwt.interfaces.agents.handshaked module¶
-
class
hwt.interfaces.agents.handshaked.
HandshakeSyncAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: Handshaked, allowNoReset=False)[source]¶ Bases:
hwt.interfaces.agents.handshaked.HandshakedAgent
Simulation/verification agent for HandshakedSycn interface
Attention: there is no data channel on this interface it is synchronization only and it actually does not have any meaningful data collected data in monitor mode are just values of simulation time when item was collected
-
class
hwt.interfaces.agents.handshaked.
HandshakedAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: Handshaked, allowNoReset=False)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
,hwtSimApi.agents.handshaked.HandshakedAgent
Simulation/verification agent for
hwt.interfaces.std.Handshaked
interface there is onMonitorReady(simulator) and onDriverWriteAck(simulator) unimplemented method which can be used for interfaces with bi-directional data streamsNote: 2-phase (xor) handshake Attention: requires clk and rst/rstn signal ( If you do not have any create simulation wrapper with it. Without it you can very easily end up with a combinational loop.)
-
class
hwt.interfaces.agents.handshaked.
HandshakedReadListener
(hsAgent: hwt.interfaces.agents.handshaked.HandshakedAgent)[source]¶ Bases:
object
-
class
hwt.interfaces.agents.handshaked.
UniversalHandshakedAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: Handshaked, allowNoReset=False)[source]¶ Bases:
hwt.interfaces.agents.handshaked.HandshakedAgent
Same thing like
hwt.interfaces.agents.handshaked.HandshakedAgent
just the get_data/set_data method is predefined to use a tuple constructed from signals available on this interface.Variables: - _signals – tuple of data signals of this interface (excluding ready and valid signal)
- _sigCnt – len(_signals)
hwt.interfaces.agents.rdSynced module¶
-
class
hwt.interfaces.agents.rdSynced.
RdSyncedAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf, allowNoReset=True)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
Simulation/verification agent for RdSynced interface
hwt.interfaces.agents.regCntrl module¶
hwt.interfaces.agents.signal module¶
-
class
hwt.interfaces.agents.signal.
SignalAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: Signal, delay=None)[source]¶ Bases:
hwt.simulator.agentBase.SyncAgentBase
Agent for signal interface, it can use clock and reset interface for synchronization or can be synchronized by delay
Attention: clock synchronization has higher priority -
__init__
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: Signal, delay=None)[source]¶ Parameters: rst – tuple (rst signal, rst_negated flag)
-
hwt.interfaces.agents.structIntf module¶
-
class
hwt.interfaces.agents.structIntf.
StructIntfAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf)[source]¶ Bases:
hwtSimApi.agents.base.AgentBase
Agent for StructIntf interface
Summary: only purpose is to instantiate agents for child interfaces -
__init__
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
hwt.interfaces.agents.tuleWithCallback module¶
hwt.interfaces.agents.unionIntf module¶
hwt.interfaces.agents.universalComposite module¶
-
class
hwt.interfaces.agents.universalComposite.
UniversalCompositeAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: hwt.synthesizer.interface.Interface)[source]¶ Bases:
hwtSimApi.agents.base.AgentBase
Composite agent which just instantiates agents for every subinterface
-
__init__
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf: hwt.synthesizer.interface.Interface)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
hwt.interfaces.agents.vldSynced module¶
-
class
hwt.interfaces.agents.vldSynced.
VldSyncedAgent
(sim: hwtSimApi.hdlSimulator.HdlSimulator, intf, allowNoReset=False)[source]¶