-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNoximPower.h
231 lines (199 loc) · 10 KB
/
NoximPower.h
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/*
* Noxim - the NoC Simulator
*
* (C) 2005-2010 by the University of Catania
* For the complete list of authors refer to file ../doc/AUTHORS.txt
* For the license applied to these sources refer to file ../doc/LICENSE.txt
*
* This file contains the declaration of the power model
*/
#ifndef __NOXIMPOWER_H__
#define __NOXIMPOWER_H__
#include <cassert>
#include "NoximMain.h"
using namespace std;
/*
The average energy dissipated by a flit for a hop switch was estimated
as being 0.151nJ, 0.178nJ, 0.182nJ and 0.189nJ for XY, Odd-Even, DyAD,
and NoP-OE respectively
We assumed the tile size to be 2mm x 2mm and that the tiles were
arranged in a regular fashion on the floorplan. The load wire
capacitance was set to 0.50fF per micron, so considering an average of
25% switching activity the amount of energy consumed by a flit for a
hop interconnect is 0.384nJ.
*/
/*// ------ Noxim Original Power Model <start>
#define PWR_ROUTING_XY 0.151e-9
#define PWR_ROUTING_WEST_FIRST 0.155e-9
#define PWR_ROUTING_NORTH_LAST 0.155e-9
#define PWR_ROUTING_NEGATIVE_FIRST 0.155e-9
#define PWR_ROUTING_ODD_EVEN 0.178e-9
#define PWR_ROUTING_DYAD 0.182e-9
#define PWR_ROUTING_FULLY_ADAPTIVE 0.0
#define PWR_ROUTING_TABLE_BASED 0.185e-9
#define PWR_SEL_RANDOM 0.002e-9
#define PWR_SEL_BUFFER_LEVEL 0.006e-9
#define PWR_SEL_NOP 0.012e-9
#define PWR_FORWARD_FLIT 0.384e-9
#define PWR_INCOMING 0.002e-9
#define PWR_STANDBY 0.0001e-9/2.0
// ------ Noxim Original Power Model <end> */
// ------- Intel 80-cores Power Model <start>
//單位: Watt
//使用時會再乘上時脈週期(操作頻率倒數), 數值代表一週期所消耗之能量(E = P/f)
//數值為參考intel 80 core之數據, 後面的scaling factor用以調整至溫度符合該paper所述之110度
//ENERGY_SCALING_FACTOR 對累積的energy作scaling 加快模擬速度
/*
#define PWR_QUEUES_DATA_PATH 203.28e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_MSINT 55.44e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_ARBITER_CONTROL 64.68e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_CROSSBAR 138.6e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_LINKS 157.08e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_CLOCKING 304.92e-3 *CYCLE_PERIOD*1e-9*2*2 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_LEAKAGE_ROUTER 70e-3 *CYCLE_PERIOD*1e-9 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_DUAL_FPMACS 1188e-3 *CYCLE_PERIOD*1e-9*2*6 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_IMEM 363e-3 *CYCLE_PERIOD*1e-9*2*6 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_DMEM 330e-3 *CYCLE_PERIOD*1e-9*2*6 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_RF 132e-3 *CYCLE_PERIOD*1e-9*2*6 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_CLOCK_DISTRIBUTION 363e-3 *CYCLE_PERIOD*1e-9*2*6 *POWER_SCALING_FACTOR *ENERGY_SCALING_FACTOR
#define PWR_LEAKAGE_FPMAC 40e-3 *CYCLE_PERIOD*1e-9
#define PWR_LEAKAGE_IMEM 21e-3 *CYCLE_PERIOD*1e-9
#define PWR_LEAKAGE_DMEM 8e-3 *CYCLE_PERIOD*1e-9
#define PWR_LEAKAGE_RF 7.5e-3 *CYCLE_PERIOD*1e-9
// ------- Intel 80-cores Power Model <end>
*/
// ------- Intel 80-core Energy Table, modified by Chihhao <begin>
// 後面這些 *2 *2 與 *2 *6要再確認是甚麼
#define ENERGY_SCALING_FACTOR 1.00
#define ENERGY_QUEUES_DATA_PATH 0.20328 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_MSINT 0.05544 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_ARBITER_CONTROL 0.06468 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_CROSSBAR 0.13860 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_LINKS 0.15708 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_CLOCKING 0.30492 *ENERGY_SCALING_FACTOR*1e-9 *2 *2
#define ENERGY_LEAKAGE_ROUTER 0.07000 *ENERGY_SCALING_FACTOR*1e-9
#define ENERGY_DUAL_FPMACS 1.18800 *ENERGY_SCALING_FACTOR*1e-9 *2 *6
#define ENERGY_RF 0.13200 *ENERGY_SCALING_FACTOR*1e-9 *2 *6
#define ENERGY_IMEM 0.36300 *ENERGY_SCALING_FACTOR*1e-9 *2 *6
#define ENERGY_DMEM 0.33000 *ENERGY_SCALING_FACTOR*1e-9 *2 *6
#define ENERGY_CLOCK_DISTRIBUTION 0.36300 *ENERGY_SCALING_FACTOR*1e-9 *2 *6
#define ENERGY_LEAKAGE_FPMAC 0.04000 *ENERGY_SCALING_FACTOR*1e-9
#define ENERGY_LEAKAGE_IMEM 0.02100 *ENERGY_SCALING_FACTOR*1e-9
#define ENERGY_LEAKAGE_DMEM 0.00800 *ENERGY_SCALING_FACTOR*1e-9
#define ENERGY_LEAKAGE_RF 0.00750 *ENERGY_SCALING_FACTOR*1e-9
// ------- Intel 80-core Energy Model, modified by Chihhao <end>
class NoximPower {
public:
NoximPower();
// Accumulation functions called in Router
void QueuesNDataPath();
void Msint();
void ArbiterNControl();
void Crossbar();
void Links();
void Clocking();
void LeakageRouter();
// Accumulation functions called in tile
void DualFpmacs();
void Imem();
void Dmem();
void RF();
void ClockDistribution();
void LeakageFPMAC();
void LeakageMEM();
// Accumulation Set
void Router2Lateral ();
void Router2Local ();
void RouterRxLateral();
void TileLeakage ();
// Methods for getting short-term average power, in NoximNoC::entry(), before calling Hotspot
double getTransientRouterPower() ;
double getTransientFPMACPower() ;
double getTransientMEMPower() ;
// Methods for getting steadystate average power, before calling Hotspot
double getSteadyStateRouterPower() ;
double getSteadyStateFPMACPower() ;
double getSteadyStateMEMPower() ;
// Methods for resetting energy accumulation
void resetPwr() { clearAllAccEnergy(); } // redundant, remove later
void resetTransientPwr() { clearTransientAccEnergy(); } // redundant, remove later
void clearAllAccEnergy(); // call at simulation setup (NoximNoC::entry() reset phase)
void clearTransientAccEnergy(); // call each interval in NoximNoC::entry()
// Get energy for per-flit operation
double getFlitEnergyQueuesNDataPath() { return ENERGY_QUEUES_DATA_PATH ; }
double getFlitEnergyMsint() { return ENERGY_MSINT ; }
double getFlitEnergyArbiterNControl() { return ENERGY_ARBITER_CONTROL ; }
double getFlitEnergyCrossbar() { return ENERGY_CROSSBAR ; }
double getFlitEnergyLinks() { return ENERGY_LINKS ; }
double getFlitEnergyClocking() { return ENERGY_CLOCKING ; }
double getFlitEnergyLeakageRouter() { return ENERGY_LEAKAGE_ROUTER ; }
double getFlitEnergyLeakageFPMAC() { return ENERGY_LEAKAGE_FPMAC + ENERGY_LEAKAGE_RF ; }
double getFlitEnergyLeakageMEM() { return ENERGY_LEAKAGE_IMEM + ENERGY_LEAKAGE_DMEM ; }
private:
// parameters to convert energy and power, setting in NoximPower();
int Real_cycle_num_per_10ms_interval;
int Sim_cycle_num_per_10ms_interval;
double Power_Scaling_Factor;
double Energy_Extrapolation_Factor;
double Accumulation_Interval_in_Sec;
double accEnergy_to_Transient_Power_coeff;
double accEnergy_to_SteadyState_Power_coeff;
double Total_Simulation_Time_in_Sec;
// power and accumulated energy for transient and steady state temperature computation
double pwr_Transient_Router , accEnergy_Transient_Router ;
double pwr_Transient_FPMAC , accEnergy_Transient_FPMAC ;
double pwr_Transient_MEM , accEnergy_Transient_MEM ;
double pwr_SteadyState_Router , accEnergy_SteadyState_Router ;
double pwr_SteadyState_FPMAC , accEnergy_SteadyState_FPMAC ;
double pwr_SteadyState_MEM , accEnergy_SteadyState_MEM ;
/*
// member data for power and energy computation of router
double pwr_QueuesNDataPath , accEnergy_QueuesNDataPath ;
double pwr_Msint , accEnergy_Msint ;
double pwr_ArbiterNControl , accEnergy_ArbiterNControl ;
double pwr_Crossbar , accEnergy_Crossbar ;
double pwr_Links , accEnergy_Links ;
double pwr_Clocking , accEnergy_Clocking ;
double pwr_leakage_Router , accEnergy_leakage_Router ;
// member data for power and energy computation of FPMAC and MEM and ClockDistribution
double pwr_DualFpmacs , accEnergy_DualFpmacs ;
double pwr_Imem , accEnergy_Imem ;
double pwr_Dmem , accEnergy_Dmem ;
double pwr_RF , accEnergy_RF ;
double pwr_ClockDistribution , accEnergy_ClockDistribution ;
double pwr_leakage_FPMAC , accEnergy_leakage_FPMAC ;
double pwr_leakage_MEM , accEnergy_leakage_MEM ;
*/
/*// ------ Noxim Original Power Model <start>
void Routing();
void Selection();
void Standby();
void Forward();
void Incoming();
double getPower() {
return pwr;
} double getPwrRouting() {
return pwr_routing;
}
double getPwrSelection() {
return pwr_selection;
}
double getPwrForward() {
return pwr_forward;
}
double getPwrStandBy() {
return pwr_standby;
}
double getPwrIncoming() {
return pwr_incoming;
}
private:
double pwr_routing;
double pwr_selection;
double pwr_forward;
double pwr_standby;
double pwr_incoming;
double pwr;
// ------ Noxim Original Power Model <end> */
};
#endif