IPWrapper class

IPWrapper provides an abstraction over a raw HDL source file. Instances of this class can be created from a loaded YAML IP-core description.

Under the hood it will create Amaranth’s Instance object during elaboration, referencing a particular HDL module and it will appear as a module instantiation in the generated toplevel. Ports and interfaces (lists of ports) can be retrieved via standard methods of Wrapper. These are instances of WrapperPorts.

../_images/wrapper.png
class IPWrapper(*args, src_loc_at=0, **kwargs)

This class instantiates an IP in a wrapper to use its individual ports or grouped ports as interfaces.

__init__(yaml_path: Path, ip_name: str, instance_name: str, params={})
Parameters:
yaml_path: Path

path to the IP Core description yaml file

ip_name: str

name of the module to wrap

instance_name: str

name of this instance

params={}

optional, HDL parameters of this instance

get_ports() List[WrapperPort]

Return a list of all ports that belong to this IP.


Last update: 2024-11-12