origen_std_lib 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/config/application.rb +7 -19
  3. data/config/commands.rb +9 -0
  4. data/config/version.rb +2 -3
  5. data/lib/origen_std_lib/v93k.rb +17 -1
  6. data/{stdlib/v93k → src/advantest/smt7}/origen/.cproject +0 -0
  7. data/{stdlib/v93k → src/advantest/smt7}/origen/.project +0 -0
  8. data/src/advantest/smt7/origen/origen.cpp +18 -0
  9. data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
  10. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
  11. data/src/advantest/smt7/origen/origen/helpers/console.cpp +94 -0
  12. data/src/advantest/smt7/origen/origen/helpers/misc.cpp +456 -0
  13. data/src/advantest/smt7/origen/origen/helpers/time.cpp +64 -0
  14. data/src/advantest/smt7/origen/origen/site.cpp +237 -0
  15. data/src/advantest/smt7/origen/origen/site.hpp +49 -0
  16. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/test_method.hpp +1 -3
  17. data/src/advantest/smt7/origen/origen/test_method/base.cpp +231 -0
  18. data/src/advantest/smt7/origen/origen/test_method/base.hpp +155 -0
  19. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.cpp +266 -0
  20. data/src/advantest/smt7/origen/origen/test_method/dc_measurement.hpp +58 -0
  21. data/src/advantest/smt7/origen/origen/test_method/empty.cpp +13 -0
  22. data/src/advantest/smt7/origen/origen/test_method/empty.hpp +24 -0
  23. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.cpp +133 -0
  24. data/src/advantest/smt7/origen/origen/test_method/frequency_measurement.hpp +46 -0
  25. data/src/advantest/smt7/origen/origen/test_method/functional_test.cpp +168 -0
  26. data/src/advantest/smt7/origen/origen/test_method/functional_test.hpp +53 -0
  27. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils.hpp +1 -3
  28. data/src/advantest/smt7/origen/origen/utils/version.cpp +72 -0
  29. data/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils/version.hpp +20 -21
  30. data/src/advantest/smt7/origen/test_methods/ApplyBin.cpp +37 -0
  31. data/src/advantest/smt7/origen/test_methods/DCMeasurement.cpp +90 -0
  32. data/src/advantest/smt7/origen/test_methods/FrequencyMeasurement.cpp +50 -0
  33. data/src/advantest/smt7/origen/test_methods/FunctionalTest.cpp +24 -0
  34. data/src/advantest/smt7/origen/test_methods/RecordBin.cpp +39 -0
  35. data/src/advantest/smt8/origen/common/Origen.java +334 -0
  36. data/src/advantest/smt8/origen/common/OrigenData.java +391 -0
  37. data/src/advantest/smt8/origen/common/OrigenHelpers.java +170 -0
  38. data/src/advantest/smt8/origen/test_methods/Base.java +265 -0
  39. data/src/advantest/smt8/origen/test_methods/DC_Measurement.java +302 -0
  40. data/src/advantest/smt8/origen/test_methods/Empty.java +12 -0
  41. data/src/advantest/smt8/origen/test_methods/Functional_test.java +462 -0
  42. data/templates/web/faq.md.erb +1 -52
  43. data/templates/web/guides/intro.md.erb +8 -0
  44. data/templates/web/guides/{v93k/intro.md.erb → v93ksmt7/capture.md.erb} +0 -2
  45. data/templates/web/guides/v93ksmt7/complete.md.erb +68 -0
  46. data/templates/web/guides/v93ksmt7/customizable.md.erb +139 -0
  47. data/templates/web/guides/v93ksmt7/helpers.md.erb +3 -0
  48. data/templates/web/guides/{v93k → v93ksmt7}/install.md.erb +1 -1
  49. data/templates/web/guides/v93ksmt7/integration.md.erb +3 -0
  50. data/templates/web/guides/v93ksmt7/intro.md.erb +8 -0
  51. data/templates/web/guides/v93ksmt7/patching.md.erb +3 -0
  52. data/templates/web/guides/v93ksmt8/intro.md.erb +9 -0
  53. data/templates/web/index.md.erb +23 -6
  54. data/templates/web/layouts/_guides.html.erb +15 -3
  55. data/templates/web/partials/_common_args.md.erb +13 -0
  56. data/templates/web/partials/_navbar.html.erb +2 -2
  57. metadata +52 -32
  58. data/stdlib/v93k/origen/origen.cpp +0 -22
  59. data/stdlib/v93k/origen/origen/helpers/console.cpp +0 -105
  60. data/stdlib/v93k/origen/origen/helpers/misc.cpp +0 -311
  61. data/stdlib/v93k/origen/origen/site.cpp +0 -220
  62. data/stdlib/v93k/origen/origen/site.hpp +0 -51
  63. data/stdlib/v93k/origen/origen/test_method/base.hpp +0 -156
  64. data/stdlib/v93k/origen/origen/test_method/dc_measurement.cpp +0 -182
  65. data/stdlib/v93k/origen/origen/test_method/dc_measurement.hpp +0 -59
  66. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.cpp +0 -107
  67. data/stdlib/v93k/origen/origen/test_method/frequency_measurement.hpp +0 -48
  68. data/stdlib/v93k/origen/origen/test_method/functional_test.cpp +0 -125
  69. data/stdlib/v93k/origen/origen/test_method/functional_test.hpp +0 -52
  70. data/stdlib/v93k/origen/origen/utils/version.cpp +0 -79
  71. data/stdlib/v93k/origen/test_methods/ApplyBin.cpp +0 -41
  72. data/stdlib/v93k/origen/test_methods/DCMeasurement.cpp +0 -129
  73. data/stdlib/v93k/origen/test_methods/FrequencyMeasurement.cpp +0 -93
  74. data/stdlib/v93k/origen/test_methods/FunctionalTest.cpp +0 -94
  75. 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