origen_std_lib 0.10.1 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/config/application.rb +7 -19
- data/config/commands.rb +9 -0
- data/config/version.rb +1 -2
- data/lib/origen_std_lib/v93k.rb +17 -1
- data/{stdlib/v93k → src/advantest/smt7}/origen/.cproject +0 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/.project +0 -0
- data/src/advantest/smt7/origen/origen/helpers/console.cpp +94 -0
- data/src/advantest/smt7/origen/origen/helpers/misc.cpp +456 -0
- data/src/advantest/smt7/origen/origen/helpers/time.cpp +64 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
- data/src/advantest/smt7/origen/origen/site.cpp +237 -0
- data/src/advantest/smt7/origen/origen/site.hpp +50 -0
- data/src/advantest/smt7/origen/origen/test_method/base.cpp +231 -0
- data/src/advantest/smt7/origen/origen/test_method/base.hpp +155 -0
- data/src/advantest/smt7/origen/origen/test_method/dc_measurement.cpp +266 -0
- data/src/advantest/smt7/origen/origen/test_method/dc_measurement.hpp +58 -0
- data/src/advantest/smt7/origen/origen/test_method/empty.cpp +13 -0
- data/src/advantest/smt7/origen/origen/test_method/empty.hpp +24 -0
- data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.cpp +133 -0
- data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.hpp +46 -0
- data/src/advantest/smt7/origen/origen/test_method/functional_test.cpp +168 -0
- data/src/advantest/smt7/origen/origen/test_method/functional_test.hpp +53 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/test_method.hpp +1 -3
- data/src/advantest/smt7/origen/origen/utils/version.cpp +72 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils/version.hpp +20 -21
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils.hpp +1 -3
- data/src/advantest/smt7/origen/origen.cpp +18 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
- data/src/advantest/smt7/origen/test_methods/ApplyBin.cpp +37 -0
- data/src/advantest/smt7/origen/test_methods/DCMeasurement.cpp +90 -0
- data/src/advantest/smt7/origen/test_methods/FrequencyMeasurement.cpp +50 -0
- data/src/advantest/smt7/origen/test_methods/FunctionalTest.cpp +24 -0
- data/src/advantest/smt7/origen/test_methods/RecordBin.cpp +39 -0
- data/src/advantest/smt8/origen/common/Origen.java +334 -0
- data/src/advantest/smt8/origen/common/OrigenData.java +391 -0
- data/src/advantest/smt8/origen/common/OrigenHelpers.java +170 -0
- data/src/advantest/smt8/origen/test_methods/Base.java +265 -0
- data/src/advantest/smt8/origen/test_methods/DC_Measurement.java +302 -0
- data/src/advantest/smt8/origen/test_methods/Empty.java +12 -0
- data/src/advantest/smt8/origen/test_methods/Functional_test.java +474 -0
- data/templates/web/faq.md.erb +1 -52
- data/templates/web/guides/intro.md.erb +8 -0
- data/templates/web/guides/{v93k/intro.md.erb → v93ksmt7/capture.md.erb} +0 -2
- data/templates/web/guides/v93ksmt7/complete.md.erb +68 -0
- data/templates/web/guides/v93ksmt7/customizable.md.erb +139 -0
- data/templates/web/guides/v93ksmt7/helpers.md.erb +3 -0
- data/templates/web/guides/{v93k → v93ksmt7}/install.md.erb +1 -1
- data/templates/web/guides/v93ksmt7/integration.md.erb +3 -0
- data/templates/web/guides/v93ksmt7/intro.md.erb +8 -0
- data/templates/web/guides/v93ksmt7/patching.md.erb +3 -0
- data/templates/web/guides/v93ksmt8/intro.md.erb +9 -0
- data/templates/web/index.md.erb +23 -6
- data/templates/web/layouts/_guides.html.erb +15 -3
- data/templates/web/partials/_common_args.md.erb +13 -0
- data/templates/web/partials/_navbar.html.erb +2 -2
- metadata +52 -33
- data/stdlib/v93k/origen/origen/helpers/console.cpp +0 -105
- data/stdlib/v93k/origen/origen/helpers/misc.cpp +0 -311
- data/stdlib/v93k/origen/origen/site.cpp +0 -220
- data/stdlib/v93k/origen/origen/site.hpp +0 -51
- data/stdlib/v93k/origen/origen/test_method/base.hpp +0 -156
- data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +0 -182
- data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +0 -59
- data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +0 -107
- data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +0 -48
- data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +0 -125
- data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +0 -52
- data/stdlib/v93k/origen/origen/utils/version.cpp +0 -79
- data/stdlib/v93k/origen/origen.cpp +0 -22
- data/stdlib/v93k/origen/test_methods/ApplyBin.cpp +0 -41
- data/stdlib/v93k/origen/test_methods/DCMeasurement.cpp +0 -129
- data/stdlib/v93k/origen/test_methods/FrequencyMeasurement.cpp +0 -93
- data/stdlib/v93k/origen/test_methods/FunctionalTest.cpp +0 -94
- data/stdlib/v93k/origen/test_methods/RecordBin.cpp +0 -48
@@ -0,0 +1,155 @@
|
|
1
|
+
#ifndef ORIGEN_TEST_METHOD_BASE_INCLUDED
|
2
|
+
#define ORIGEN_TEST_METHOD_BASE_INCLUDED
|
3
|
+
|
4
|
+
#include "../../origen.hpp"
|
5
|
+
#include "../test_method.hpp"
|
6
|
+
#include "mapi.hpp"
|
7
|
+
#include "testmethod.hpp"
|
8
|
+
using namespace std;
|
9
|
+
|
10
|
+
namespace Origen {
|
11
|
+
namespace TestMethod {
|
12
|
+
|
13
|
+
class Base : public testmethod::TestMethod {
|
14
|
+
bool _async;
|
15
|
+
bool _syncup;
|
16
|
+
|
17
|
+
public:
|
18
|
+
Base();
|
19
|
+
virtual ~Base();
|
20
|
+
|
21
|
+
Base& async(bool v) {
|
22
|
+
_async = v;
|
23
|
+
return *this;
|
24
|
+
}
|
25
|
+
Base& syncup(bool v) {
|
26
|
+
_syncup = v;
|
27
|
+
return *this;
|
28
|
+
}
|
29
|
+
|
30
|
+
void execute() { _execute(); }
|
31
|
+
|
32
|
+
virtual void SMC_backgroundProcessing(){};
|
33
|
+
|
34
|
+
protected:
|
35
|
+
int numberOfPhysicalSites;
|
36
|
+
ARRAY_I activeSites;
|
37
|
+
string suiteName;
|
38
|
+
bool bFirstRun;
|
39
|
+
|
40
|
+
string _testName;
|
41
|
+
int _forcePass;
|
42
|
+
string _onPassFlag;
|
43
|
+
string _onFailFlag;
|
44
|
+
|
45
|
+
int offline();
|
46
|
+
void initialize();
|
47
|
+
void run();
|
48
|
+
int testNumber();
|
49
|
+
int testNumber(string);
|
50
|
+
TMLimits::LimitInfo testLimits();
|
51
|
+
TMLimits::LimitInfo testLimits(string);
|
52
|
+
void datalog(double);
|
53
|
+
void datalog(string, double);
|
54
|
+
void judgeAndDatalog(double);
|
55
|
+
void judgeAndDatalog(string, double);
|
56
|
+
bool preJudge(double);
|
57
|
+
bool preJudge(string, double);
|
58
|
+
string testName();
|
59
|
+
int invertFunctionalResultIfRequired(int);
|
60
|
+
bool isWithinLimits(double, LIMIT);
|
61
|
+
LIMIT toNALimit(LIMIT);
|
62
|
+
vector<int> suiteFailed;
|
63
|
+
|
64
|
+
virtual void init() {}
|
65
|
+
|
66
|
+
/// For internal use, don't override
|
67
|
+
virtual void _setup() {}
|
68
|
+
|
69
|
+
// Called immediately before the first RDI operation is executed
|
70
|
+
virtual void preBody() {}
|
71
|
+
virtual void preBody(int site) {}
|
72
|
+
|
73
|
+
virtual void body() { execute(); }
|
74
|
+
|
75
|
+
virtual void _execute() {}
|
76
|
+
|
77
|
+
// Called before the main RDI operation is executed, giving the chance to add
|
78
|
+
// additional settings to it
|
79
|
+
virtual void filterRDI(SMART_RDI::dcBase& prdi) {}
|
80
|
+
virtual void filterRDI(SMART_RDI::DIG_CAP& prdi) {}
|
81
|
+
virtual void filterRDI(SMART_RDI::FUNC& prdi) {}
|
82
|
+
|
83
|
+
// If the test has a hold state, this will be called immediately after the
|
84
|
+
// hold
|
85
|
+
// state pattern has run
|
86
|
+
virtual void holdState() {}
|
87
|
+
virtual void holdState(int site) {}
|
88
|
+
|
89
|
+
// Called after the last RDI operation has executed and all results have been
|
90
|
+
// fetched
|
91
|
+
virtual void postBody() {}
|
92
|
+
virtual void postBody(int site) {}
|
93
|
+
|
94
|
+
// Called immediately before the final result processing. If the test is
|
95
|
+
// configured for async
|
96
|
+
// processing then this will be called later in the background. Contrast this
|
97
|
+
// with the
|
98
|
+
// postTestFunc which will be called before the main test body completes.
|
99
|
+
virtual void process(int site) {}
|
100
|
+
|
101
|
+
// Called before the main test result is judged, giving a chance to transform
|
102
|
+
// it
|
103
|
+
virtual double filterResult(double result) { return result; }
|
104
|
+
|
105
|
+
virtual bool async() { return _async; }
|
106
|
+
virtual bool syncup() { return _syncup; }
|
107
|
+
|
108
|
+
virtual void serialProcessing(int site){};
|
109
|
+
|
110
|
+
void enableHiddenUpload() {
|
111
|
+
if (async()) {
|
112
|
+
rdi.hiddenUpload(TA::ALL);
|
113
|
+
} else {
|
114
|
+
rdi.hiddenUpload(TA::NO);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
void callPreBody() {
|
119
|
+
if (syncup()) {
|
120
|
+
synchronize();
|
121
|
+
}
|
122
|
+
preBody();
|
123
|
+
FOR_EACH_SITE_BEGIN();
|
124
|
+
preBody(CURRENT_SITE_NUMBER());
|
125
|
+
FOR_EACH_SITE_END();
|
126
|
+
}
|
127
|
+
|
128
|
+
void callHoldState() {
|
129
|
+
holdState();
|
130
|
+
FOR_EACH_SITE_BEGIN();
|
131
|
+
holdState(CURRENT_SITE_NUMBER());
|
132
|
+
FOR_EACH_SITE_END();
|
133
|
+
}
|
134
|
+
|
135
|
+
template <class T>
|
136
|
+
void callPostBody(T* obj) {
|
137
|
+
ON_FIRST_INVOCATION_BEGIN();
|
138
|
+
postBody();
|
139
|
+
FOR_EACH_SITE_BEGIN();
|
140
|
+
postBody(CURRENT_SITE_NUMBER());
|
141
|
+
FOR_EACH_SITE_END();
|
142
|
+
ON_FIRST_INVOCATION_END();
|
143
|
+
|
144
|
+
if (async()) {
|
145
|
+
SMC_ARM_internal(obj);
|
146
|
+
} else {
|
147
|
+
process(CURRENT_SITE_NUMBER());
|
148
|
+
this->serialProcessing(CURRENT_SITE_NUMBER());
|
149
|
+
}
|
150
|
+
}
|
151
|
+
};
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
#endif /* BASE_HPP_ */
|
@@ -0,0 +1,266 @@
|
|
1
|
+
#include "dc_measurement.hpp"
|
2
|
+
|
3
|
+
namespace Origen {
|
4
|
+
namespace TestMethod {
|
5
|
+
|
6
|
+
// Defaults
|
7
|
+
DCMeasurement::DCMeasurement() {
|
8
|
+
applyShutdown(1);
|
9
|
+
checkShutdown(1);
|
10
|
+
measure("VOLT");
|
11
|
+
settlingTime(0);
|
12
|
+
forceValue(0);
|
13
|
+
iRange(0);
|
14
|
+
processResults(1);
|
15
|
+
badc(0);
|
16
|
+
port("");
|
17
|
+
}
|
18
|
+
|
19
|
+
DCMeasurement::~DCMeasurement() {}
|
20
|
+
|
21
|
+
DCMeasurement& DCMeasurement::applyShutdown(int v) {
|
22
|
+
_applyShutdown = v;
|
23
|
+
return *this;
|
24
|
+
}
|
25
|
+
DCMeasurement& DCMeasurement::shutdownPattern(string v) {
|
26
|
+
_shutdownPattern = v;
|
27
|
+
return *this;
|
28
|
+
}
|
29
|
+
DCMeasurement& DCMeasurement::checkShutdown(int v) {
|
30
|
+
_checkShutdown = v;
|
31
|
+
return *this;
|
32
|
+
}
|
33
|
+
DCMeasurement& DCMeasurement::measure(string v) {
|
34
|
+
_measure = v;
|
35
|
+
return *this;
|
36
|
+
}
|
37
|
+
DCMeasurement& DCMeasurement::settlingTime(double v) {
|
38
|
+
_settlingTime = v;
|
39
|
+
return *this;
|
40
|
+
}
|
41
|
+
DCMeasurement& DCMeasurement::pin(string v) {
|
42
|
+
_pin = v;
|
43
|
+
return *this;
|
44
|
+
}
|
45
|
+
DCMeasurement& DCMeasurement::port(string v) {
|
46
|
+
_port = v;
|
47
|
+
return *this;
|
48
|
+
}
|
49
|
+
DCMeasurement& DCMeasurement::forceValue(double v) {
|
50
|
+
_forceValue = v;
|
51
|
+
return *this;
|
52
|
+
}
|
53
|
+
DCMeasurement& DCMeasurement::iRange(double v) {
|
54
|
+
_iRange = v;
|
55
|
+
return *this;
|
56
|
+
}
|
57
|
+
DCMeasurement& DCMeasurement::processResults(int v) {
|
58
|
+
_processResults = v;
|
59
|
+
return *this;
|
60
|
+
}
|
61
|
+
DCMeasurement& DCMeasurement::badc(int v) {
|
62
|
+
_badc = v;
|
63
|
+
return *this;
|
64
|
+
}
|
65
|
+
|
66
|
+
// All test methods must implement this function
|
67
|
+
DCMeasurement& DCMeasurement::getThis() { return *this; }
|
68
|
+
|
69
|
+
void DCMeasurement::_setup() {
|
70
|
+
pin(extractPinsFromGroup(_pin));
|
71
|
+
results.resize(numberOfPhysicalSites + 1);
|
72
|
+
funcResultsPre.resize(numberOfPhysicalSites + 1);
|
73
|
+
funcResultsPost.resize(numberOfPhysicalSites + 1);
|
74
|
+
label = Primary.getLabel();
|
75
|
+
}
|
76
|
+
|
77
|
+
void DCMeasurement::_execute() {
|
78
|
+
int site;
|
79
|
+
|
80
|
+
ON_FIRST_INVOCATION_BEGIN();
|
81
|
+
|
82
|
+
if (_applyShutdown) {
|
83
|
+
if (_shutdownPattern.empty()) {
|
84
|
+
ostringstream pat;
|
85
|
+
pat << label << "_part1";
|
86
|
+
shutdownPattern(pat.str());
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
if (!_iRange && _measure == "CURR") {
|
91
|
+
double dHigh(0), dLow(0);
|
92
|
+
TM::COMPARE cHigh, cLow;
|
93
|
+
testLimits().TEST_API_LIMIT.get(cLow, dLow, cHigh, dHigh);
|
94
|
+
|
95
|
+
if (cLow == TM::NA) {
|
96
|
+
dLow = 0;
|
97
|
+
}
|
98
|
+
if (cHigh == TM::NA) {
|
99
|
+
dHigh = 0;
|
100
|
+
}
|
101
|
+
|
102
|
+
if (dLow == 0 && dHigh == 0) {
|
103
|
+
cout << "ERROR: If your current measurement does not have a limit, you "
|
104
|
+
"must supply the current range"
|
105
|
+
<< endl;
|
106
|
+
ERROR_EXIT(TM::ABORT_FLOW);
|
107
|
+
}
|
108
|
+
if (abs(dLow) > abs(dHigh)) {
|
109
|
+
_iRange = abs(dLow);
|
110
|
+
} else {
|
111
|
+
_iRange = abs(dHigh);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
RDI_BEGIN();
|
116
|
+
|
117
|
+
if (_port.empty()) {
|
118
|
+
rdi.func(suiteName + "f1").label(label).execute();
|
119
|
+
} else {
|
120
|
+
rdi.port(_port).func(suiteName + "f1").burst(label).execute();
|
121
|
+
}
|
122
|
+
|
123
|
+
callHoldState();
|
124
|
+
|
125
|
+
if (_measure == "VOLT") {
|
126
|
+
if (_badc) {
|
127
|
+
if (_port.empty()) {
|
128
|
+
rdi.dc(suiteName)
|
129
|
+
.pin(_pin, TA::BADC)
|
130
|
+
.measWait(_settlingTime)
|
131
|
+
.vMeas()
|
132
|
+
.execute();
|
133
|
+
} else {
|
134
|
+
rdi.port(_port)
|
135
|
+
.dc(suiteName)
|
136
|
+
.pin(_pin, TA::BADC)
|
137
|
+
.measWait(_settlingTime)
|
138
|
+
.vMeas()
|
139
|
+
.execute();
|
140
|
+
}
|
141
|
+
|
142
|
+
} else {
|
143
|
+
if (_port.empty()) {
|
144
|
+
SMART_RDI::dcBase& prdi =
|
145
|
+
rdi.dc(suiteName)
|
146
|
+
.pin(_pin)
|
147
|
+
.iForce(_forceValue)
|
148
|
+
.measWait(_settlingTime)
|
149
|
+
.relay(TA::ppmuRly_onPPMU_offACDC, TA::ppmuRly_onAC_offDCPPMU)
|
150
|
+
.vMeas();
|
151
|
+
filterRDI(prdi);
|
152
|
+
prdi.execute();
|
153
|
+
} else {
|
154
|
+
SMART_RDI::dcBase& prdi =
|
155
|
+
rdi.port(_port)
|
156
|
+
.dc(suiteName)
|
157
|
+
.pin(_pin)
|
158
|
+
.iForce(_forceValue)
|
159
|
+
.measWait(_settlingTime)
|
160
|
+
.relay(TA::ppmuRly_onPPMU_offACDC, TA::ppmuRly_onAC_offDCPPMU)
|
161
|
+
.vMeas();
|
162
|
+
filterRDI(prdi);
|
163
|
+
prdi.execute();
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
} else {
|
168
|
+
if (_port.empty()) {
|
169
|
+
SMART_RDI::dcBase& prdi =
|
170
|
+
rdi.dc(suiteName)
|
171
|
+
.pin(_pin)
|
172
|
+
.vForce(_forceValue)
|
173
|
+
.relay(TA::ppmuRly_onPPMU_offACDC, TA::ppmuRly_onAC_offDCPPMU)
|
174
|
+
.measWait(_settlingTime)
|
175
|
+
.iRange(_iRange)
|
176
|
+
.iMeas();
|
177
|
+
|
178
|
+
filterRDI(prdi);
|
179
|
+
prdi.execute();
|
180
|
+
} else {
|
181
|
+
SMART_RDI::dcBase& prdi =
|
182
|
+
rdi.port(_port)
|
183
|
+
.dc(suiteName)
|
184
|
+
.pin(_pin)
|
185
|
+
.vForce(_forceValue)
|
186
|
+
.relay(TA::ppmuRly_onPPMU_offACDC, TA::ppmuRly_onAC_offDCPPMU)
|
187
|
+
.measWait(_settlingTime)
|
188
|
+
.iRange(_iRange)
|
189
|
+
.iMeas();
|
190
|
+
|
191
|
+
filterRDI(prdi);
|
192
|
+
prdi.execute();
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
if (_applyShutdown) {
|
197
|
+
if (_port.empty()) {
|
198
|
+
rdi.func(suiteName + "f2").label(_shutdownPattern).execute();
|
199
|
+
} else {
|
200
|
+
rdi.port(_port).func(suiteName + "f2").burst(_shutdownPattern).execute();
|
201
|
+
}
|
202
|
+
}
|
203
|
+
|
204
|
+
RDI_END();
|
205
|
+
|
206
|
+
FOR_EACH_SITE_BEGIN();
|
207
|
+
site = CURRENT_SITE_NUMBER();
|
208
|
+
funcResultsPre[site] = rdi.id(suiteName + "f1").getPassFail();
|
209
|
+
if (_applyShutdown)
|
210
|
+
funcResultsPost[site] = rdi.id(suiteName + "f2").getPassFail();
|
211
|
+
// TODO: This retrieval needs to move to the SMC func in the async case
|
212
|
+
if (offline()) {
|
213
|
+
double dHigh(0), dLow(0);
|
214
|
+
TM::COMPARE cHigh, cLow;
|
215
|
+
testLimits().TEST_API_LIMIT.get(cLow, dLow, cHigh, dHigh);
|
216
|
+
|
217
|
+
if (cLow != TM::NA && cHigh != TM::NA) {
|
218
|
+
results[site] = ((dHigh - dLow) / 2) + dLow;
|
219
|
+
} else if (cLow != TM::NA) {
|
220
|
+
results[site] = dLow;
|
221
|
+
} else if (cHigh != TM::NA) {
|
222
|
+
results[site] = dHigh;
|
223
|
+
} else {
|
224
|
+
results[site] = 0;
|
225
|
+
}
|
226
|
+
|
227
|
+
} else {
|
228
|
+
results[site] = rdi.id(suiteName).getValue();
|
229
|
+
}
|
230
|
+
|
231
|
+
FOR_EACH_SITE_END();
|
232
|
+
|
233
|
+
ON_FIRST_INVOCATION_END();
|
234
|
+
}
|
235
|
+
|
236
|
+
void DCMeasurement::serialProcessing(int site) {
|
237
|
+
if (_processResults) {
|
238
|
+
judgeAndDatalog(testName() + "_FUNCPRE",
|
239
|
+
invertFunctionalResultIfRequired(funcResultsPre[site]));
|
240
|
+
|
241
|
+
judgeAndDatalog(testName(), filterResult(results[site]));
|
242
|
+
|
243
|
+
if (_applyShutdown && _checkShutdown) {
|
244
|
+
judgeAndDatalog(testName() + "_FUNCPOST",
|
245
|
+
invertFunctionalResultIfRequired(funcResultsPost[site]));
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
|
250
|
+
void DCMeasurement::SMC_backgroundProcessing() {
|
251
|
+
for (int i = 0; i < activeSites.size(); i++) {
|
252
|
+
int site = activeSites[i];
|
253
|
+
process(site);
|
254
|
+
if (_processResults) {
|
255
|
+
SMC_TEST(site, "", suiteName, LIMIT(TM::GE, 1, TM::LE, 1),
|
256
|
+
funcResultsPre[site]);
|
257
|
+
if (_applyShutdown && _checkShutdown)
|
258
|
+
SMC_TEST(site, "", suiteName, LIMIT(TM::GE, 1, TM::LE, 1),
|
259
|
+
funcResultsPost[site]);
|
260
|
+
SMC_TEST(site, _pin, suiteName, testLimits().TEST_API_LIMIT,
|
261
|
+
filterResult(results[site]));
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#ifndef ORIGEN_TEST_METHOD_DC_MEASUREMENT_INCLUDED
|
2
|
+
#define ORIGEN_TEST_METHOD_DC_MEASUREMENT_INCLUDED
|
3
|
+
|
4
|
+
#include "base.hpp"
|
5
|
+
#include "mapi.hpp"
|
6
|
+
#include "rdi.hpp"
|
7
|
+
|
8
|
+
using namespace std;
|
9
|
+
|
10
|
+
namespace Origen {
|
11
|
+
namespace TestMethod {
|
12
|
+
|
13
|
+
class DCMeasurement : public Base {
|
14
|
+
void serialProcessing(int site);
|
15
|
+
|
16
|
+
int _applyShutdown;
|
17
|
+
string _shutdownPattern;
|
18
|
+
int _checkShutdown;
|
19
|
+
string _measure;
|
20
|
+
double _settlingTime;
|
21
|
+
string _pin;
|
22
|
+
string _port;
|
23
|
+
double _forceValue;
|
24
|
+
double _iRange;
|
25
|
+
int _processResults;
|
26
|
+
int _badc;
|
27
|
+
|
28
|
+
public:
|
29
|
+
DCMeasurement();
|
30
|
+
virtual ~DCMeasurement();
|
31
|
+
void SMC_backgroundProcessing();
|
32
|
+
|
33
|
+
DCMeasurement& applyShutdown(int v);
|
34
|
+
DCMeasurement& shutdownPattern(string v);
|
35
|
+
DCMeasurement& checkShutdown(int v);
|
36
|
+
DCMeasurement& measure(string v);
|
37
|
+
DCMeasurement& settlingTime(double v);
|
38
|
+
DCMeasurement& pin(string v);
|
39
|
+
DCMeasurement& port(string v);
|
40
|
+
DCMeasurement& forceValue(double v);
|
41
|
+
DCMeasurement& iRange(double v);
|
42
|
+
DCMeasurement& processResults(int v);
|
43
|
+
DCMeasurement& badc(int v);
|
44
|
+
|
45
|
+
protected:
|
46
|
+
typedef DCMeasurement super;
|
47
|
+
DCMeasurement& getThis();
|
48
|
+
void _setup();
|
49
|
+
void _execute();
|
50
|
+
|
51
|
+
string label;
|
52
|
+
vector<int> funcResultsPre;
|
53
|
+
vector<int> funcResultsPost;
|
54
|
+
vector<double> results;
|
55
|
+
};
|
56
|
+
}
|
57
|
+
}
|
58
|
+
#endif
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#ifndef ORIGEN_TEST_METHOD_FUNCTIONAL_TEST_INCLUDED
|
2
|
+
#define ORIGEN_TEST_METHOD_FUNCTIONAL_TEST_INCLUDED
|
3
|
+
|
4
|
+
#include "base.hpp"
|
5
|
+
#include "mapi.hpp"
|
6
|
+
#include "rdi.hpp"
|
7
|
+
|
8
|
+
using namespace std;
|
9
|
+
|
10
|
+
namespace Origen {
|
11
|
+
namespace TestMethod {
|
12
|
+
|
13
|
+
class Empty : public Base {
|
14
|
+
public:
|
15
|
+
Empty();
|
16
|
+
virtual ~Empty();
|
17
|
+
|
18
|
+
protected:
|
19
|
+
typedef Empty super;
|
20
|
+
Empty& getThis();
|
21
|
+
};
|
22
|
+
}
|
23
|
+
}
|
24
|
+
#endif
|
@@ -0,0 +1,133 @@
|
|
1
|
+
#include "frequency_measurement.hpp"
|
2
|
+
|
3
|
+
namespace Origen {
|
4
|
+
namespace TestMethod {
|
5
|
+
|
6
|
+
// Defaults
|
7
|
+
FrequencyMeasurement::FrequencyMeasurement() {
|
8
|
+
samples(2000);
|
9
|
+
processResults(1);
|
10
|
+
port("");
|
11
|
+
}
|
12
|
+
FrequencyMeasurement::~FrequencyMeasurement() {}
|
13
|
+
|
14
|
+
/// By default the limits are assumed to be expressed as a frequency, set this
|
15
|
+
/// to 1 if they refer to a target period
|
16
|
+
FrequencyMeasurement& FrequencyMeasurement::periodBased(int v) {
|
17
|
+
_periodBased = v;
|
18
|
+
return *this;
|
19
|
+
}
|
20
|
+
/// REQUIRED: The name of the pin being measured
|
21
|
+
FrequencyMeasurement& FrequencyMeasurement::pin(string v) {
|
22
|
+
_pin = v;
|
23
|
+
return *this;
|
24
|
+
}
|
25
|
+
/// Optionally supply the name of the test port that should be used to execute
|
26
|
+
/// the pattern
|
27
|
+
FrequencyMeasurement& FrequencyMeasurement::port(string v) {
|
28
|
+
_port = v;
|
29
|
+
return *this;
|
30
|
+
}
|
31
|
+
/// The number of samples captured by the pattern, the default is 2000
|
32
|
+
FrequencyMeasurement& FrequencyMeasurement::samples(int v) {
|
33
|
+
_samples = v;
|
34
|
+
return *this;
|
35
|
+
}
|
36
|
+
/// REQUIRED: Supply the period of the captured vectors in nanoseconds
|
37
|
+
FrequencyMeasurement& FrequencyMeasurement::periodInNs(int v) {
|
38
|
+
_periodInNs = v;
|
39
|
+
return *this;
|
40
|
+
}
|
41
|
+
/// When set to 0 the results of the test will not be judged or logged
|
42
|
+
FrequencyMeasurement& FrequencyMeasurement::processResults(int v) {
|
43
|
+
_processResults = v;
|
44
|
+
return *this;
|
45
|
+
}
|
46
|
+
|
47
|
+
// All test methods must implement these functions
|
48
|
+
FrequencyMeasurement& FrequencyMeasurement::getThis() { return *this; }
|
49
|
+
|
50
|
+
void FrequencyMeasurement::_setup() {
|
51
|
+
funcResults.resize(numberOfPhysicalSites + 1);
|
52
|
+
label = Primary.getLabel();
|
53
|
+
pin(extractPinsFromGroup(_pin));
|
54
|
+
}
|
55
|
+
|
56
|
+
void FrequencyMeasurement::_execute() {
|
57
|
+
int site;
|
58
|
+
|
59
|
+
ON_FIRST_INVOCATION_BEGIN();
|
60
|
+
|
61
|
+
RDI_BEGIN();
|
62
|
+
|
63
|
+
if (_port.empty()) {
|
64
|
+
SMART_RDI::DIG_CAP& prdi =
|
65
|
+
rdi.digCap(suiteName).label(label).pin(_pin).bitPerWord(1).samples(
|
66
|
+
_samples);
|
67
|
+
|
68
|
+
filterRDI(prdi);
|
69
|
+
prdi.execute();
|
70
|
+
|
71
|
+
} else {
|
72
|
+
SMART_RDI::DIG_CAP& prdi = rdi.port(_port)
|
73
|
+
.digCap(suiteName)
|
74
|
+
.vecVarOnly()
|
75
|
+
.pin(_pin)
|
76
|
+
.bitPerWord(1)
|
77
|
+
.samples(_samples);
|
78
|
+
|
79
|
+
filterRDI(prdi);
|
80
|
+
prdi.execute();
|
81
|
+
rdi.port(_port).func().burst(label).execute();
|
82
|
+
}
|
83
|
+
|
84
|
+
RDI_END();
|
85
|
+
|
86
|
+
FOR_EACH_SITE_BEGIN();
|
87
|
+
site = CURRENT_SITE_NUMBER();
|
88
|
+
funcResults[site] = rdi.getBurstPassFail();
|
89
|
+
FOR_EACH_SITE_END();
|
90
|
+
|
91
|
+
ON_FIRST_INVOCATION_END();
|
92
|
+
}
|
93
|
+
|
94
|
+
void FrequencyMeasurement::serialProcessing(int site) {
|
95
|
+
if (_processResults) {
|
96
|
+
double result;
|
97
|
+
ARRAY_I captureData = rdi.site(site).id(suiteName).getVector();
|
98
|
+
|
99
|
+
if (_periodBased) {
|
100
|
+
result = calculatePeriod(captureData, _periodInNs);
|
101
|
+
} else {
|
102
|
+
result = calculateFrequency(captureData, _periodInNs);
|
103
|
+
}
|
104
|
+
|
105
|
+
judgeAndDatalog(testName() + "_FUNC",
|
106
|
+
invertFunctionalResultIfRequired(funcResults[site]));
|
107
|
+
|
108
|
+
judgeAndDatalog(filterResult(result));
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
void FrequencyMeasurement::SMC_backgroundProcessing() {
|
113
|
+
double result;
|
114
|
+
|
115
|
+
for (int i = 0; i < activeSites.size(); i++) {
|
116
|
+
int site = activeSites[i];
|
117
|
+
process(site);
|
118
|
+
if (_processResults) {
|
119
|
+
ARRAY_I captureData = rdi.site(site).id(suiteName).getVector();
|
120
|
+
if (_periodBased) {
|
121
|
+
result = calculatePeriod(captureData, _periodInNs);
|
122
|
+
} else {
|
123
|
+
result = calculateFrequency(captureData, _periodInNs);
|
124
|
+
}
|
125
|
+
SMC_TEST(site, "", suiteName, LIMIT(TM::GE, 1, TM::LE, 1),
|
126
|
+
funcResults[site]);
|
127
|
+
SMC_TEST(site, _pin, suiteName, testLimits().TEST_API_LIMIT,
|
128
|
+
filterResult(result));
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#ifndef ORIGEN_TEST_METHOD_FREQUENCY_MEASUREMENT_INCLUDED
|
2
|
+
#define ORIGEN_TEST_METHOD_FREQUENCY_MEASUREMENT_INCLUDED
|
3
|
+
|
4
|
+
#include "base.hpp"
|
5
|
+
#include "mapi.hpp"
|
6
|
+
#include "rdi.hpp"
|
7
|
+
|
8
|
+
using namespace std;
|
9
|
+
|
10
|
+
namespace Origen {
|
11
|
+
namespace TestMethod {
|
12
|
+
|
13
|
+
class FrequencyMeasurement : public Base {
|
14
|
+
void serialProcessing(int site);
|
15
|
+
|
16
|
+
int _periodBased;
|
17
|
+
string _pin;
|
18
|
+
string _port;
|
19
|
+
int _samples;
|
20
|
+
int _periodInNs;
|
21
|
+
int _processResults;
|
22
|
+
|
23
|
+
public:
|
24
|
+
FrequencyMeasurement();
|
25
|
+
virtual ~FrequencyMeasurement();
|
26
|
+
void SMC_backgroundProcessing();
|
27
|
+
|
28
|
+
FrequencyMeasurement& periodBased(int v);
|
29
|
+
FrequencyMeasurement& pin(string v);
|
30
|
+
FrequencyMeasurement& port(string v);
|
31
|
+
FrequencyMeasurement& samples(int v);
|
32
|
+
FrequencyMeasurement& periodInNs(int v);
|
33
|
+
FrequencyMeasurement& processResults(int v);
|
34
|
+
|
35
|
+
protected:
|
36
|
+
typedef FrequencyMeasurement super;
|
37
|
+
FrequencyMeasurement& getThis();
|
38
|
+
void _setup();
|
39
|
+
void _execute();
|
40
|
+
|
41
|
+
string label;
|
42
|
+
vector<int> funcResults;
|
43
|
+
};
|
44
|
+
}
|
45
|
+
}
|
46
|
+
#endif
|