CIRCT  20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
esi::HWModule Class Reference

Represents either the top level or an instance of a hardware module. More...

#include <Design.h>

Inheritance diagram for esi::HWModule:
Inheritance graph
[legend]
Collaboration diagram for esi::HWModule:
Collaboration graph
[legend]

Public Member Functions

virtual ~HWModule ()=default
 
std::optional< ModuleInfogetInfo () const
 Access the module's metadata, if any. More...
 
std::vector< const Instance * > getChildrenOrdered () const
 Get a vector of the module's children in a deterministic order. More...
 
const std::map< AppID, Instance * > & getChildren () const
 Access the module's children by ID. More...
 
std::vector< std::reference_wrapper< BundlePort > > getPortsOrdered () const
 Get the module's ports in a deterministic order. More...
 
const std::map< AppID, const BundlePort & > & getPorts () const
 Access the module's ports by ID. More...
 
const std::vector< services::Service * > & getServices () const
 Access the services provided by this module. More...
 
bool poll ()
 Master poll method. More...
 

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< ModuleInfoinfo
 
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, const BundlePort & > portIndex
 

Detailed Description

Represents either the top level or an instance of a hardware module.

Definition at line 47 of file Design.h.

Constructor & Destructor Documentation

◆ HWModule()

esi::HWModule::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

Definition at line 42 of file Design.cpp.

◆ ~HWModule()

virtual esi::HWModule::~HWModule ( )
virtualdefault

Member Function Documentation

◆ getChildren()

const std::map<AppID, Instance *>& esi::HWModule::getChildren ( ) const
inline

Access the module's children by ID.

Definition at line 67 of file Design.h.

References childIndex.

Referenced by PYBIND11_MODULE().

◆ getChildrenOrdered()

std::vector<const Instance *> esi::HWModule::getChildrenOrdered ( ) const
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().

◆ getInfo()

std::optional<ModuleInfo> esi::HWModule::getInfo ( ) const
inline

Access the module's metadata, if any.

Definition at line 58 of file Design.h.

References info.

Referenced by PYBIND11_MODULE().

◆ getPorts()

const std::map<AppID, const BundlePort &>& esi::HWModule::getPorts ( ) const
inline

Access the module's ports by ID.

Definition at line 76 of file Design.h.

References portIndex.

Referenced by dmaTest(), PYBIND11_MODULE(), and registerCallbacks().

◆ getPortsOrdered()

std::vector<std::reference_wrapper<BundlePort> > esi::HWModule::getPortsOrdered ( ) const
inline

Get the module's ports in a deterministic order.

Definition at line 69 of file Design.h.

References ports.

Referenced by printInstance().

◆ getServices()

const std::vector<services::Service *>& esi::HWModule::getServices ( ) const
inline

Access the services provided by this module.

Definition at line 80 of file Design.h.

References services.

Referenced by PYBIND11_MODULE().

◆ poll()

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.

References children, and ports.

Referenced by esi::AcceleratorServiceThread::addPoll().

Member Data Documentation

◆ childIndex

const std::map<AppID, Instance *> esi::HWModule::childIndex
protected

Definition at line 92 of file Design.h.

Referenced by getChildren().

◆ children

const std::vector<std::unique_ptr<Instance> > esi::HWModule::children
protected

Definition at line 91 of file Design.h.

Referenced by getChildrenOrdered(), and poll().

◆ info

const std::optional<ModuleInfo> esi::HWModule::info
protected

Definition at line 90 of file Design.h.

Referenced by getInfo().

◆ portIndex

const std::map<AppID, const BundlePort &> esi::HWModule::portIndex
protected

Definition at line 95 of file Design.h.

Referenced by getPorts().

◆ ports

const std::vector<std::unique_ptr<BundlePort> > esi::HWModule::ports
protected

Definition at line 94 of file Design.h.

Referenced by getPortsOrdered(), and poll().

◆ services

const std::vector<services::Service *> esi::HWModule::services
protected

Definition at line 93 of file Design.h.

Referenced by getServices().


The documentation for this class was generated from the following files: