-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxsim_sst_interface.cpp
More file actions
81 lines (70 loc) · 2.28 KB
/
Copy pathxsim_sst_interface.cpp
File metadata and controls
81 lines (70 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <sst_core/sst_core.hpp>
#include <sst/core/element.h>
// Named as create_<component name>
static SST::Component* create_core(SST::ComponentId_t id,
SST::Params& params)
{
return new XSim::SST::core( id, params );
}
/** ***************************************************************************
*
* This structure specifies the links in an SST component
* Description available in sst/core/elements.h
*
** ***************************************************************************/
static const SST::ElementInfoPort core_ports[] = {
{ "data_memory_link", "Link to the data memHierarchy", NULL },
{ NULL, NULL, NULL }
};
/** ***************************************************************************
*
* This structure specifies the parameters of an SST component
* Description available in sst/core/elements.h
*
** ***************************************************************************/
static const SST::ElementInfoParam core_params[] = {
{ "verbose", "Verbosity for debugging. Increased numbers for increased verbosity.", "0" },
{ "clock_frequency", "Sets the clock of the core in Hz", "0"} ,
{ "n_read_requests", "Number of memory read requests", "1"} ,
{ NULL, NULL, NULL }
};
/** ***************************************************************************
*
* This structure specifies the components of the SST element
* Description available in sst/core/elements.h
*
** ***************************************************************************/
static const SST::ElementInfoComponent components[] = {
{
"core",
"Description of mips_core",
nullptr,
create_core,
core_params,
core_ports,
COMPONENT_CATEGORY_PROCESSOR,
nullptr
},
{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }
};
/** ***************************************************************************
*
* This structure describes this library
* Description available in sst/core/elements.h
*
** ***************************************************************************/
extern "C"
{
SST::ElementLibraryInfo XSim_eli = {
"XSim",
"Simple MIPS simulator",
components,
nullptr, // Events
nullptr, // Introspectors
nullptr, // Modules
nullptr, // Subcomponents
nullptr, // partitioners
nullptr, // python module generators
nullptr, // generators
};
}