-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathxmp3.h
More file actions
246 lines (172 loc) · 6.09 KB
/
xmp3.h
File metadata and controls
246 lines (172 loc) · 6.09 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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#ifndef XMP3_H
#define XMP3_H
#include <string>
#include "ddr5spd_structs.h"
using namespace ddr5_structs;
class XMP3_Profile {
public:
XMP3_Profile(ddr5_structs::XMP_ProfileStruct &);
XMP3_Profile();
// Voltages
const unsigned short getVPP();
void setVPP(const unsigned short);
const unsigned short getVDD();
void setVDD(const unsigned short);
const unsigned short getVDDQ();
void setVDDQ(const unsigned short);
// Unkown byte 03 (0x00)
const unsigned short getVMEMCtrl();
void setVMEMCtrl(const unsigned short);
// Cycle + CAS
const unsigned short getMinCycleTime();
void setMinCycleTime(const unsigned short);
const unsigned int getFrequency();
const unsigned int getMT();
void setCLSupported(int cl, bool supported);
const bool getCLSupported(int cl);
// Timings
const unsigned short gettAA();
void settAA(const unsigned short);
const unsigned short gettRCD();
void settRCD(const unsigned short);
const unsigned short gettRP();
void settRP(const unsigned short);
const unsigned short gettRAS();
void settRAS(const unsigned short);
const unsigned short gettRC();
void settRC(const unsigned short);
const unsigned short gettWR();
void settWR(const unsigned short);
const unsigned short gettRFC1();
void settRFC1(const unsigned short);
const unsigned short gettRFC2();
void settRFC2(const unsigned short);
const unsigned short gettRFC();
void settRFC(const unsigned short);
const unsigned short gettRRD_L();
void settRRD_L(const unsigned short);
const unsigned short gettRRD_L_lowerLimit();
void settRRD_L_lowerLimit(const unsigned short);
const unsigned short gettCCD_L_WR();
void settCCD_L_WR(const unsigned short);
const unsigned short gettCCD_L_WR_lowerLimit();
void settCCD_L_WR_lowerLimit(const unsigned short);
const unsigned short gettCCD_L_WR2();
void settCCD_L_WR2(const unsigned short);
const unsigned short gettCCD_L_WR2_lowerLimit();
void settCCD_L_WR2_lowerLimit(const unsigned short);
const unsigned short gettCCD_L_WTR();
void settCCD_L_WTR(const unsigned short);
const unsigned short gettCCD_L_WTR_lowerLimit();
void settCCD_L_WTR_lowerLimit(const unsigned short);
const unsigned short gettCCD_S_WTR();
void settCCD_S_WTR(const unsigned short);
const unsigned short gettCCD_S_WTR_lowerLimit();
void settCCD_S_WTR_lowerLimit(const unsigned short);
const unsigned short gettCCD_L();
void settCCD_L(const unsigned short);
const unsigned short gettCCD_L_lowerLimit();
void settCCD_L_lowerLimit(const unsigned short);
const unsigned short gettRTP();
void settRTP(const unsigned short);
const unsigned short gettRTP_lowerLimit();
void settRTP_lowerLimit(const unsigned short);
const unsigned short gettFAW();
void settFAW(const unsigned short);
const unsigned short gettFAW_lowerLimit();
void settFAW_lowerLimit(const unsigned short);
const unsigned short gettAA_tick();
void settAA_tick(const unsigned short);
const unsigned short gettRCD_tick();
void settRCD_tick(const unsigned short);
const unsigned short gettRP_tick();
void settRP_tick(const unsigned short);
const unsigned short gettRAS_tick();
void settRAS_tick(const unsigned short);
const unsigned short gettRC_tick();
void settRC_tick(const unsigned short);
const unsigned short gettWR_tick();
void settWR_tick(const unsigned short);
const unsigned short gettRFC1_tick();
void settRFC1_tick(const unsigned short);
const unsigned short gettRFC2_tick();
void settRFC2_tick(const unsigned short);
const unsigned short gettRFC_tick();
void settRFC_tick(const unsigned short);
const unsigned short gettRRD_L_tick();
void settRRD_L_tick(const unsigned short);
const unsigned short gettCCD_L_WR_tick();
void settCCD_L_WR_tick(const unsigned short);
const unsigned short gettCCD_L_WR2_tick();
void settCCD_L_WR2_tick(const unsigned short);
const unsigned short gettCCD_L_WTR_tick();
void settCCD_L_WTR_tick(const unsigned short);
const unsigned short gettCCD_S_WTR_tick();
void settCCD_S_WTR_tick(const unsigned short);
const unsigned short gettCCD_L_tick();
void settCCD_L_tick(const unsigned short);
const unsigned short gettRTP_tick();
void settRTP_tick(const unsigned short);
const unsigned short gettFAW_tick();
void settFAW_tick(const unsigned short);
// Unkown byte 07 (0x00)
// Unkown byte 08 (0x00)
// Unkown byte 09 (0x00)
// Unkown byte 0A (0x00)
const unsigned short getDimmsChannel();
void setDimmsChannel(unsigned short);
const bool getIntelDynamicMemoryBoost();
void setIntelDynamicMemoryBoost(const bool);
const bool getRealTimeMemoryFrequencyOC();
void setRealTimeMemoryFrequencyOC(const bool);
const CommandRate getCommandRate();
void setCommandRate(const CommandRate);
// Unknown byte 0D (0x00)
const unsigned short getCRC();
void setCRC(const unsigned short);
void fixCRC();
void wipeProfile();
void resetProfile();
const bool hasData();
XMP_ProfileStruct getCopy();
void import(const XMP_ProfileStruct);
private:
XMP_ProfileStruct &xmpProfileStruct;
};
class XMP3_Bundle {
public:
XMP3_Bundle(XMP_Struct &);
XMP3_Bundle(XMP_Struct &, bool);
const bool isXMP1Enabled();
void setXMP1Enabled(const bool);
const bool isXMP2Enabled();
void setXMP2Enabled(const bool);
const bool isXMP3Enabled();
void setXMP3Enabled(const bool);
const bool isXMPUser1Present();
const bool isXMPUser2Present();
const std::string getXMP1ProfileName();
void setXMP1ProfileName(const std::string);
const std::string getXMP2ProfileName();
void setXMP2ProfileName(const std::string);
const std::string getXMP3ProfileName();
void setXMP3ProfileName(const std::string);
void enableMagic();
void clearMagic();
bool isMagicPresent();
void resetXMPtoSample();
const unsigned short getHeaderCRC();
void setHeaderCRC(const unsigned short);
void fixHeaderCRC();
void fixCRCs();
void wipe();
XMP3_Profile profile1;
XMP3_Profile profile2;
XMP3_Profile profile3;
XMP3_Profile profileUser1;
XMP3_Profile profileUser2;
private:
XMP_Struct &xmpStruct;
bool expoCoexistence;
};
#endif // XMP3_H