CIRCT 21.0.0git
|
Represents either the top level or an instance of a hardware module. More...
#include <Design.h>
Public Member Functions | |
virtual | ~HWModule ()=default |
std::optional< ModuleInfo > | getInfo () const |
Access the module's metadata, if any. | |
std::vector< const Instance * > | getChildrenOrdered () const |
Get a vector of the module's children in a deterministic order. | |
const std::map< AppID, Instance * > & | getChildren () const |
Access the module's children by ID. | |
std::vector< std::reference_wrapper< BundlePort > > | getPortsOrdered () const |
Get the module's ports in a deterministic order. | |
const std::map< AppID, BundlePort & > & | getPorts () const |
Access the module's ports by ID. | |
const std::vector< services::Service * > & | getServices () const |
Access the services provided by this module. | |
bool | poll () |
Master poll method. | |
const HWModule * | resolveInst (const AppIDPath &path, AppIDPath &lastLookup) const |
Attempt to resolve a path to a module instance. | |
BundlePort * | resolvePort (const AppIDPath &path, AppIDPath &lastLookup) const |
Attempt to resolve a path to a port. | |
Protected Member Functions | |
HWModule (std::optional< ModuleInfo > info, std::vector< std::unique_ptr< Instance > > children, std::vector< services::Service * > services, std::vector< std::unique_ptr< BundlePort > > &ports) | |
Protected Attributes | |
const std::optional< ModuleInfo > | info |
const std::vector< std::unique_ptr< Instance > > | children |
const std::map< AppID, Instance * > | childIndex |
const std::vector< services::Service * > | services |
const std::vector< std::unique_ptr< BundlePort > > | ports |
const std::map< AppID, BundlePort & > | portIndex |
Represents either the top level or an instance of a hardware module.
|
protected |
Definition at line 42 of file Design.cpp.
|
virtualdefault |
Access the module's children by ID.
Definition at line 67 of file Design.h.
References childIndex.
Referenced by hostmemTest(), and PYBIND11_MODULE().
|
inline |
Get a vector of the module's children in a deterministic order.
Definition at line 60 of file Design.h.
References children.
Referenced by printInstance().
|
inline |
Access the module's metadata, if any.
Definition at line 58 of file Design.h.
References info.
Referenced by PYBIND11_MODULE().
|
inline |
Access the module's ports by ID.
Definition at line 76 of file Design.h.
References portIndex.
Referenced by PYBIND11_MODULE(), registerCallbacks(), and resolvePort().
|
inline |
Get the module's ports in a deterministic order.
Definition at line 69 of file Design.h.
References ports.
Referenced by printInstance().
|
inline |
Access the services provided by this module.
Definition at line 78 of file Design.h.
References services.
Referenced by PYBIND11_MODULE().
bool esi::HWModule::poll | ( | ) |
Master poll method.
Calls the poll
method on all locally owned ports and the master poll
method on all of the children. Returns true if any of the poll
calls returns true.
Definition at line 50 of file Design.cpp.
const HWModule * esi::HWModule::resolveInst | ( | const AppIDPath & | path, |
AppIDPath & | lastLookup | ||
) | const |
Attempt to resolve a path to a module instance.
If a child is not found, return null and set lastLookup to the path which wasn't found.
Definition at line 59 of file Design.cpp.
References childIndex.
Referenced by resolvePort().
BundlePort * esi::HWModule::resolvePort | ( | const AppIDPath & | path, |
AppIDPath & | lastLookup | ||
) | const |
Attempt to resolve a path to a port.
If a child or port is not found, return null and set lastLookup to the path which wasn't found.
Definition at line 72 of file Design.cpp.
References getPorts(), ports, and resolveInst().
Referenced by bandwidthReadTest(), bandwidthWriteTest(), dmaReadTest(), and dmaWriteTest().
Definition at line 99 of file Design.h.
Referenced by getChildren(), and resolveInst().
|
protected |
Definition at line 98 of file Design.h.
Referenced by getChildrenOrdered(), and poll().
|
protected |
|
protected |
Definition at line 102 of file Design.h.
Referenced by getPorts().
|
protected |
Definition at line 101 of file Design.h.
Referenced by getPortsOrdered(), poll(), and resolvePort().
|
protected |
Definition at line 100 of file Design.h.
Referenced by getServices().