origen_std_lib 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/config/application.rb +13 -0
  3. data/config/version.rb +1 -1
  4. data/stdlib/v93k/origen/Debug/liborigen.so +0 -0
  5. data/stdlib/v93k/origen/Debug/makefile +63 -0
  6. data/stdlib/v93k/origen/Debug/objects.mk +8 -0
  7. data/stdlib/v93k/origen/Debug/origen.d +1477 -0
  8. data/stdlib/v93k/origen/Debug/origen.o +0 -0
  9. data/stdlib/v93k/origen/Debug/origen/helpers/console.d +1483 -0
  10. data/stdlib/v93k/origen/Debug/origen/helpers/console.o +0 -0
  11. data/stdlib/v93k/origen/Debug/origen/helpers/misc.d +1483 -0
  12. data/stdlib/v93k/origen/Debug/origen/helpers/misc.o +0 -0
  13. data/stdlib/v93k/origen/Debug/origen/helpers/subdir.mk +27 -0
  14. data/stdlib/v93k/origen/Debug/origen/site.d +1469 -0
  15. data/stdlib/v93k/origen/Debug/origen/site.o +0 -0
  16. data/stdlib/v93k/origen/Debug/origen/subdir.mk +24 -0
  17. data/stdlib/v93k/origen/Debug/origen/test_method/dc_measurement.d +1501 -0
  18. data/stdlib/v93k/origen/Debug/origen/test_method/dc_measurement.o +0 -0
  19. data/stdlib/v93k/origen/Debug/origen/test_method/frequency_measurement.d +1502 -0
  20. data/stdlib/v93k/origen/Debug/origen/test_method/frequency_measurement.o +0 -0
  21. data/stdlib/v93k/origen/Debug/origen/test_method/functional_test.d +1501 -0
  22. data/stdlib/v93k/origen/Debug/origen/test_method/functional_test.o +0 -0
  23. data/stdlib/v93k/origen/Debug/origen/test_method/subdir.mk +30 -0
  24. data/stdlib/v93k/origen/Debug/origen/utils/subdir.mk +24 -0
  25. data/stdlib/v93k/origen/Debug/origen/utils/version.d +4 -0
  26. data/stdlib/v93k/origen/Debug/origen/utils/version.o +0 -0
  27. data/stdlib/v93k/origen/Debug/sources.mk +32 -0
  28. data/stdlib/v93k/origen/Debug/subdir.mk +24 -0
  29. data/stdlib/v93k/origen/Debug/test_methods/ApplyBin.d +1487 -0
  30. data/stdlib/v93k/origen/Debug/test_methods/ApplyBin.o +0 -0
  31. data/stdlib/v93k/origen/Debug/test_methods/DCMeasurement.d +1508 -0
  32. data/stdlib/v93k/origen/Debug/test_methods/DCMeasurement.o +0 -0
  33. data/stdlib/v93k/origen/Debug/test_methods/FrequencyMeasurement.d +1508 -0
  34. data/stdlib/v93k/origen/Debug/test_methods/FrequencyMeasurement.o +0 -0
  35. data/stdlib/v93k/origen/Debug/test_methods/FunctionalTest.d +1511 -0
  36. data/stdlib/v93k/origen/Debug/test_methods/FunctionalTest.o +0 -0
  37. data/stdlib/v93k/origen/Debug/test_methods/RecordBin.d +1487 -0
  38. data/stdlib/v93k/origen/Debug/test_methods/RecordBin.o +0 -0
  39. data/stdlib/v93k/origen/Debug/test_methods/subdir.mk +36 -0
  40. data/stdlib/v93k/origen/origen.cpp +22 -0
  41. data/stdlib/v93k/origen/origen.hpp +22 -0
  42. data/stdlib/v93k/origen/origen/helpers.hpp +44 -0
  43. data/stdlib/v93k/origen/origen/helpers/console.cpp +105 -0
  44. data/stdlib/v93k/origen/origen/helpers/misc.cpp +305 -0
  45. data/stdlib/v93k/origen/origen/site.cpp +220 -0
  46. data/stdlib/v93k/origen/origen/site.hpp +51 -0
  47. data/stdlib/v93k/origen/origen/test_method.hpp +17 -0
  48. data/stdlib/v93k/origen/origen/test_method/base.hpp +151 -0
  49. data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +182 -0
  50. data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +59 -0
  51. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +109 -0
  52. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +48 -0
  53. data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +119 -0
  54. data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +51 -0
  55. data/stdlib/v93k/origen/origen/utils.hpp +12 -0
  56. data/stdlib/v93k/origen/origen/utils/version.cpp +79 -0
  57. data/stdlib/v93k/origen/origen/utils/version.hpp +64 -0
  58. data/stdlib/v93k/origen/test_methods/ApplyBin.cpp +41 -0
  59. data/stdlib/v93k/origen/test_methods/DCMeasurement.cpp +127 -0
  60. data/stdlib/v93k/origen/test_methods/FrequencyMeasurement.cpp +91 -0
  61. data/stdlib/v93k/origen/test_methods/FunctionalTest.cpp +92 -0
  62. data/stdlib/v93k/origen/test_methods/RecordBin.cpp +48 -0
  63. metadata +60 -1
@@ -0,0 +1,220 @@
1
+ #include "site.hpp"
2
+ #include <libcicpi.h>
3
+ #include <iostream>
4
+ #include "helpers.hpp"
5
+ using namespace std;
6
+
7
+ namespace Origen {
8
+
9
+ Site::Site(int number) {
10
+ _number = number;
11
+ lotidSet = false;
12
+ waferSet = false;
13
+ xSet = false;
14
+ ySet = false;
15
+ binSet = false;
16
+ softbinSet = false;
17
+ }
18
+ Site::~Site() {}
19
+
20
+ /// Set the lot ID to the given value, e.g. "ABC1234"
21
+ void Site::lotid(string val) {
22
+ lotidSet = true;
23
+ _lotid = val;
24
+ }
25
+
26
+
27
+ /// Set the lot ID based on the integer representation returned from lotidInt
28
+ void Site::lotid(uint64_t val) {
29
+ string id = "";
30
+
31
+ for(int i = 0; i < 8; i++) {
32
+ int ch = val >> (8 * (7 - i));
33
+ if (ch != 0) {
34
+ id = id + (char)ch;
35
+ }
36
+ }
37
+
38
+ lotid(id);
39
+ }
40
+
41
+
42
+ /// Get the lot ID. If it has not previously been set to a value it will be automatically queried from the test system.
43
+ string Site::lotid() {
44
+ if (!lotidSet) {
45
+ char value[CI_CPI_MAX_MODL_STRING_LEN * 2];
46
+ if (!GetModelfileString(const_cast<char*>("LOT_ID"), value)) {
47
+ _lotid = (string) value;
48
+ } else {
49
+ _lotid = "Undefined";
50
+ }
51
+ lotidSet = true;
52
+ }
53
+ return _lotid;
54
+ }
55
+
56
+ /// Returns the lot ID as a 64-bit integer that is suitable for programming to the device.
57
+ /// Each character in the lotID is converted to its ASCII code.
58
+ /// An error will be raised if the length of the current lotID overflows 64-bits.
59
+ uint64_t Site::lotidInt() {
60
+ string id = lotid();
61
+ stringstream val;
62
+
63
+ // If the ID is > 8 chars then lose the upper chars, making the assuming that the lower ones are
64
+ // the more significant ones for the purposes of identifying a particular lot
65
+ if (id.length() > 8) {
66
+ id = id.substr(id.length() - 8, 8);
67
+ }
68
+ if (id.length() > 0) val << toHex((int)id.at(0));
69
+ if (id.length() > 1) val << toHex((int)id.at(1));
70
+ if (id.length() > 2) val << toHex((int)id.at(2));
71
+ if (id.length() > 3) val << toHex((int)id.at(3));
72
+ if (id.length() > 4) val << toHex((int)id.at(4));
73
+ if (id.length() > 5) val << toHex((int)id.at(5));
74
+ if (id.length() > 6) val << toHex((int)id.at(6));
75
+ if (id.length() > 7) val << toHex((int)id.at(7));
76
+
77
+ return toUInt(val.str(), 16);
78
+ }
79
+
80
+
81
+ /// Set the wafer number to the given value
82
+ void Site::wafer(int val) {
83
+ waferSet = true;
84
+ if (val < 0 || val > 255) {
85
+ cout << "ERROR: Wafer is out of the range of a UInt8: " << val << endl;
86
+ ERROR_EXIT(TM::EXIT_FLOW);
87
+ }
88
+ _wafer = (uint8_t)val;
89
+ }
90
+
91
+ /// Get the wafer number. If it has not previously been set to a value it will be automatically queried from the test system.
92
+ int Site::wafer() {
93
+ if (!waferSet) {
94
+ char value[CI_CPI_MAX_MODL_STRING_LEN * 2];
95
+
96
+ // if (!GetModelfileString(const_cast<char*>("WAFER_ID"), value)) {
97
+ // Expect to return something like "AB1234-15AA", where 15 is the wafer number
98
+ //wafer(toInt(split((string) value, '-')[1].substr(0, 2)));
99
+ if (!GetModelfileString(const_cast<char*>("WAFER_NUMBER"), value)) {
100
+ wafer(toInt((string) value));
101
+ } else {
102
+ wafer(0xFF);
103
+ }
104
+ waferSet = true;
105
+ }
106
+ return _wafer;
107
+ }
108
+
109
+
110
+ /// Set the X co-ordinate to the given value
111
+ void Site::x(int val) {
112
+ xSet = true;
113
+ _x = val;
114
+ }
115
+
116
+ /// Get the X co-ord. If it has not previously been set to a value it will be automatically queried from the test system.
117
+ int Site::x() {
118
+ if (!xSet) {
119
+ long lx, ly;
120
+ GetDiePosXYOfSite(_number, &lx, &ly);
121
+ if (lx < -32768 || lx > 32767) {
122
+ cout << "ERROR: X is out of the range of an Int16: " << lx << endl;
123
+ ERROR_EXIT(TM::EXIT_FLOW);
124
+ }
125
+ if (ly < -32768 || ly > 32767) {
126
+ cout << "ERROR: Y is out of the range of an Int16: " << ly << endl;
127
+ ERROR_EXIT(TM::EXIT_FLOW);
128
+ }
129
+ _x = (int) lx;
130
+ _y = (int) ly;
131
+ xSet = true;
132
+ ySet = true;
133
+ }
134
+ return _x;
135
+ }
136
+
137
+
138
+ /// Set the Y co-ordinate to the given value
139
+ void Site::y(int val) {
140
+ ySet = true;
141
+ _y = val;
142
+ }
143
+
144
+ /// Get the Y co-ord. If it has not previously been set to a value it will be automatically queried from the test system.
145
+ int Site::y() {
146
+ if (!ySet) {
147
+ long lx, ly;
148
+ GetDiePosXYOfSite(_number, &lx, &ly);
149
+ if (lx < -32768 || lx > 32767) {
150
+ cout << "ERROR: X is out of the range of an Int16: " << lx << endl;
151
+ ERROR_EXIT(TM::EXIT_FLOW);
152
+ }
153
+ if (ly < -32768 || ly > 32767) {
154
+ cout << "ERROR: Y is out of the range of an Int16: " << ly << endl;
155
+ ERROR_EXIT(TM::EXIT_FLOW);
156
+ }
157
+ _x = (int) lx;
158
+ _y = (int) ly;
159
+ xSet = true;
160
+ ySet = true;
161
+ }
162
+ return _y;
163
+ }
164
+
165
+ /// Set the site's bin to the given value, but only if a bin has not already been set.
166
+ /// Note that this does not actually bin out the site but just records the bin assignment
167
+ /// in a variable that can be retrieved by calling bin().
168
+ void Site::bin(int val) {
169
+ if (!binSet) {
170
+ binSet = true;
171
+ _bin = val;
172
+ }
173
+ }
174
+
175
+ /// Set the site's bin to the given value, but only if a bin has not already been set or
176
+ /// if the force argument is set to true, in which case it will overwrite any previous
177
+ /// assignment.
178
+ /// Note that this does not actually bin out the site but just records the bin assignment
179
+ /// in a variable that can be retrieved by calling bin().
180
+ void Site::bin(int val, bool force) {
181
+ if (!binSet || force) {
182
+ binSet = true;
183
+ _bin = val;
184
+ }
185
+ }
186
+
187
+ /// Returns the bin that has been assigned to the site by previously calling bin(int), if no
188
+ /// bin has been assigned then it will return 0.
189
+ int Site::bin() {
190
+ return (binSet) ? _bin : 0;
191
+ }
192
+
193
+ /// Set the site's softbin to the given value, but only if a softbin has not already been set.
194
+ /// Note that this does not actually bin out the site but just records the softbin assignment
195
+ /// in a variable that can be retrieved by calling softbin().
196
+ void Site::softbin(int val) {
197
+ if (!softbinSet) {
198
+ softbinSet = true;
199
+ _softbin = val;
200
+ }
201
+ }
202
+
203
+ /// Set the site's softbin to the given value, but only if a softbin a has not already been set or
204
+ /// if the force argument is set to true, in which case it will overwrite any previous
205
+ /// assignment.
206
+ /// Note that this does not actually bin out the site but just records the softbin assignment
207
+ /// in a variable that can be retrieved by calling softbin().
208
+ void Site::softbin(int val, bool force) {
209
+ if (!softbinSet || force) {
210
+ softbinSet = true;
211
+ _softbin = val;
212
+ }
213
+ }
214
+
215
+ /// Returns the bin that has been assigned to the site by previously calling bin(int), if no
216
+ /// bin has been assigned then it will return 0.
217
+ int Site::softbin() {
218
+ return (softbinSet) ? _softbin : 0;
219
+ }
220
+ } /* namespace Origen */
@@ -0,0 +1,51 @@
1
+ #ifndef ORIGEN_SITE_HPP_
2
+ #define ORIGEN_SITE_HPP_
3
+
4
+ #include <string>
5
+ using namespace std;
6
+
7
+ namespace Origen {
8
+
9
+ class Site {
10
+ string _lotid;
11
+ bool lotidSet;
12
+ int _wafer;
13
+ bool waferSet;
14
+ int _x;
15
+ bool xSet;
16
+ int _y;
17
+ bool ySet;
18
+ int _number;
19
+ int _bin;
20
+ int _softbin;
21
+ bool binSet;
22
+ bool softbinSet;
23
+
24
+
25
+ public:
26
+ Site(int);
27
+ virtual ~Site();
28
+ string lotid();
29
+ uint64_t lotidInt();
30
+ void lotid(string);
31
+ void lotid(uint64_t);
32
+ int wafer();
33
+ void wafer(int);
34
+ int x();
35
+ void x(int);
36
+ int y();
37
+ void y(int);
38
+ int bin();
39
+ void bin(int);
40
+ void bin(int, bool);
41
+ int softbin();
42
+ void softbin(int);
43
+ void softbin(int, bool);
44
+
45
+ /// Returns the site number associated with the given site object
46
+ int number() { return _number; }
47
+ };
48
+
49
+
50
+ } /* namespace Origen */
51
+ #endif
@@ -0,0 +1,17 @@
1
+ #ifndef ORIGEN_TEST_METHOD_INCLUDED
2
+ #define ORIGEN_TEST_METHOD_INCLUDED
3
+
4
+ #include "mapi.hpp"
5
+ #include "rdi.hpp"
6
+
7
+ #define origen getThis()
8
+
9
+ using namespace std;
10
+
11
+ namespace Origen {
12
+ namespace TestMethod {
13
+
14
+ }
15
+ }
16
+
17
+ #endif
@@ -0,0 +1,151 @@
1
+ #ifndef ORIGEN_TEST_METHOD_BASE_INCLUDED
2
+ #define ORIGEN_TEST_METHOD_BASE_INCLUDED
3
+
4
+ #include "../test_method.hpp"
5
+ #include "../../origen.hpp"
6
+
7
+ namespace Origen {
8
+ namespace TestMethod {
9
+
10
+ class Base {
11
+ bool _async;
12
+ bool _syncup;
13
+
14
+ public:
15
+ virtual ~Base() {
16
+ }
17
+ Base() {
18
+ async(false);
19
+ syncup(false);
20
+ }
21
+
22
+ Base & async(bool v) { _async = v; return *this; }
23
+ Base & syncup(bool v) { _syncup = v; return *this; }
24
+
25
+ protected:
26
+ /// Returns 1 when running in offline mode
27
+ int offline() {
28
+ int flag;
29
+ GET_SYSTEM_FLAG("offline", &flag);
30
+ return flag;
31
+ }
32
+
33
+ // Returns an object containing the test limits, this can be passed to SMT APIs that take a LIMITS
34
+ // object argument. To actually get the limit values use loLimit() and hiLimit().
35
+ LIMIT limits() {
36
+ return GET_LIMIT_OBJECT("Functional");
37
+ }
38
+
39
+ /// Returns the high limit value in whole units, i.e. A or V
40
+ double hiLimit() {
41
+ double lim = 0.0;
42
+ double * plim = &lim;
43
+
44
+ limits().getHigh(plim);
45
+ return lim;
46
+ }
47
+
48
+ /// Returns the low limit value in whole units, i.e. A or V
49
+ double loLimit() {
50
+ double lim = 0.0;
51
+ double * plim = &lim;
52
+
53
+ limits().getLow(plim);
54
+ return lim;
55
+ }
56
+
57
+ // Called immediately before the first RDI operation is executed
58
+ virtual void preTestFunc() {
59
+ }
60
+ virtual void preTestFunc(int site) {
61
+ }
62
+
63
+ // Called before the main RDI operation is executed, giving the chance to add
64
+ // additional settings to it
65
+ virtual void filterRDI(SMART_RDI::dcBase & prdi) {
66
+ }
67
+ virtual void filterRDI(SMART_RDI::DIG_CAP & prdi) {
68
+ }
69
+ virtual void filterRDI(SMART_RDI::FUNC & prdi) {
70
+ }
71
+
72
+ // If the test has a hold state, this will be called immediately after the hold
73
+ // state pattern has run
74
+ virtual void holdStateFunc() {
75
+ }
76
+ virtual void holdStateFunc(int site) {
77
+ }
78
+
79
+ // Called after the last RDI operation has executed and all results have been
80
+ // fetched
81
+ virtual void postTestFunc() {
82
+ }
83
+ virtual void postTestFunc(int site) {
84
+ }
85
+
86
+ // Called immediately before the final result processing. If the test is configured for async
87
+ // processing then this will be called later in the background. Contrast this with the
88
+ // postTestFunc which will be called before the main test body completes.
89
+ virtual void processFunc(int site) {
90
+ }
91
+
92
+ // Called before the main test result is judged, giving a chance to transform it
93
+ virtual double filterResult(double result) {
94
+ return result;
95
+ }
96
+
97
+ virtual bool async() {
98
+ return _async;
99
+ }
100
+ virtual bool syncup() {
101
+ return _syncup;
102
+ }
103
+
104
+ virtual void serialProcessing(int site) {};
105
+
106
+ void enableHiddenUpload() {
107
+ if (async()) {
108
+ rdi.hiddenUpload(TA::ALL);
109
+ } else {
110
+ rdi.hiddenUpload(TA::NO);
111
+ }
112
+ }
113
+
114
+ void callPreTestFunc() {
115
+ if (syncup()) {
116
+ synchronize();
117
+ }
118
+ preTestFunc();
119
+ FOR_EACH_SITE_BEGIN();
120
+ preTestFunc(CURRENT_SITE_NUMBER());
121
+ FOR_EACH_SITE_END();
122
+ }
123
+
124
+ void callHoldStateFunc() {
125
+ holdStateFunc();
126
+ FOR_EACH_SITE_BEGIN();
127
+ holdStateFunc(CURRENT_SITE_NUMBER());
128
+ FOR_EACH_SITE_END();
129
+ }
130
+
131
+ template <class T>
132
+ void callPostTestFunc(T* obj) {
133
+ ON_FIRST_INVOCATION_BEGIN();
134
+ postTestFunc();
135
+ FOR_EACH_SITE_BEGIN();
136
+ postTestFunc(CURRENT_SITE_NUMBER());
137
+ FOR_EACH_SITE_END();
138
+ ON_FIRST_INVOCATION_END();
139
+
140
+ if (async()) {
141
+ SMC_ARM_internal(obj);
142
+ } else {
143
+ processFunc(CURRENT_SITE_NUMBER());
144
+ this->serialProcessing(CURRENT_SITE_NUMBER());
145
+ }
146
+ }
147
+ };
148
+ }
149
+ }
150
+
151
+ #endif /* BASE_HPP_ */
@@ -0,0 +1,182 @@
1
+ #include "dc_measurement.hpp"
2
+
3
+ using namespace std;
4
+
5
+ namespace Origen {
6
+ namespace TestMethod {
7
+
8
+
9
+ // Defaults
10
+ DCMeasurement::DCMeasurement() {
11
+ applyShutdown(1);
12
+ checkShutdown(1);
13
+ measure("VOLT");
14
+ settlingTime(0);
15
+ forceValue(0);
16
+ iRange(0);
17
+ processResults(1);
18
+ badc(0);
19
+ }
20
+
21
+ DCMeasurement::~DCMeasurement() { }
22
+
23
+ DCMeasurement & DCMeasurement::applyShutdown(int v) { _applyShutdown = v; return *this; }
24
+ DCMeasurement & DCMeasurement::shutdownPattern(string v) { _shutdownPattern = v; return *this; }
25
+ DCMeasurement & DCMeasurement::checkShutdown(int v) { _checkShutdown = v; return *this; }
26
+ DCMeasurement & DCMeasurement::measure(string v) { _measure = v; return *this; }
27
+ DCMeasurement & DCMeasurement::settlingTime(double v) { _settlingTime = v; return *this; }
28
+ DCMeasurement & DCMeasurement::pin(string v) { _pin = v; return *this; }
29
+ DCMeasurement & DCMeasurement::forceValue(double v) { _forceValue = v; return *this; }
30
+ DCMeasurement & DCMeasurement::iRange(double v) { _iRange = v; return *this; }
31
+ DCMeasurement & DCMeasurement::processResults(int v) { _processResults = v; return *this; }
32
+ DCMeasurement & DCMeasurement::badc(int v) { _badc = v; return *this; }
33
+
34
+ // All test methods must implement this function
35
+ DCMeasurement & DCMeasurement::getThis() { return *this; }
36
+
37
+ void DCMeasurement::execute() {
38
+
39
+ int site, physicalSites;
40
+ ARRAY_I sites;
41
+
42
+ RDI_INIT();
43
+
44
+ ON_FIRST_INVOCATION_BEGIN();
45
+
46
+ enableHiddenUpload();
47
+ GET_ACTIVE_SITES(activeSites);
48
+ physicalSites = GET_CONFIGURED_SITES(sites);
49
+ results.resize(physicalSites + 1);
50
+ funcResultsPre.resize(physicalSites + 1);
51
+ funcResultsPost.resize(physicalSites + 1);
52
+ GET_TESTSUITE_NAME(testSuiteName);
53
+ label = Primary.getLabel();
54
+
55
+ pin(extractPinsFromGroup(_pin));
56
+
57
+ if (_applyShutdown) {
58
+ if (_shutdownPattern.empty()) {
59
+ ostringstream pat;
60
+ pat << label << "_part1";
61
+ shutdownPattern(pat.str());
62
+ }
63
+ }
64
+
65
+ if (!_iRange && _measure == "CURR") {
66
+ double l = loLimit();
67
+ double h = hiLimit();
68
+ if (l == 0 && h == 0) {
69
+ cout << "ERROR: If your current measurement does not have a limit, you must supply the current range" << endl;
70
+ ERROR_EXIT(TM::ABORT_FLOW);
71
+ }
72
+ if (abs(l) > abs(h))
73
+ _iRange = abs(l);
74
+ else
75
+ _iRange = abs(h);
76
+ }
77
+
78
+
79
+ callPreTestFunc();
80
+
81
+ RDI_BEGIN();
82
+
83
+ rdi.func(testSuiteName + "f1").label(label).execute();
84
+
85
+ callHoldStateFunc();
86
+
87
+ if(_measure == "VOLT") {
88
+
89
+ if (_badc) {
90
+ rdi.dc(testSuiteName)
91
+ .pin(_pin, TA::BADC)
92
+ .measWait(_settlingTime)
93
+ .vMeas()
94
+ .execute();
95
+
96
+ } else {
97
+ SMART_RDI::dcBase & prdi = rdi.dc(testSuiteName)
98
+ .pin(_pin)
99
+ .iForce(_forceValue)
100
+ .measWait(_settlingTime)
101
+ .relay(TA::ppmuRly_onPPMU_offACDC,TA::ppmuRly_onAC_offDCPPMU)
102
+ .vMeas();
103
+ filterRDI(prdi);
104
+ prdi.execute();
105
+
106
+ }
107
+
108
+
109
+
110
+ } else {
111
+
112
+ SMART_RDI::dcBase & prdi = rdi.dc(testSuiteName)
113
+ .pin(_pin)
114
+ .vForce(_forceValue)
115
+ .relay(TA::ppmuRly_onPPMU_offACDC,TA::ppmuRly_onAC_offDCPPMU)
116
+ .measWait(_settlingTime)
117
+ .iRange(_iRange)
118
+ .iMeas();
119
+ filterRDI(prdi);
120
+ prdi.execute();
121
+ }
122
+
123
+ if (_applyShutdown) rdi.func(testSuiteName + "f2").label(_shutdownPattern).execute();
124
+
125
+ RDI_END();
126
+
127
+ FOR_EACH_SITE_BEGIN();
128
+ site = CURRENT_SITE_NUMBER();
129
+ funcResultsPre[site] = rdi.id(testSuiteName + "f1").getPassFail();
130
+ if (_applyShutdown) funcResultsPost[site] = rdi.id(testSuiteName + "f2").getPassFail();
131
+ // TODO: This retrieval needs to move to the SMC func in the async case
132
+ if (offline()) {
133
+ if (!loLimit() && !hiLimit()) {
134
+ results[site] = 0;
135
+ } else if(loLimit() && hiLimit()) {
136
+ results[site] = ((hiLimit() - loLimit()) / 2) + loLimit();
137
+ } else if (loLimit()) {
138
+ results[site] = loLimit();
139
+ } else {
140
+ results[site] = hiLimit();
141
+ }
142
+
143
+ } else {
144
+ results[site] = rdi.id(testSuiteName).getValue();
145
+ }
146
+
147
+ FOR_EACH_SITE_END();
148
+
149
+ ON_FIRST_INVOCATION_END();
150
+
151
+ callPostTestFunc(this);
152
+ }
153
+
154
+ void DCMeasurement::serialProcessing(int site) {
155
+ if (_processResults) {
156
+ logFunctionalTest(testSuiteName, site, funcResultsPre[site] == 1, label);
157
+ TESTSET().cont(true).judgeAndLog_FunctionalTest(funcResultsPre[site] == 1);
158
+
159
+ logParametricTest(testSuiteName, site, filterResult(results[site]), limits(), _pin);
160
+ TESTSET().judgeAndLog_ParametricTest(_pin, testSuiteName, limits(), filterResult(results[site]));
161
+
162
+ if (_applyShutdown && _checkShutdown) {
163
+ logFunctionalTest(testSuiteName, site, funcResultsPost[site] == 1, _shutdownPattern);
164
+ TESTSET().cont(true).judgeAndLog_FunctionalTest(funcResultsPost[site] == 1);
165
+ }
166
+ }
167
+ }
168
+
169
+ void DCMeasurement::SMC_backgroundProcessing() {
170
+ for (int i = 0; i < activeSites.size(); i++) {
171
+ int site = activeSites[i];
172
+ processFunc(site);
173
+ if (_processResults) {
174
+ SMC_TEST(site, "", testSuiteName, LIMIT(TM::GE, 1, TM::LE, 1), funcResultsPre[site]);
175
+ if (_applyShutdown && _checkShutdown) SMC_TEST(site, "", testSuiteName, LIMIT(TM::GE, 1, TM::LE, 1), funcResultsPost[site]);
176
+ SMC_TEST(site, _pin, testSuiteName, limits(), filterResult(results[site]));
177
+ }
178
+ }
179
+ }
180
+
181
+ }
182
+ }