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 {
45 virtual void clock(SST::Cycle_t) {}
54 SST_ELI_DOCUMENT_PARAMS(
55 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"}
58 SST_ELI_DOCUMENT_PORTS(
59 {
"test",
"Just a test port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
62 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
75 SST_ELI_REGISTER_COMPONENT(
79 SST_ELI_ELEMENT_VERSION(1,0,0),
80 "Demonstrates subcomponents",
81 COMPONENT_CATEGORY_UNCATEGORIZED
84 SST_ELI_DOCUMENT_PARAMS(
85 {
"clock",
"Clock Rate",
"1GHz"},
86 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""},
87 {
"num_subcomps",
"Number of anonymous SubComponents to load. Ignored if using name SubComponents.",
"1"},
90 SST_ELI_DOCUMENT_STATISTICS(
91 {
"totalSent",
"# of total messages sent",
"", 1},
95 SST_ELI_DOCUMENT_PORTS(
96 {
"port%d",
"Sending or Receiving Port(s)", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
99 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
100 {
"mySubComp",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
106 bool tick(SST::Cycle_t);
107 std::vector<SubCompInterface*> subComps;
114 SST_ELI_REGISTER_SUBCOMPONENT(
118 SST_ELI_ELEMENT_VERSION(1,0,0),
119 "Subcomponent which is just a wrapper for the actual SubComponent to be used",
123 SST_ELI_DOCUMENT_PARAMS(
124 {
"unnamed_subcomponent",
"Unnamed SubComponent to load. If empty, then a named subcomponent is loaded",
""}
128 SST_ELI_DOCUMENT_PORTS(
129 {
"slot_port%d",
"Port(s) to send or receive on", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
132 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
133 {
"mySubCompSlot",
"Test slot",
"SST::CoreTestSubComponent::SubCompInterface" }
137 std::vector<SubCompInterface*> subComps;
142 SubCompSlot(ComponentId_t
id, std::string unnamed_sub);
156 SST_ELI_REGISTER_SUBCOMPONENT(
160 SST_ELI_ELEMENT_VERSION(1,0,0),
161 "Default Subcomponent for ELI testing only",
165 SST_ELI_DOCUMENT_PARAMS(
166 {
"port_name",
"Name of port to connect to",
""},
167 {
"sendCount",
"Number of Messages to Send",
"10"}
170 SST_ELI_DOCUMENT_PORTS(
171 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
175 {
"slot_port%d",
"This is just a test port that duplicates a port from the SubComponent that will instance it", {
"",
"" } },
178 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
181 SST_ELI_DOCUMENT_STATISTICS(
182 {
"numRecv",
"# of msgs recv",
"", 1},
194 SST_ELI_REGISTER_SUBCOMPONENT(
198 SST_ELI_ELEMENT_VERSION(1,0,0),
199 "Sending Subcomponent",
203 SST_ELI_DOCUMENT_PARAMS(
206 SST_ELI_DOCUMENT_STATISTICS(
207 SST_ELI_DELETE_STAT(
"numRecv"),
208 {
"numSent",
"# of msgs sent",
"", 1},
211 SST_ELI_DOCUMENT_PORTS(
212 {
"sendPort",
"Sending Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
215 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
216 {
"test_slot",
"Test slot",
"" }
228 SubCompSender(ComponentId_t
id, uint32_t nToSend,
const std::string& port_name);
238 SST_ELI_REGISTER_SUBCOMPONENT(
242 SST_ELI_ELEMENT_VERSION(1,0,0),
243 "Receiving Subcomponent",
248 SST_ELI_DOCUMENT_PARAMS(
249 SST_ELI_DELETE_PARAM(
"sendCount")
252 SST_ELI_DOCUMENT_STATISTICS(
255 SST_ELI_DOCUMENT_PORTS(
256 SST_ELI_DELETE_PORT(
"sendPort"),
257 {
"recvPort",
"Receiving Port", {
"coreTestMessageGeneratorComponent.coreTestMessage",
"" } },
260 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
261 SST_ELI_DELETE_SUBCOMPONENT_SLOT(
"test_slot")
Main component object for the simulation.
Definition: component.h:31
Definition: coreTest_SubComponent.h:38
Definition: coreTest_SubComponent.h:234
Definition: coreTest_SubComponent.h:150
Definition: coreTest_SubComponent.h:191
Definition: coreTest_SubComponent.h:49
Definition: coreTest_SubComponent.h:112
Definition: coreTest_SubComponent.h:72
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:35
Link between two components.
Definition: link.h:38
Parameter store.
Definition: params.h:56
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition: subcomponent.h:29