16 #ifndef SST_CORE_CORETEST_SUBCOMPONENT_H
17 #define SST_CORE_CORETEST_SUBCOMPONENT_H
19 #include "sst/core/component.h"
20 #include "sst/core/link.h"
21 #include "sst/core/subcomponent.h"
26 namespace CoreTestSubComponent {
49 virtual void clock(SST::Cycle_t) {}
58 SST_ELI_DOCUMENT_PARAMS(
59 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"}
62 SST_ELI_DOCUMENT_PORTS(
63 {
"test",
"Just a test port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
66 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
79 SST_ELI_REGISTER_COMPONENT(
83 SST_ELI_ELEMENT_VERSION(1,0,0),
84 "Demonstrates subcomponents",
85 COMPONENT_CATEGORY_UNCATEGORIZED
88 SST_ELI_DOCUMENT_PARAMS(
89 {
"clock",
"Clock Rate",
"1GHz"},
90 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
91 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
94 SST_ELI_DOCUMENT_STATISTICS(
95 {
"totalSent",
"# of total messages sent",
"", 1},
99 SST_ELI_DOCUMENT_PORTS(
100 {
"port%d",
"Sending or Receiving Port(s)", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
103 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
104 {
"mySubComp",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
110 bool tick(SST::Cycle_t);
111 std::vector<SubCompInterface*> subComps;
118 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
122 SST_ELI_ELEMENT_VERSION(1,0,0),
123 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
127 SST_ELI_DOCUMENT_PARAMS(
128 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""}
132 SST_ELI_DOCUMENT_PORTS(
133 {
"slot_port%d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
136 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
137 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
141 std::vector<SubCompInterface*> subComps;
146 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
160 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
164 SST_ELI_ELEMENT_VERSION(1,0,0),
165 "Default Subcomponent for ELI testing only",
169 SST_ELI_DOCUMENT_PARAMS(
170 {
"port_name",
"Name of port to connect to",
""},
171 {
"sendCount",
"Number of Messages to Send",
"10"}
174 SST_ELI_DOCUMENT_PORTS(
175 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
179 {
"slot_port%d",
"This is just a test port that duplicates a port from the SubComponent that will instance it", {
"",
"" } },
182 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
185 SST_ELI_DOCUMENT_STATISTICS(
186 {
"numRecv",
"# of msgs recv",
"", 1},
198 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
202 SST_ELI_ELEMENT_VERSION(1,0,0),
203 "Sending Subcomponent",
207 SST_ELI_DOCUMENT_PARAMS(
210 SST_ELI_DOCUMENT_STATISTICS(
211 SST_ELI_DELETE_STAT(
"numRecv"),
212 {
"numSent",
"# of msgs sent",
"", 1},
215 SST_ELI_DOCUMENT_PORTS(
216 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
219 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
220 {
"test_slot",
"Test slot",
"" }
232 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
242 SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(
246 SST_ELI_ELEMENT_VERSION(1,0,0),
247 "Receiving Subcomponent",
252 SST_ELI_DOCUMENT_PARAMS(
253 SST_ELI_DELETE_PARAM(
"sendCount")
256 SST_ELI_DOCUMENT_STATISTICS(
259 SST_ELI_DOCUMENT_PORTS(
260 SST_ELI_DELETE_PORT(
"sendPort"),
261 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
264 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
265 SST_ELI_DELETE_SUBCOMPONENT_SLOT(
"test_slot")
284 #endif // SST_CORE_CORETEST_SUBCOMPONENT_H
Definition: coreTest_SubComponent.h:41
Definition: coreTest_SubComponent.h:153
Main component object for the simulation.
Definition: component.h:30
Definition: coreTest_SubComponent.h:194
Definition: coreTest_SubComponent.h:52
Definition: coreTest_SubComponent.h:75
Parameter store.
Definition: params.h:55
Definition: coreTest_SubComponent.h:115
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:32
Definition: coreTest_SubComponent.h:237