-
Notifications
You must be signed in to change notification settings - Fork 0
/
Benchmarks.py
111 lines (93 loc) · 2.88 KB
/
Benchmarks.py
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
import sys
import numpy as np
import math
from config import*
from PES_Model import PES_Model
class Benchmarks:
def __init__(self,fs,ns,nc,**kw):
self.fs = fs
self.ns = ns
self.nc = nc
if 'type' in kw:
match kw['type']:
case 'HR':
self.name = kw['type'];
self.pS = [0,13.036103697e-6]
self.tS = [0,0.956197797e-3]
self.ds = 4.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'GL':
self.name = kw['type'];
self.pS = [0,9.150782864e-6]
self.tS = [0,0.798543294e-3]
self.ds = 44.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'BP':
self.name = kw['type'];
self.pS = [0,24.055761199e-6]
self.tS = [0,1.480102539e-3]
self.ds = 36.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'BO':
self.name = kw['type'];
self.pS = [0,326.388224008e-6]
self.tS = [0,15.526072184e-3]
self.ds = 4.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'PN':
self.name = kw['type'];
self.pS = [0,54.443262723e-6]
self.tS = [0,2.896457248e-3]
self.ds = 4.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'MP':
self.name = kw['type'];
self.pS = [52.055992955e-06,114.957911823e-06]
self.tS = [2.883911133e-03,5.651108762e-03]
self.ds = 4.0
self.Ph = PhLow
self.wakeupThreshold = wakeupThresholdLow
self.shutdownThreshold = shutdownThresholdLow
case 'AES':
self.name = kw['type'];
self.pS = [0,515.3440566e-6]
self.tS = [0,23.288302951e-3]
self.ds = 2704.0
self.Ph = PhHigh
self.wakeupThreshold = wakeupThresholdHigh
self.shutdownThreshold = shutdownThresholdHigh
case 'GM':
self.name = kw['type'];
self.pS = [0,861.902953512e-6]
self.tS = [0,37.970648872e-3]
self.ds = 4096.0
self.Ph = PhHigh
self.wakeupThreshold = wakeupThresholdHigh
self.shutdownThreshold = shutdownThresholdHigh
case 'FFT':
self.name = kw['type'];
self.pS = [0,23.796619446e-6]
self.tS = [0,1.627604167e-3]
self.ds = 8192.0
self.Ph = PhHigh
self.wakeupThreshold = wakeupThresholdHigh
self.shutdownThreshold = shutdownThresholdHigh
self.sample_size = ns[1] * nc * self.ds
self.cS = np.array(self.tS) * 64 * 1000000;
if(self.cS[0] != 0 ):
self.pS[0] =self.pS[0]/self.cS[0]
if(self.cS[1] != 0 ):
self.pS[1] =self.pS[1]/self.cS[1]
def run_PES_Model(self):
analyzer_PES_Model = PES_Model(self)
analyzer_PES_Model .energyDistrubution(self.fs, self.ns);