Wrapper¶
Wrapper
is an abstraction over entities that have ports. Examples include IP cores written in Verilog/VHDL, cores written in Amaranth and hierarchical collections for these that expose some external ports.
Subclasses of this class have to supply an implementation of the property get_ports()
, which has to return a list of all ports in the entity.
- class Wrapper(*args, src_loc_at=0, **kwargs)¶
Base class for modules that want to connect to each other.
Derived classes must implement get_ports method that returns a list of WrapperPort’s - external ports of a class that can be used as endpoints for connections.
- __init__(name: str)¶
- get_port_by_name(name: str) WrapperPort ¶
Given port’s name, return the port as WrapperPort object.
- Raises:¶
ValueError – If such port doesn’t exist.
- get_ports() List[WrapperPort] ¶
Return a list of external ports.
- get_ports_of_interface(iface_name: str) List[WrapperPort] ¶
Return a list of ports of specific interface.
- Raises:¶
ValueError – if such interface doesn’t exist.