13 from typing
import Dict, List, Optional
15 from .types
import BundlePort
16 from .
import esiCppAccel
as cpp
23 """A connection to an ESI accelerator."""
25 def __init__(self, platform: str, connection_str: str):
26 self.
cpp_accelcpp_accel = cpp.AcceleratorConnection(ctxt, platform, connection_str)
29 """Get and parse the accelerator manifest."""
45 from .esiCppAccel
import HostMemOptions
49 """Represents either the top level or an instance of a hardware module."""
51 def __init__(self, parent: Optional[
"HWModule"], cpp_hwmodule: cpp.HWModule):
56 def children(self) -> Dict[cpp.AppID, "Instance"]:
59 for name, inst
in self.
cpp_hwmodulecpp_hwmodule.children.items()
63 def ports(self) -> Dict[cpp.AppID, BundlePort]:
66 for name, port
in self.
cpp_hwmodulecpp_hwmodule.ports.items()
78 """Subclass of `HWModule` which represents a submodule instance. Adds an
79 AppID, which the top level doesn't have or need."""
81 def __init__(self, parent: Optional[
"HWModule"], cpp_instance: cpp.Instance):
82 super().
__init__(parent, cpp_instance)
83 self.
cpp_hwmodulecpp_hwmodule: cpp.Instance = cpp_instance
86 def id(self) -> cpp.AppID:
91 """Root of the accelerator design hierarchy."""
93 def __init__(self, cpp_accelerator: cpp.Accelerator):
94 super().
__init__(
None, cpp_accelerator)
cpp.MMIO get_service_mmio(self)
def __init__(self, str platform, str connection_str)
cpp.SysInfo sysinfo(self)
cpp.Manifest manifest(self)
cpp.HostMem get_service_hostmem(self)
"Accelerator" build_accelerator(self)
def __init__(self, cpp.Accelerator cpp_accelerator)
Dict[cpp.AppID, BundlePort] ports(self)
Dict[cpp.AppID, "Instance"] children(self)
List[cpp.AppID] services(self)
def __init__(self, Optional["HWModule"] parent, cpp.HWModule cpp_hwmodule)
def __init__(self, Optional["HWModule"] parent, cpp.Instance cpp_instance)