16 #ifndef _CORETESTSUBCOMPONENT_H
17 #define _CORETESTSUBCOMPONENT_H
21 #include <sst/core/component.h>
22 #include <sst/core/subcomponent.h>
23 #include <sst/core/link.h>
26 namespace CoreTestSubComponent {
55 virtual void clock(SST::Cycle_t) {}
69 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
73 SST_ELI_ELEMENT_VERSION(1,0,0),
74 "Default implementation of SubCompInterface",
88 SST_ELI_ELEMENT_VERSION(1,0,0),
89 "Demonstrates subcomponents",
90 COMPONENT_CATEGORY_UNCATEGORIZED
93 SST_ELI_DOCUMENT_PARAMS(
94 {
"clock",
"Clock Rate",
"1GHz"},
95 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
96 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
99 SST_ELI_DOCUMENT_STATISTICS(
100 {
"totalSent",
"# of total messages sent",
"", 1},
104 SST_ELI_DOCUMENT_PORTS(
105 {
"port%(num_subcomps)d",
"Sending or Receiving Port(s)", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
108 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
109 {
"mySubComp",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
116 bool tick(SST::Cycle_t);
117 std::vector<SubCompInterface*> subComps;
128 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
132 SST_ELI_ELEMENT_VERSION(1,0,0),
133 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
138 SST_ELI_DOCUMENT_PARAMS(
139 {
"sendCount",
"Number of Messages to Send",
"10"},
140 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
141 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
144 SST_ELI_DOCUMENT_STATISTICS(
148 SST_ELI_DOCUMENT_PORTS(
149 {
"slot_port%(num_subcomps)d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
152 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
153 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
158 std::vector<SubCompInterface*> subComps;
165 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
181 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
185 SST_ELI_ELEMENT_VERSION(1,0,0),
186 "Sending Subcomponent",
190 SST_ELI_DOCUMENT_PARAMS(
191 {
"port_name",
"Name of port to connect to",
""},
192 {
"sendCount",
"Number of Messages to Send",
"10"},
195 SST_ELI_DOCUMENT_STATISTICS(
196 {
"numSent",
"# of msgs sent",
"", 1},
199 SST_ELI_DOCUMENT_PORTS(
200 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
204 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
217 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
230 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
234 SST_ELI_ELEMENT_VERSION(1,0,0),
235 "Receiving Subcomponent",
241 SST_ELI_DOCUMENT_PARAMS(
244 SST_ELI_DOCUMENT_STATISTICS(
245 {
"numRecv",
"# of msgs recv",
"", 1},
248 SST_ELI_DOCUMENT_PORTS(
249 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
253 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
Definition: coreTest_SubComponent.h:45
Main component object for the simulation.
Definition: component.h:31
Definition: coreTest_SubComponent.h:176
Definition: coreTest_SubComponent.h:81
Parameter store.
Definition: params.h:44
Definition: coreTest_SubComponent.h:124
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:31
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition: subcomponent.h:29
Link between two components.
Definition: link.h:32
Definition: coreTest_SubComponent.h:224