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,265 @@
1
+ package origen.test_methods;
2
+
3
+ import origen.common.Origen;
4
+ import xoc.dta.TestMethod;
5
+ import xoc.dta.datatypes.MultiSiteBoolean;
6
+ import xoc.dta.datatypes.MultiSiteDouble;
7
+ import xoc.dta.datatypes.MultiSiteLong;
8
+ import xoc.dta.measurement.IMeasurement;
9
+ import xoc.dta.resultaccess.IMeasurementResult;
10
+ import xoc.dta.testdescriptor.IFunctionalTestDescriptor;
11
+ import xoc.dta.testdescriptor.IParametricTestDescriptor;
12
+
13
+ /** Origen testmethods base class. All testmethods inherit from this class */
14
+ public class Base extends TestMethod {
15
+ /** General testmethod parameters, used by all testmethods */
16
+ public IMeasurement measurement;
17
+
18
+ public String testName;
19
+ // TODO Verify forcePass implementation (also check if implemented in DC_Measurements)
20
+ public Boolean forcePass = false;
21
+ // Sites that passed will contain a '1' if forcePass has been set, otherwise undefined
22
+ public MultiSiteLong setOnPassFlags;
23
+ // Sites that failed will contain a '1' if forcePass has been set, otherwise undefined
24
+ public MultiSiteLong setOnFailFlags;
25
+ // When set to true the tester will never be released by Origen code, though your application
26
+ // test method code is still free to do so if you want
27
+ public Boolean sync = false;
28
+ /**
29
+ * The log level that will be used during the execution of the TP. Change the value here to get
30
+ * more, or less logging info
31
+ */
32
+ int origenLoglevel = Origen.LOG_WARNING;
33
+
34
+ /**
35
+ * Execute the checkparms() function? This is used to check if all testmethod parameters are
36
+ * parsed
37
+ */
38
+ boolean checkParams = true;
39
+
40
+ public void logTrace(String className, String method) {
41
+ message(Origen.LOG_METHODTRACE, "\t" + className + "\t" + method + "()");
42
+ }
43
+
44
+ // ********* FLOW LOGIC BELOW **********
45
+
46
+ /**
47
+ * Overridden setup function from the testmethod
48
+ *
49
+ * <p>The order is that first the setup() function is called by SMT, then the update() function
50
+ * and then the execute() function
51
+ *
52
+ * <p>This setup() function calls the _setup function from the underlying class (Can be
53
+ * DC_Measurement or Function_test), depending on the type of TM These subclasses are responsible
54
+ * for proper handling of the TM setup.
55
+ */
56
+ @Override
57
+ public void setup() {
58
+ Origen.context = context;
59
+ Origen.meas = measurement;
60
+ messageLogLevel = origenLoglevel;
61
+ logTrace("Base", "setup");
62
+ if (!dependenciesUnchanged()) {
63
+ _setup();
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Overridden update function from the testmethod
69
+ *
70
+ * <p>The order is that first the setup() function is called by SMT, then the update() function
71
+ * and then the execute() function
72
+ *
73
+ * <p>The update() function does nothing at the moment. It acts as a placeholder because all TM's
74
+ * should have an update function. If a TM wants the use the update() functionality from SMT it
75
+ * can implement this function itself
76
+ */
77
+ @Override
78
+ public void update() {
79
+ logTrace("Base", "update");
80
+ }
81
+
82
+ /**
83
+ * Overridden execute function from the testmethod
84
+ *
85
+ * <p>The order is that first the setup() function is called by SMT, then the update() function
86
+ * and then the execute() function
87
+ *
88
+ * <p>The execute() function first checks if the parameters are parsed. It then calls the body()
89
+ * function from the testmethod. This is the main function of the TM. Finally it necessary, it
90
+ * calls the process() function from the TM.
91
+ */
92
+ @Override
93
+ public void execute() {
94
+ logTrace("Base", "execute");
95
+
96
+ if (checkParams) {
97
+ checkParams();
98
+ }
99
+
100
+ if (forcePass) {
101
+ setOnPassFlags = new MultiSiteLong(1);
102
+ setOnFailFlags = new MultiSiteLong(0);
103
+ }
104
+
105
+ // Call the internal pre body function
106
+ _preBody();
107
+
108
+ // Call the application test method body
109
+ body();
110
+
111
+ // Call the application test method process method
112
+ process();
113
+
114
+ // Call the internal process results method
115
+ processResults();
116
+ }
117
+
118
+ /**
119
+ * Placeholder for the checkParams function. The goal of this function is to check if all the
120
+ * testmethod parameters that are passed to a testmethod are actually used This will make sure
121
+ * that parameters are not ignored. Should be overridden by testmethods when needed
122
+ */
123
+ public void checkParams() {
124
+ logTrace("Base", "checkParams");
125
+ }
126
+
127
+ public void measure_setup() {
128
+ logTrace("Base", "measure_setup");
129
+ }
130
+
131
+ public void process() {
132
+ logTrace("Base", "process");
133
+ }
134
+
135
+ public void _setup() {
136
+ logTrace("Base", "_setup");
137
+ }
138
+
139
+ public void run() {
140
+ logTrace("Base", "run");
141
+ }
142
+
143
+ public void _preBody() {
144
+ logTrace("Base", "_preBody");
145
+ }
146
+
147
+ public void body() {
148
+ logTrace("Base", "body");
149
+ run();
150
+ }
151
+
152
+ public void processResults() {
153
+ logTrace("Base", "processResults");
154
+ }
155
+
156
+ public void judgeAndDatalog(IFunctionalTestDescriptor t, MultiSiteBoolean passed) {
157
+ MultiSiteBoolean allPassed = new MultiSiteBoolean(true);
158
+
159
+ if (forcePass) {
160
+ for (int site : context.getActiveSites()) {
161
+ setOnPassFlags.set(site, setOnPassFlags.get(site) & (passed.get(site) ? 1 : 0));
162
+ setOnFailFlags.set(site, setOnFailFlags.get(site) | (passed.get(site) ? 0 : 1));
163
+ }
164
+ // Record that this test happened to STDF, but don't know how to log the true result
165
+ // without also causing it to fail/bin
166
+ t.evaluate(allPassed);
167
+ } else {
168
+ t.evaluate(passed);
169
+ }
170
+ for (int site : context.getActiveSites()) {
171
+ message(
172
+ Origen.LOG_PARAM,
173
+ "["
174
+ + site
175
+ + "]("
176
+ + t.getTestName()
177
+ + ") "
178
+ + " : "
179
+ + (passed.get(site) ? "PASSED" : "FAILED"));
180
+ }
181
+ }
182
+
183
+ public void judgeAndDatalog(IFunctionalTestDescriptor t, IMeasurementResult measurementResult) {
184
+ MultiSiteBoolean passed = measurementResult.hasPassed();
185
+ judgeAndDatalog(t, passed);
186
+ }
187
+
188
+ /**
189
+ * Log a multisite double
190
+ *
191
+ * @param t Name of the testdescriptor
192
+ * @param MSD
193
+ */
194
+ public void judgeAndDatalog(IParametricTestDescriptor t, MultiSiteDouble MSD) {
195
+
196
+ if (forcePass) {
197
+ boolean loLimitPresent, hiLimitPresent;
198
+ double lo = 0;
199
+ double hi = 0;
200
+
201
+ if (t.getLowLimit() == null) {
202
+ loLimitPresent = false;
203
+ } else {
204
+ loLimitPresent = true;
205
+ lo = t.getLowLimit().doubleValue();
206
+ }
207
+ if (t.getHighLimit() == null) {
208
+ hiLimitPresent = false;
209
+ } else {
210
+ hiLimitPresent = true;
211
+ hi = t.getHighLimit().doubleValue();
212
+ }
213
+
214
+ for (int site : context.getActiveSites()) {
215
+ boolean passed = true;
216
+ double val = MSD.get(site);
217
+
218
+ // TODO: How to handle difference between LT and LTE?
219
+ if (loLimitPresent) {
220
+ if (val < lo) {
221
+ passed = false;
222
+ }
223
+ }
224
+
225
+ if (hiLimitPresent) {
226
+ if (val > hi) {
227
+ passed = false;
228
+ }
229
+ }
230
+
231
+ setOnPassFlags.set(site, setOnPassFlags.get(site) & (passed ? 1 : 0));
232
+ setOnFailFlags.set(site, setOnFailFlags.get(site) | (passed ? 0 : 1));
233
+ }
234
+
235
+ t.setLowLimit(Double.NaN);
236
+ t.setHighLimit(Double.NaN);
237
+ }
238
+
239
+ t.evaluate(MSD);
240
+
241
+ MultiSiteBoolean pf = t.getPassFail();
242
+ for (int site : context.getActiveSites()) {
243
+ message(
244
+ Origen.LOG_PARAM,
245
+ "["
246
+ + site
247
+ + "]("
248
+ + t.getTestName()
249
+ + ") "
250
+ + MSD.get(site)
251
+ + " : "
252
+ + (pf.get(site) ? "PASSED" : "FAILED"));
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Log a multisite long
258
+ *
259
+ * @param t Name of the testdescriptor
260
+ * @param MSL
261
+ */
262
+ public void judgeAndDatalog(IParametricTestDescriptor t, MultiSiteLong MSL) {
263
+ judgeAndDatalog(t, MSL.toMultiSiteDouble());
264
+ }
265
+ }
@@ -0,0 +1,302 @@
1
+ package origen.test_methods;
2
+
3
+ import java.io.File;
4
+ import origen.common.Origen;
5
+ import origen.common.OrigenHelpers;
6
+ import xoc.dsa.DeviceSetupFactory;
7
+ import xoc.dsa.IDeviceSetup;
8
+ import xoc.dta.datatypes.MultiSiteDouble;
9
+ import xoc.dta.datatypes.MultiSiteDoubleArray;
10
+ import xoc.dta.resultaccess.IDigInOutActionResults;
11
+ import xoc.dta.resultaccess.IDigInOutActionResults.IIforceVmeasResults;
12
+ import xoc.dta.resultaccess.IDigInOutActionResults.IVforceImeasResults;
13
+ import xoc.dta.resultaccess.IMeasurementResult;
14
+ import xoc.dta.testdescriptor.IFunctionalTestDescriptor;
15
+ import xoc.dta.testdescriptor.IParametricTestDescriptor;
16
+
17
+ /** An example test method using test descriptor */
18
+ public class DC_Measurement extends Base {
19
+
20
+ public IFunctionalTestDescriptor FUNC;
21
+ public IParametricTestDescriptor PAR;
22
+
23
+ public enum MEAS {
24
+ CURR,
25
+ VOLT
26
+ }
27
+
28
+ MultiSiteDouble _result;
29
+
30
+ boolean _applyShutdown;
31
+ String _shutdownPattern;
32
+ int _checkShutdown;
33
+ MEAS _measure;
34
+ double _settlingTime;
35
+ String _pin;
36
+ double _forceValue;
37
+ double _iRange;
38
+ double _VclampLow;
39
+ double _VclampHigh;
40
+ boolean _highAccuracy;
41
+ double _limitsLow;
42
+ double _limitsHigh;
43
+ int _averages;
44
+
45
+ int _badc;
46
+ String _actionName;
47
+ public DC_Measurement origen;
48
+
49
+ static OrigenHelpers origenHelpers;
50
+
51
+ /** The result of executing the primary pattern */
52
+ private IMeasurementResult funcResult;
53
+
54
+ @Override
55
+ public void measure_setup() {
56
+ logTrace("DC_Measurement", "measure_setup");
57
+ }
58
+
59
+ public DC_Measurement applyShutdown(boolean v) {
60
+ _applyShutdown = v;
61
+ return this;
62
+ }
63
+
64
+ public DC_Measurement shutdownPattern(String v) {
65
+ _shutdownPattern = v;
66
+ return this;
67
+ }
68
+
69
+ public DC_Measurement checkShutdown(int v) {
70
+ _checkShutdown = v;
71
+ return this;
72
+ }
73
+
74
+ public DC_Measurement measure(MEAS volt) {
75
+ _measure = volt;
76
+ return this;
77
+ }
78
+
79
+ public DC_Measurement settlingTime(double v) {
80
+ _settlingTime = v;
81
+ return this;
82
+ }
83
+
84
+ public DC_Measurement averages(int v) {
85
+ _averages = v;
86
+ return this;
87
+ }
88
+
89
+ public DC_Measurement VclampLow(double v) {
90
+ _VclampLow = v;
91
+ return this;
92
+ }
93
+
94
+ public DC_Measurement VclampHigh(double v) {
95
+ _VclampHigh = v;
96
+ return this;
97
+ }
98
+
99
+ public DC_Measurement highAccuracy(boolean v) {
100
+ _highAccuracy = v;
101
+ return this;
102
+ }
103
+
104
+ public DC_Measurement limitsLow(double v) {
105
+ _limitsLow = v;
106
+ return this;
107
+ }
108
+
109
+ public DC_Measurement limitsHigh(double v) {
110
+ _VclampHigh = v;
111
+ return this;
112
+ }
113
+
114
+ public DC_Measurement pin(String v) {
115
+ _pin = v;
116
+ return this;
117
+ }
118
+
119
+ public DC_Measurement forceValue(double v) {
120
+ _forceValue = v;
121
+ return this;
122
+ }
123
+
124
+ public DC_Measurement iRange(double v) {
125
+ _iRange = v;
126
+ return this;
127
+ }
128
+
129
+ public DC_Measurement badc(int v) {
130
+ _badc = v;
131
+ return this;
132
+ }
133
+
134
+ public MultiSiteDouble result() {
135
+ return _result;
136
+ }
137
+
138
+ @Override
139
+ public void _setup() {
140
+ message(10, "DC_Measurement --> _Setup");
141
+ origen = this;
142
+ pin("NVM_ANALOGIO");
143
+ applyShutdown(true);
144
+ checkShutdown(1);
145
+ settlingTime(1000 * 1e-6);
146
+ forceValue(0);
147
+ iRange(0);
148
+ VclampLow(0);
149
+ VclampHigh(3);
150
+ highAccuracy(true);
151
+ limitsHigh(3);
152
+ limitsLow(0);
153
+ averages(1);
154
+ badc(0);
155
+ shutdownPattern("");
156
+
157
+ // Call setup from the testmethod
158
+ measure_setup();
159
+
160
+ message(Origen.LOG_METHODTRACE, "Setting up " + _measure + " measurement");
161
+
162
+ if (_measure == MEAS.VOLT) {
163
+ _actionName = "iforceVmeas";
164
+ } else {
165
+ _actionName = "vforceImeas";
166
+ }
167
+
168
+ if (_applyShutdown) {
169
+ if (_shutdownPattern.isEmpty()) {
170
+ // TODO Fix the relative paths for the shutdownpattern
171
+ shutdownPattern(measurement.getPatternName() + "_part1");
172
+ String workingDirectory = System.getProperty("user.dir");
173
+ String[] parts = _shutdownPattern.split("\\.");
174
+ String file = workingDirectory + "/src/patterns/" + parts[2] + ".pat";
175
+ File f = new File(measurement.getPatternName());
176
+ if (f.exists()) {
177
+ message(Origen.LOG_METHODTRACE, "Shutdown pattern " + file + " found, using it.");
178
+ } else {
179
+ message(
180
+ Origen.LOG_FAIL,
181
+ "Shutdown pattern " + file + " not found, NOT using a shutdown pattern!");
182
+ applyShutdown(false);
183
+ shutdownPattern("");
184
+ }
185
+ }
186
+ }
187
+
188
+ // Create an action sequence for the measurement
189
+ IDeviceSetup ds = DeviceSetupFactory.createInstance();
190
+ ds.importSpec(measurement.getSpecificationName());
191
+
192
+ // ISetupDigInOut dcVISetup = ds.addDigInOut("NVM_ANA_PIN");
193
+ // forceValue = I_force; // The forced current
194
+ // waitTime = 1000us; // A delay between forcing the current and measuring the voltage
195
+ // vclampHigh = 3V; // The upper-limit of the voltage clamp
196
+ // vclampLow = 0.0V; // The lower-limit of the voltage clamp
197
+ // highAccuracy = true; // The highAccuracy mode of the digInOut instrument is turned off
198
+ // in this example
199
+ // limits.low = 0V; // The lower-limit for the measurment to pass
200
+ // limits.high = 3V; // The upper-limit for the measurement to pass
201
+ //
202
+ //
203
+ // IIforceVmeas iforceVmeas = dcVISetup.iforceVmeas("iforceVmeas");
204
+ // iforceVmeas.setForceValue(0);
205
+ // iforceVmeas.setVclampHigh(1);
206
+ // iforceVmeas.setVclampLow(-1);
207
+ // iforceVmeas.setAverages(_averages);
208
+ // iforceVmeas.setWaitTime(_settlingTime)
209
+ //
210
+ // action iforceVmeas iforceVmeas {
211
+ // forceValue = I_force; // The forced current
212
+ // waitTime = 1000us; // A delay between forcing the current and measuring the
213
+ // voltage
214
+ // vclampHigh = 3V; // The upper-limit of the voltage clamp
215
+ // vclampLow = 0.0V; // The lower-limit of the voltage clamp
216
+ // highAccuracy = true; // The highAccuracy mode of the digInOut instrument is turned
217
+ // off in this example
218
+ // limits.low = 0V; // The lower-limit for the measurment to pass
219
+ // limits.high = 3V; // The upper-limit for the measurement to pass
220
+ //
221
+ // }
222
+ // action vforceImeas vforceImeas {
223
+ // forceValue = V_force; // The forced voltage
224
+ // waitTime = 1.5ms; // A delay between forcing the voltage and measuring the current
225
+ // irange = 0.1uA; // The expected range of the measured current
226
+ // highAccuracy = false; // The highAccuracy mode of the digInOut instrument is
227
+ // turned off in this example
228
+ // limits.low = -20.0nA; // The lower-limit for the measurment to pass
229
+ // limits.high = -5.0nA; // The upper-limit for the measurement to pass
230
+ //
231
+ // }
232
+
233
+ // ds.parallelBegin("MeasurementSequence");
234
+ // {
235
+ ds.sequentialBegin("PatAndShutdownSeq");
236
+ {
237
+ ds.patternCall(measurement.getPatternName());
238
+ ds.actionCall(_actionName);
239
+ if (_applyShutdown) {
240
+ ds.patternCall(_shutdownPattern);
241
+ }
242
+ }
243
+ ds.sequentialEnd();
244
+ // }
245
+ // ds.parallelEnd();
246
+
247
+ measurement.setSetups(ds);
248
+ }
249
+
250
+ @Override
251
+ public void run() {
252
+ MultiSiteDoubleArray intermediateResult;
253
+
254
+ logTrace("DC_Measurement", "run");
255
+ super.run();
256
+ measurement.execute();
257
+
258
+ // postBody should be added and called here
259
+
260
+ // protect results to be not overwritten
261
+ IDigInOutActionResults actionResults = measurement.digInOut(_pin).preserveActionResults();
262
+ funcResult = measurement.preserveResult();
263
+
264
+ // Assume for now that if force pass is set then branching decision could be dependent on the
265
+ // result of this test, in future add another attribute to control async processing on/off
266
+ if (!sync && !forcePass) {
267
+ releaseTester();
268
+ }
269
+
270
+ // Make the DC measurement result available
271
+ if (_measure == MEAS.VOLT) {
272
+ IIforceVmeasResults ifvmResults = actionResults.iforceVmeas(_actionName);
273
+ intermediateResult = ifvmResults.getVoltage(_pin);
274
+
275
+ } else { // MEAS.CURR
276
+ IVforceImeasResults ifvmResults = actionResults.vforceImeas(_actionName);
277
+ intermediateResult = ifvmResults.getCurrent(_pin);
278
+ }
279
+
280
+ // Loop through the sites to get the data
281
+ _result = new MultiSiteDouble();
282
+ for (int site : context.getActiveSites()) {
283
+ if (intermediateResult.get(site).length > 1) {
284
+ message(
285
+ 1,
286
+ "Warning: not all measurements are logged, only the first one, change in DC_Measurement.java to include more");
287
+ }
288
+ _result.set(site, intermediateResult.get(site)[0]);
289
+ }
290
+ }
291
+
292
+ @Override
293
+ public void processResults() {
294
+ judgeAndDatalog(FUNC, funcResult);
295
+
296
+ judgeAndDatalog(PAR, filterResult(_result));
297
+ }
298
+
299
+ public MultiSiteDouble filterResult(MultiSiteDouble MSD) {
300
+ return MSD;
301
+ }
302
+ }