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" 22 namespace CoreTestSubComponent {
46 virtual void clock(SST::Cycle_t) {}
50 SST::SubComponent::serialize_order(ser);
61 SST_ELI_DOCUMENT_PARAMS(
62 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"}
65 SST_ELI_DOCUMENT_PORTS(
66 {
"test",
"Just a test port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
69 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
86 SST_ELI_REGISTER_COMPONENT(
90 SST_ELI_ELEMENT_VERSION(1,0,0),
91 "Demonstrates subcomponents",
92 COMPONENT_CATEGORY_UNCATEGORIZED
95 SST_ELI_DOCUMENT_PARAMS(
96 {
"clock",
"Clock Rate",
"1GHz"},
97 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
98 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
99 {
"verbose",
"Verbosity level",
"0"},
102 SST_ELI_DOCUMENT_STATISTICS(
103 {
"totalSent",
"# of total messages sent",
"", 1},
107 SST_ELI_DOCUMENT_PORTS(
108 {
"port%d",
"Sending or Receiving Port(s)", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
111 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
112 {
"mySubComp",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
120 SST::Component::serialize_order(ser);
126 bool tick(SST::Cycle_t);
127 std::vector<SubCompInterface*> subComps;
134 SST_ELI_REGISTER_SUBCOMPONENT(
138 SST_ELI_ELEMENT_VERSION(1,0,0),
139 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
143 SST_ELI_DOCUMENT_PARAMS(
144 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
145 {
"verbose",
"Verbosity level",
"0"},
149 SST_ELI_DOCUMENT_PORTS(
150 {
"slot_port%d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
153 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
154 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
160 SubCompSlotInterface::serialize_order(ser);
166 std::vector<SubCompInterface*> subComps;
171 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
174 void clock(Cycle_t)
override;
185 SST_ELI_REGISTER_SUBCOMPONENT(
189 SST_ELI_ELEMENT_VERSION(1,0,0),
190 "Default Subcomponent for ELI testing only",
194 SST_ELI_DOCUMENT_PARAMS(
195 {
"port_name",
"Name of port to connect to",
""},
196 {
"sendCount",
"Number of Messages to Send",
"10"},
197 {
"verbose",
"Verbosity level",
"0"}
200 SST_ELI_DOCUMENT_PORTS(
201 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
205 {
"slot_port%d",
"This is just a test port that duplicates a port from the SubComponent that will instance it", {
"",
"" } },
208 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
211 SST_ELI_DOCUMENT_STATISTICS(
212 {
"numRecv",
"# of msgs recv",
"", 1},
229 SST_ELI_REGISTER_SUBCOMPONENT(
233 SST_ELI_ELEMENT_VERSION(1,0,0),
234 "Sending Subcomponent",
238 SST_ELI_DOCUMENT_PARAMS(
241 SST_ELI_DOCUMENT_STATISTICS(
242 SST_ELI_DELETE_STAT(
"numRecv"),
243 {
"numSent",
"# of msgs sent",
"", 1},
246 SST_ELI_DOCUMENT_PORTS(
247 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
250 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
251 {
"test_slot",
"Test slot",
"" }
257 SubCompSendRecvInterface::serialize_order(ser);
261 SST_SER(totalMsgSent)
276 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
278 void clock(Cycle_t)
override;
286 SST_ELI_REGISTER_SUBCOMPONENT(
290 SST_ELI_ELEMENT_VERSION(1,0,0),
291 "Receiving Subcomponent",
296 SST_ELI_DOCUMENT_PARAMS(
297 SST_ELI_DELETE_PARAM(
"sendCount")
300 SST_ELI_DOCUMENT_STATISTICS(
303 SST_ELI_DOCUMENT_PORTS(
304 SST_ELI_DELETE_PORT(
"sendPort"),
305 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
308 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
309 SST_ELI_DELETE_SUBCOMPONENT_SLOT(
"test_slot")
315 SubCompSendRecvInterface::serialize_order(ser);
317 SST_SER(nMsgReceived)
333 void clock(Cycle_t)
override;
339 #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:53
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Definition: coreTest_SubComponent.h:37
Definition: coreTest_SubComponent.h:178
Main component object for the simulation.
Definition: component.h:30
Definition: coreTest_SubComponent.h:225
Definition: coreTest_SubComponent.h:55
Definition: coreTest_SubComponent.h:82
Parameter store.
Definition: params.h:55
Definition: coreTest_SubComponent.h:131
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:34
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:50
Definition: coreTest_SubComponent.h:281