ElaboratableWrapper class

ElaboratableWrapper encapsulates an Amaranth’s Elaboratable and exposes an interface compatible with other wrappers which allows making connections with them. Supplied elaboratable must contain a signature property and a conforming interface as specified by Amaranth docs. Ports’ directionality, their names and widths are inferred from it.

class ElaboratableWrapper(*args, src_loc_at=0, **kwargs)

Allows connecting an Amaranth’s Elaboratable with other classes derived from Wrapper.

__init__(name: str, elaboratable: Elaboratable)
Parameters:
name: str

name of this wrapper

elaboratable: Elaboratable

Amaranth’s Elaboratable object to wrap

get_ports() List[WrapperPort]

Return a list of external ports.

get_ports_hier() Mapping[str, Signal | Mapping[str, Signal | SignalMapping]]

Maps elaboratable’s Signature to a nested dictionary of WrapperPorts. See _gather_signature_ports for more details.


Last update: 2024-11-12