SST 16.0.0
Structural Simulation Toolkit
coreTest_Links.h
1// Copyright 2009-2026 NTESS. Under the terms
2// of Contract DE-NA0003525 with NTESS, the U.S.
3// Government retains certain rights in this software.
4//
5// Copyright (c) 2009-2026, NTESS
6// All rights reserved.
7//
8// This file is part of the SST software package. For license
9// information, see the LICENSE file in the top level directory of the
10// distribution.
11
12#ifndef SST_CORE_CORETEST_LINKS_H
13#define SST_CORE_CORETEST_LINKS_H
14
15#include "sst/core/component.h"
16#include "sst/core/link.h"
17#include "sst/core/rng/marsaglia.h"
18
19#include <string>
20
21namespace SST::CoreTestComponent {
22
24{
25public:
26 // REGISTER THIS COMPONENT INTO THE ELEMENT LIBRARY
27 SST_ELI_REGISTER_COMPONENT(
29 "coreTestElement",
30 "coreTestLinks",
31 SST_ELI_ELEMENT_VERSION(1,0,0),
32 "CoreTest Test Links",
33 COMPONENT_CATEGORY_UNCATEGORIZED
34 )
35
36 SST_ELI_DOCUMENT_PARAMS(
37 { "id", "ID of component", "" },
38 { "added_send_latency", "Additional output latency to add to sends", "0ns"},
39 { "added_recv_latency", "Additional input latency to add to incoming events", "0ns"},
40 { "link_time_base", "Timebase for links", "1ns" }
41 )
42
43 // Optional since there is nothing to document
44 SST_ELI_DOCUMENT_STATISTICS()
45
46 SST_ELI_DOCUMENT_PORTS(
47 {"Elink", "Link to the East", { "NullEvent", "" } },
48 {"Wlink", "Link to the West", { "NullEvent", "" } }
49 )
50
51 // Optional since there is nothing to document
52 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
53 )
54
55 coreTestLinks(SST::ComponentId_t id, SST::Params& params);
56 ~coreTestLinks() = default;
57
58 void setup() override {}
59 void finish() override {}
60
61private:
62 int my_id;
63 int recv_count;
64
65 void handleEvent(SST::Event* ev, std::string from);
66 virtual bool clockTic(SST::Cycle_t);
67
68 SST::Link* E;
69 SST::Link* W;
70};
71
72} // namespace SST::CoreTestComponent
73
74#endif // SST_CORE_CORETEST_LINKS_H
Main component object for the simulation.
Definition component.h:32
Base class for Events - Items sent across links to communicate between components.
Definition event.h:41
Parameter store.
Definition params.h:65