13from typing
import Dict, List, Optional
15from .types
import BundlePort
16from .
import esiCppAccel
as cpp
23 """A connection to an ESI accelerator."""
25 def __init__(self, platform: str, connection_str: str):
26 self.
cpp_accel = cpp.AcceleratorConnection(ctxt, platform, connection_str)
25 def __init__(self, platform: str, connection_str: str):
…
29 """Get and parse the accelerator manifest."""
46 Return an accelerator that may be owned by this accelerator connection.
47 If no accelerator is owned, will throw.
52from .esiCppAccel
import HostMemOptions
56 """Represents either the top level or an instance of a hardware module."""
58 def __init__(self, parent: Optional[
"HWModule"], cpp_hwmodule: cpp.HWModule):
58 def __init__(self, parent: Optional[
"HWModule"], cpp_hwmodule: cpp.HWModule):
…
63 def children(self) -> Dict[cpp.AppID, "Instance"]:
63 def children(self) -> Dict[cpp.AppID, "Instance"]:
…
70 def ports(self) -> Dict[cpp.AppID, BundlePort]:
70 def ports(self) -> Dict[cpp.AppID, BundlePort]:
…
85 """Subclass of `HWModule` which represents a submodule instance. Adds an
86 AppID, which the top level doesn't have or need."""
88 def __init__(self, parent: Optional[
"HWModule"], cpp_instance: cpp.Instance):
89 super().
__init__(parent, cpp_instance)
88 def __init__(self, parent: Optional[
"HWModule"], cpp_instance: cpp.Instance):
…
93 def id(self) -> cpp.AppID:
93 def id(self) -> cpp.AppID:
…
98 """Root of the accelerator design hierarchy."""
100 def __init__(self, cpp_accelerator: cpp.Accelerator):
101 super().
__init__(
None, cpp_accelerator)
cpp.MMIO get_service_mmio(self)
cpp.SysInfo sysinfo(self)
"Accelerator" get_accelerator(self)
cpp.Manifest manifest(self)
cpp.HostMem get_service_hostmem(self)
__init__(self, str platform, str connection_str)
"Accelerator" build_accelerator(self)
__init__(self, cpp.Accelerator cpp_accelerator)
Dict[cpp.AppID, BundlePort] ports(self)
Dict[cpp.AppID, "Instance"] children(self)
__init__(self, Optional["HWModule"] parent, cpp.HWModule cpp_hwmodule)
List[cpp.AppID] services(self)
__init__(self, Optional["HWModule"] parent, cpp.Instance cpp_instance)