13 #ifndef SST_CORE_SUBCOMPONENT_H
14 #define SST_CORE_SUBCOMPONENT_H
16 #include <sst/core/component.h>
35 virtual void init(
unsigned int phase) {}
92 bool doesSubComponentInfoStatisticExist(std::string statisticName);
95 Statistic<T>* registerStatistic(std::string statName, std::string statSubId =
"")
99 if (
false == doesSubComponentInfoStatisticExist(statName)) {
100 printf(
"Error: Statistic %s name %s is not found in ElementInfoStatistic, exiting...\n",
101 StatisticBase::buildStatisticFullName(parent->
getName().c_str(), statName, statSubId).
115 TimeConverter*
registerClock( std::string freq, Clock::HandlerBase* handler);
116 TimeConverter*
registerClock(
const UnitAlgebra& freq, Clock::HandlerBase* handler);
124 Cycle_t
reregisterClock(TimeConverter *freq, Clock::HandlerBase* handler);
137 TimeConverter* registerOneShot( std::string timeDelay, OneShot::HandlerBase* handler);
138 TimeConverter* registerOneShot(
const UnitAlgebra& timeDelay, OneShot::HandlerBase* handler);
141 TimeConverter* getTimeConverter(
const std::string& base );
142 TimeConverter* getTimeConverter(
const UnitAlgebra& base );
160 Module* loadModule(std::string type, Params& params);
161 Module* loadModuleWithComponent(std::string type, Params& params);
162 SubComponent* loadSubComponent(std::string type, Params& params);
167 SharedRegion* getGlobalSharedRegion(
const std::string &key,
size_t size, SharedRegionMerger *merger = NULL);
183 #endif // SST_CORE_SUBCOMPONENT_H
virtual void finish()
Called after simulation completes, but before objects are destroyed.
Definition: subcomponent.h:41
SimTime_t getCurrentSimTimeMilli() const
Utility function to return the time since the simulation began in milliseconds.
Definition: subcomponent.cc:158
virtual void init(unsigned int phase)
Used during the init phase.
Definition: subcomponent.h:35
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:25
Main component object for the simulation.
Definition: component.h:56
Cycle_t reregisterClock(TimeConverter *freq, Clock::HandlerBase *handler)
Reactivates an existing Clock and Handler.
Definition: subcomponent.cc:108
SimTime_t getCurrentSimTimeMicro() const
Utility function to return the time since the simulation began in microseconds.
Definition: subcomponent.cc:154
SimTime_t getCurrentSimTime(TimeConverter *tc) const
return the time since the simulation began in units specified by the parameter.
Definition: subcomponent.cc:141
Forms the template defined base class for statistics gathering within SST.
Definition: statbase.h:263
bool isPortConnected(const std::string &name) const
Determine if a port name is connected to any links.
Definition: subcomponent.cc:48
Cycle_t getNextClockCycle(TimeConverter *freq)
Returns the next Cycle that the TimeConverter would fire.
Definition: subcomponent.cc:112
TimeConverter * registerClock(std::string freq, Clock::HandlerBase *handler)
Registers a clock for this component.
Definition: subcomponent.cc:96
Module is a tag class used with the loadModule function.
Definition: module.h:20
Link * configureLink(std::string name, TimeConverter *time_base, Event::HandlerBase *handler=NULL)
Configure a Link.
Definition: subcomponent.cc:54
SharedRegion * getLocalSharedRegion(const std::string &key, size_t size)
Find a lookup table.
Definition: subcomponent.cc:182
Statistic< T > * registerStatisticCore(std::string statName, std::string statSubId="")
Registers a statistic.
Definition: component.h:234
SimTime_t getCurrentSimTimeNano() const
Utility function to return the time since the simulation began in nanoseconds.
Definition: subcomponent.cc:150
void unregisterClock(TimeConverter *tc, Clock::HandlerBase *handler)
Removes a clock handler from the component.
Definition: subcomponent.cc:104
const std::string & getName() const
Returns component Name.
Definition: component.h:80
Functor classes for Event handling.
Definition: event.h:86
Link * configureSelfLink(std::string name, TimeConverter *time_base, Event::HandlerBase *handler=NULL)
Configure a SelfLink (Loopback link)
Definition: subcomponent.cc:72
virtual void setup()
Called after all components have been constructed and inialization has completed, but before simulati...
Definition: subcomponent.h:38
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition: subcomponent.h:27
Link between two components.
Definition: link.h:33