The Sparta Modeling Framework
Loading...
Searching...
No Matches
CPU.hpp
1// <CPU.h> -*- C++ -*-
2
3
4#pragma once
5
6#include <string>
7
11
12namespace core_example{
13
23class CPU : public sparta::Unit{
24public:
25
28 public:
30
31 // Dummy configuration parameters and environment variables that affect CPU utilization
32 PARAMETER(bool, fastpoll, true, "FASTPOLL configuration enable")
33 PARAMETER(bool, out_of_order_execution, false, "Execution Order")
34 PARAMETER(uint32_t, superscalar_degree, 4, "Degree of ILP")
35 PARAMETER(uint32_t, nettype, 3, "NETTYPE configuration parameter")
36 PARAMETER(uint32_t, ds_max_query, 2, "Max number of parallel decision support queries")
37 PARAMETER(uint32_t, max_pdq_priority, 4, "Percentage of parallel database query resources")
38 PARAMETER(uint32_t, ds_max_scans, 8, "Number of PDQ scan threads running concurrently")
39 PARAMETER(double, frequency_ghz, 1.2, "CPU Clock frequency")
40 PARAMETER(std::string, vpclass, "4 Virtual processors of AIO VPclass", "Virtual Processor")
41 };
42
44 static constexpr char name[] = "cpu";
45
52 CPU(sparta::TreeNode* node, const CPUParameterSet* params);
53
56private:
57
59 bool fastpoll_;
60 bool out_of_order_execution_;
61 uint32_t superscalar_degree_;
62 uint32_t nettype_;
63 uint32_t ds_max_query_;
64 uint32_t max_pdq_priority_;
65 uint32_t ds_max_scans_;
66 double frequency_ghz_;
67 std::string vpclass_;
68}; // class CPU
69} // namespace core_example
A set of sparta::Parameters per sparta::ResourceTreeNode.
#define PARAMETER(type, name, def, doc)
Parameter declaration.
Basic Node framework in sparta device tree composite pattern.
File that defines the Unit class, a common grouping of sets and loggers.
Parameters for CPU model.
Definition CPU.hpp:27
~CPU()
Destructor of the CPU Unit.
static constexpr char name[]
Name of this resource. Required by sparta::UnitFactory.
Definition CPU.hpp:44
Generic container of Parameters.
Node in a composite tree representing a sparta Tree item.
Definition TreeNode.hpp:205
The is the base class for user defined blocks in simulation.
Definition Unit.hpp:38