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);
128 bool tick(SST::Cycle_t);
129 std::vector<SubCompInterface*> subComps;
136 SST_ELI_REGISTER_SUBCOMPONENT(
140 SST_ELI_ELEMENT_VERSION(1,0,0),
141 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
145 SST_ELI_DOCUMENT_PARAMS(
146 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
147 {
"verbose",
"Verbosity level",
"0"},
151 SST_ELI_DOCUMENT_PORTS(
152 {
"slot_port%d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
155 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
156 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
162 SubCompSlotInterface::serialize_order(ser);
168 std::vector<SubCompInterface*> subComps;
173 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
176 void clock(Cycle_t)
override;
187 SST_ELI_REGISTER_SUBCOMPONENT(
191 SST_ELI_ELEMENT_VERSION(1,0,0),
192 "Default Subcomponent for ELI testing only",
196 SST_ELI_DOCUMENT_PARAMS(
197 {
"port_name",
"Name of port to connect to",
""},
198 {
"sendCount",
"Number of Messages to Send",
"10"},
199 {
"verbose",
"Verbosity level",
"0"}
202 SST_ELI_DOCUMENT_PORTS(
203 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
207 {
"slot_port%d",
"This is just a test port that duplicates a port from the SubComponent that will instance it", {
"",
"" } },
210 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
213 SST_ELI_DOCUMENT_STATISTICS(
214 {
"numRecv",
"# of msgs recv",
"", 1},
231 SST_ELI_REGISTER_SUBCOMPONENT(
235 SST_ELI_ELEMENT_VERSION(1,0,0),
236 "Sending Subcomponent",
240 SST_ELI_DOCUMENT_PARAMS(
243 SST_ELI_DOCUMENT_STATISTICS(
244 SST_ELI_DELETE_STAT(
"numRecv"),
245 {
"numSent",
"# of msgs sent",
"", 1},
248 SST_ELI_DOCUMENT_PORTS(
249 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
252 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
253 {
"test_slot",
"Test slot",
"" }
259 SubCompSendRecvInterface::serialize_order(ser);
263 SST_SER(totalMsgSent)
278 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
280 void clock(Cycle_t)
override;
288 SST_ELI_REGISTER_SUBCOMPONENT(
292 SST_ELI_ELEMENT_VERSION(1,0,0),
293 "Receiving Subcomponent",
298 SST_ELI_DOCUMENT_PARAMS(
299 SST_ELI_DELETE_PARAM(
"sendCount")
302 SST_ELI_DOCUMENT_STATISTICS(
305 SST_ELI_DOCUMENT_PORTS(
306 SST_ELI_DELETE_PORT(
"sendPort"),
307 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
310 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
311 SST_ELI_DELETE_SUBCOMPONENT_SLOT(
"test_slot")
317 SubCompSendRecvInterface::serialize_order(ser);
319 SST_SER(nMsgReceived)
335 void clock(Cycle_t)
override;
341 #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:43
Definition: coreTest_SubComponent.h:37
Definition: coreTest_SubComponent.h:180
Main component object for the simulation.
Definition: component.h:30
Definition: coreTest_SubComponent.h:227
Definition: coreTest_SubComponent.h:55
Definition: coreTest_SubComponent.h:82
Parameter store.
Definition: params.h:55
Definition: coreTest_SubComponent.h:133
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:51
Definition: coreTest_SubComponent.h:283