12 #ifndef SST_CORE_CORETEST_SUBCOMPONENT_H 13 #define SST_CORE_CORETEST_SUBCOMPONENT_H 15 #include "sst/core/component.h" 16 #include "sst/core/link.h" 17 #include "sst/core/subcomponent.h" 51 Event::serialize_order(ser);
73 virtual void clock(SST::Cycle_t) {}
77 SST::SubComponent::serialize_order(ser);
88 SST_ELI_DOCUMENT_PARAMS(
89 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"}
92 SST_ELI_DOCUMENT_PORTS(
93 {
"test",
"Just a test port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
96 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
117 SST_ELI_REGISTER_COMPONENT(
120 "SubComponentLoader",
121 SST_ELI_ELEMENT_VERSION(1,0,0),
122 "Demonstrates subcomponents",
123 COMPONENT_CATEGORY_UNCATEGORIZED
126 SST_ELI_DOCUMENT_PARAMS(
127 {
"clock",
"Clock Rate",
"1GHz"},
128 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
129 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
130 {
"verbose",
"Verbosity level",
"0"},
133 SST_ELI_DOCUMENT_STATISTICS(
134 {
"totalSent",
"# of total messages sent",
"", 1},
138 SST_ELI_DOCUMENT_PORTS(
139 {
"port%d",
"Sending or Receiving Port(s)", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
142 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
143 {
"mySubComp",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
146 SST_ELI_IS_CHECKPOINTABLE()
153 SST::Component::serialize_order(ser);
161 bool tick(SST::Cycle_t);
162 std::vector<SubCompInterface*> subComps;
169 SST_ELI_REGISTER_SUBCOMPONENT(
173 SST_ELI_ELEMENT_VERSION(1,0,0),
174 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
178 SST_ELI_DOCUMENT_PARAMS(
179 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
180 {
"verbose",
"Verbosity level",
"0"},
184 SST_ELI_DOCUMENT_PORTS(
185 {
"slot_port%d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
188 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
189 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
192 SST_ELI_IS_CHECKPOINTABLE()
197 SubCompSlotInterface::serialize_order(ser);
203 std::vector<SubCompInterface*> subComps;
208 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
211 void clock(Cycle_t)
override;
222 SST_ELI_REGISTER_SUBCOMPONENT(
226 SST_ELI_ELEMENT_VERSION(1,0,0),
227 "Default Subcomponent for ELI testing only",
231 SST_ELI_DOCUMENT_PARAMS(
232 {
"port_name",
"Name of port to connect to",
""},
233 {
"sendCount",
"Number of Messages to Send",
"10"},
234 {
"verbose",
"Verbosity level",
"0"}
237 SST_ELI_DOCUMENT_PORTS(
238 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
242 {
"slot_port%d",
"This is just a test port that duplicates a port from the SubComponent that will instance it", {
"",
"" } },
245 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
248 SST_ELI_DOCUMENT_STATISTICS(
249 {
"numRecv",
"# of msgs recv",
"", 1},
252 SST_ELI_IS_CHECKPOINTABLE()
271 SST_ELI_REGISTER_SUBCOMPONENT(
275 SST_ELI_ELEMENT_VERSION(1,0,0),
276 "Sending Subcomponent",
280 SST_ELI_REGISTER_ALIAS(
"SubCompSender_alias")
282 SST_ELI_DOCUMENT_PARAMS(
285 SST_ELI_DOCUMENT_STATISTICS(
286 SST_ELI_DELETE_STAT(
"numRecv"),
287 {
"numSent",
"# of msgs sent",
"", 1},
290 SST_ELI_DOCUMENT_PORTS(
291 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
294 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
295 {
"test_slot",
"Test slot",
"" }
298 SST_ELI_IS_CHECKPOINTABLE()
303 SubCompSendRecvInterface::serialize_order(ser);
307 SST_SER(totalMsgSent);
322 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
324 void clock(Cycle_t)
override;
332 SST_ELI_REGISTER_SUBCOMPONENT(
336 SST_ELI_ELEMENT_VERSION(1,0,0),
337 "Receiving Subcomponent",
341 SST_ELI_DOCUMENT_PARAMS(
342 SST_ELI_DELETE_PARAM(
"sendCount")
345 SST_ELI_DOCUMENT_STATISTICS(
348 SST_ELI_DOCUMENT_PORTS(
349 SST_ELI_DELETE_PORT(
"sendPort"),
350 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
353 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
354 SST_ELI_DELETE_SUBCOMPONENT_SLOT(
"test_slot")
357 SST_ELI_IS_CHECKPOINTABLE()
362 SubCompSendRecvInterface::serialize_order(ser);
364 SST_SER(nMsgReceived);
374 uint32_t numRecv = 0;
382 void clock(Cycle_t)
override;
387 #endif // SST_CORE_CORETEST_SUBCOMPONENT_H Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:57
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
Definition: coreTest_SubComponent.h:58
Definition: coreTest_SubComponent.h:37
Definition: coreTest_SubComponent.h:215
Main component object for the simulation.
Definition: component.h:30
Definition: coreTest_SubComponent.h:267
Definition: coreTest_SubComponent.h:82
Definition: coreTest_SubComponent.h:113
Definition: coreTest_SubComponent.h:22
Parameter store.
Definition: params.h:63
Definition: coreTest_SubComponent.h:166
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:40
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition: subcomponent.h:28
Link between two components.
Definition: link.h:56
Definition: coreTest_SubComponent.h:327