CIRCT 24.0.0git
Loading...
Searching...
No Matches
esiaccel.bsp.cosim Namespace Reference

Functions

Module CosimBSP (Type[Module] user_module, Optional[Tuple[Callable, Callable]] dma_engine_pair=None, Optional[Type[esi.ServiceImplementation]] channel_service=None, int max_outstanding_reads=4, int hostmem_width=64)
Module CosimBSP_DMA (Type[Module] user_module, int max_outstanding_reads=4, int hostmem_width=64)

Variables

 __root_dir__ = Path(__file__).parent.parent

Function Documentation

◆ CosimBSP()

Module esiaccel.bsp.cosim.CosimBSP ( Type[Module] user_module,
Optional[Tuple[Callable, Callable]] dma_engine_pair = None,
Optional[Type[esi.ServiceImplementation]] channel_service = None,
int max_outstanding_reads = 4,
int hostmem_width = 64 )
Wrap and return a cosimulation 'board support package' containing
'user_module'.

By default, channels use the native cosim transport. 'dma_engine_pair' is a
(to_host_gen, from_host_gen) pair used by ChannelEngineService to create one
DMA engine per channel.

For custom implementations, including engines shared by multiple channels,
'channel_service' accepts an esi.ServiceImplementation subclass, not an
instance. It must have exactly the input ports 'clk = Clock()' and
'rst = Reset()'. The BSP instantiates it with decl=None for the builtin
ChannelService and appid=esi.AppID("__channel_engines"). Its generator may
issue esi.MMIO and esi.HostMem requests, which the BSP will satisfy.

Passing both 'dma_engine_pair' and 'channel_service' raises ValueError.

'max_outstanding_reads' is the per-client limit on logical HostMem read
requests in flight. The cosim host services each read request in order, so
more than one is safe; the default of 4 keeps the multi-outstanding read path
exercised in simulation.

'hostmem_width' is the upstream HostMem read and write width in bits. It must
be a power of two and at least 8. The host runtime discovers it automatically.
Wider beats reduce transport messages for wide transfers, without combining
separate narrow requests or changing completion semantics.

Definition at line 30 of file cosim.py.

References Input, and Output.

Referenced by CosimBSP_DMA().

◆ CosimBSP_DMA()

Module esiaccel.bsp.cosim.CosimBSP_DMA ( Type[Module] user_module,
int max_outstanding_reads = 4,
int hostmem_width = 64 )
CosimBSP with one-item DMA engines; accepts the same HostMem widths.

Definition at line 232 of file cosim.py.

References CosimBSP().

Variable Documentation

◆ __root_dir__

esiaccel.bsp.cosim.__root_dir__ = Path(__file__).parent.parent
private

Definition at line 27 of file cosim.py.