SST 15.0
Structural Simulation Toolkit
coreTest_Links.h
1// Copyright 2009-2025 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-2025, 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
19namespace SST::CoreTestComponent {
20
22{
23public:
24 // REGISTER THIS COMPONENT INTO THE ELEMENT LIBRARY
25 SST_ELI_REGISTER_COMPONENT(
27 "coreTestElement",
28 "coreTestLinks",
29 SST_ELI_ELEMENT_VERSION(1,0,0),
30 "CoreTest Test Links",
31 COMPONENT_CATEGORY_UNCATEGORIZED
32 )
33
34 SST_ELI_DOCUMENT_PARAMS(
35 { "id", "ID of component", "" },
36 { "added_send_latency", "Additional output latency to add to sends", "0ns"},
37 { "added_recv_latency", "Additional input latency to add to incoming events", "0ns"},
38 { "link_time_base", "Timebase for links", "1ns" }
39 )
40
41 // Optional since there is nothing to document
42 SST_ELI_DOCUMENT_STATISTICS()
43
44 SST_ELI_DOCUMENT_PORTS(
45 {"Elink", "Link to the East", { "NullEvent", "" } },
46 {"Wlink", "Link to the West", { "NullEvent", "" } }
47 )
48
49 // Optional since there is nothing to document
50 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
51 )
52
53 coreTestLinks(SST::ComponentId_t id, SST::Params& params);
54 ~coreTestLinks() = default;
55
56 void setup() override {}
57 void finish() override {}
58
59private:
60 int my_id;
61 int recv_count;
62
63 void handleEvent(SST::Event* ev, std::string from);
64 virtual bool clockTic(SST::Cycle_t);
65
66 SST::Link* E;
67 SST::Link* W;
68};
69
70} // namespace SST::CoreTestComponent
71
72#endif // SST_CORE_CORETEST_LINKS_H
Main component object for the simulation.
Definition component.h:31
Base class for Events - Items sent across links to communicate between components.
Definition event.h:35
Parameter store.
Definition params.h:58