|
CIRCT 22.0.0git
|
Represents either the top level or an instance of a hardware module. More...
#include <Design.h>


Public Member Functions | |
| HWModule (const HWModule &)=delete | |
| HWModule & | operator= (const HWModule &)=delete |
| 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.
|
delete |
|
protected |
Definition at line 42 of file Design.cpp.
|
virtualdefault |
Access the module's children by ID.
Definition at line 71 of file Design.h.
References childIndex.
Referenced by aggregateHostmemBandwidthTest(), callbackTest(), coordTranslateTest(), hostmemReadBandwidthTest(), hostmemReadTest(), hostmemWriteBandwidthTest(), hostmemWriteTest(), loopbackAddTest(), NB_MODULE(), printInstance(), streamingAddTest(), and streamingAddTranslatedTest().
|
inline |
Get a vector of the module's children in a deterministic order.
Definition at line 64 of file Design.h.
References children.
Referenced by printInstance().
|
inline |
Access the module's metadata, if any.
Definition at line 62 of file Design.h.
References info.
Referenced by NB_MODULE().
|
inline |
Access the module's ports by ID.
Definition at line 80 of file Design.h.
References portIndex.
Referenced by NB_MODULE(), printInstance(), and resolvePort().
|
inline |
Get the module's ports in a deterministic order.
Definition at line 73 of file Design.h.
References ports.
Referenced by printInstance().
|
inline |
Access the services provided by this module.
Definition at line 82 of file Design.h.
References services.
Referenced by NB_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(), dmaWriteTest(), and esi::services::TelemetryService::getMMIORegion().
Definition at line 103 of file Design.h.
Referenced by getChildren(), and resolveInst().
|
protected |
Definition at line 102 of file Design.h.
Referenced by getChildrenOrdered(), and poll().
|
protected |
|
protected |
Definition at line 106 of file Design.h.
Referenced by getPorts().
|
protected |
Definition at line 105 of file Design.h.
Referenced by getPortsOrdered(), poll(), and resolvePort().
|
protected |
Definition at line 104 of file Design.h.
Referenced by getServices().