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.
- checksums.yaml +5 -5
- data/config/application.rb +7 -19
- data/config/commands.rb +9 -0
- data/config/version.rb +2 -3
- 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.cpp +18 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
- 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/src/advantest/smt7/origen/origen/site.cpp +237 -0
- data/src/advantest/smt7/origen/origen/site.hpp +49 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen/test_method.hpp +1 -3
- 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/utils.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/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 +462 -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 -32
- data/stdlib/v93k/origen/origen.cpp +0 -22
- 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/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,462 @@
|
|
1
|
+
package origen.test_methods;
|
2
|
+
|
3
|
+
import java.util.ArrayList;
|
4
|
+
import java.util.List;
|
5
|
+
import origen.common.Origen;
|
6
|
+
import origen.common.OrigenHelpers;
|
7
|
+
import xoc.dsa.DeviceSetupFactory;
|
8
|
+
import xoc.dsa.IDeviceSetup;
|
9
|
+
import xoc.dta.datatypes.MultiSiteBoolean;
|
10
|
+
import xoc.dta.datatypes.MultiSiteLong;
|
11
|
+
import xoc.dta.datatypes.MultiSiteString;
|
12
|
+
import xoc.dta.measurement.IMeasurement;
|
13
|
+
import xoc.dta.resultaccess.IDigInOutCaptureResults;
|
14
|
+
import xoc.dta.resultaccess.IMeasurementResult;
|
15
|
+
import xoc.dta.resultaccess.datatypes.BitSequence.BitOrder;
|
16
|
+
import xoc.dta.resultaccess.datatypes.MultiSiteBitSequence;
|
17
|
+
import xoc.dta.setupaccess.IParallelGroup;
|
18
|
+
import xoc.dta.testdescriptor.IFunctionalTestDescriptor;
|
19
|
+
|
20
|
+
/** The Function test template for all functional tests */
|
21
|
+
public class Functional_test extends Base {
|
22
|
+
|
23
|
+
public IFunctionalTestDescriptor FUNC;
|
24
|
+
|
25
|
+
// Class variables
|
26
|
+
|
27
|
+
/** Pin to capture from */
|
28
|
+
private String _pin;
|
29
|
+
|
30
|
+
/** Number of vectors to capture */
|
31
|
+
private int _capture;
|
32
|
+
|
33
|
+
/** Number of bits per captured word */
|
34
|
+
private int _bitPerWord;
|
35
|
+
|
36
|
+
/** Pattern name */
|
37
|
+
private String _pattern;
|
38
|
+
|
39
|
+
/** Testname to override */
|
40
|
+
private String _testNameOverride;
|
41
|
+
|
42
|
+
/** The result of executing the primary pattern */
|
43
|
+
private IMeasurementResult funcResult;
|
44
|
+
|
45
|
+
private MultiSiteBitSequence _capturedData;
|
46
|
+
|
47
|
+
// Link to self
|
48
|
+
public Functional_test origen;
|
49
|
+
|
50
|
+
// Patching information
|
51
|
+
/** Do we need to activate the patched patterns? */
|
52
|
+
boolean activatePatchedMeas;
|
53
|
+
|
54
|
+
/** The measurement that is only used for patching */
|
55
|
+
public IMeasurement patchedMeas;
|
56
|
+
|
57
|
+
/** The measurement that is only used dynamic pattern switching */
|
58
|
+
public IMeasurement dynamicPatMeas;
|
59
|
+
|
60
|
+
ArrayList<IMeasurementResult> dynamicMeasurementResults;
|
61
|
+
|
62
|
+
boolean _hasDynamicMeas = false;
|
63
|
+
|
64
|
+
/** The list of patterns to patch */
|
65
|
+
List<String> patchList;
|
66
|
+
|
67
|
+
/** Used to select only one pattern from a list of patterns for site specific execution */
|
68
|
+
List<String> dynamicPatternList;
|
69
|
+
|
70
|
+
@Override
|
71
|
+
public void _setup() {
|
72
|
+
message(Origen.LOG_METHODTRACE, "Functional_test --> Setup");
|
73
|
+
origen = this;
|
74
|
+
patchList = new ArrayList<String>();
|
75
|
+
dynamicPatternList = new ArrayList<String>();
|
76
|
+
patchedMeas.setSpecificationName(measurement.getSpecificationName());
|
77
|
+
dynamicPatMeas.setSpecificationName(measurement.getSpecificationName());
|
78
|
+
pin("");
|
79
|
+
capture(0);
|
80
|
+
bitPerWord(1);
|
81
|
+
pattern("");
|
82
|
+
testName("");
|
83
|
+
|
84
|
+
measure_setup();
|
85
|
+
}
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Creates/adds to a list of patched patterns Needs to be called for every pattern that has to be
|
89
|
+
* patched
|
90
|
+
*
|
91
|
+
* @param pat
|
92
|
+
* @return
|
93
|
+
*/
|
94
|
+
public Functional_test addToPatchList(String pat) {
|
95
|
+
|
96
|
+
patchList.add("C402TNVMTester.patterns." + pat);
|
97
|
+
return this;
|
98
|
+
}
|
99
|
+
|
100
|
+
public Functional_test addToDynamicPatternList(String pat) {
|
101
|
+
dynamicPatternList.add(pat);
|
102
|
+
return this;
|
103
|
+
}
|
104
|
+
|
105
|
+
public Functional_test overlaySubroutinePerSite(
|
106
|
+
String subroutinePattern, MultiSiteLong decData, int size) {
|
107
|
+
Origen.overlaySubroutinePerSite(
|
108
|
+
"C402TNVMTester.patterns." + subroutinePattern, "NVM_DIN_PIN", decData, size);
|
109
|
+
return this;
|
110
|
+
}
|
111
|
+
|
112
|
+
public Functional_test overlaySubroutineAllSites(
|
113
|
+
String subroutinePattern, long decData, int size) {
|
114
|
+
Origen.overlaySubroutineAllSites(
|
115
|
+
"C402TNVMTester.patterns." + subroutinePattern, "NVM_DIN_PIN", decData, size);
|
116
|
+
return this;
|
117
|
+
}
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Setup the patch measurement instance Call after all patterns are added to the list The setup
|
121
|
+
* creates a new devicesetup with fake pattern calls to all patched patterns This make sure that
|
122
|
+
* they are referenced in this testmethod. Is is not possible to patch patterns that are not used
|
123
|
+
* in the testflow After this setupPatch() is called, the patchedMeas still needs to be activated,
|
124
|
+
* this happens in run()
|
125
|
+
*
|
126
|
+
* @return
|
127
|
+
*/
|
128
|
+
public Functional_test setupPatch() {
|
129
|
+
IDeviceSetup ds = DeviceSetupFactory.createInstance();
|
130
|
+
ds.importSpec(measurement.getSpecificationName());
|
131
|
+
ds.sequentialBegin("measPatch");
|
132
|
+
{
|
133
|
+
for (String pat : patchList) {
|
134
|
+
ds.patternCall(pat);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
ds.sequentialEnd();
|
138
|
+
patchedMeas.setSetups(ds);
|
139
|
+
|
140
|
+
// Warn run() that we need to activate the patched measurement still
|
141
|
+
activatePatchedMeas = true;
|
142
|
+
|
143
|
+
return this;
|
144
|
+
}
|
145
|
+
|
146
|
+
public Functional_test setupDynamicPatternList() {
|
147
|
+
IDeviceSetup ds = DeviceSetupFactory.createInstance();
|
148
|
+
ds.importSpec(dynamicPatMeas.getSpecificationName());
|
149
|
+
for (String pat : dynamicPatternList) {
|
150
|
+
ds.parallelBegin(pat);
|
151
|
+
{
|
152
|
+
ds.setBypassable();
|
153
|
+
ds.patternCall("C402TNVMTester.patterns." + pat);
|
154
|
+
}
|
155
|
+
ds.parallelEnd();
|
156
|
+
}
|
157
|
+
dynamicPatMeas.setSetups(ds);
|
158
|
+
_hasDynamicMeas = true;
|
159
|
+
return this;
|
160
|
+
}
|
161
|
+
|
162
|
+
// Executed the given (previously setup) pattern on all sites
|
163
|
+
public void executeDynamicPat(String pat) {
|
164
|
+
selectDynamicPat(pat);
|
165
|
+
dynamicPatMeas.execute();
|
166
|
+
dynamicMeasurementResults.add(dynamicPatMeas.preserveResult());
|
167
|
+
}
|
168
|
+
|
169
|
+
// Execute the given (previously setup) pattern on all sites except those where bypass is set to
|
170
|
+
// true
|
171
|
+
public void executeDynamicPat(String pat, MultiSiteBoolean bypass) {
|
172
|
+
selectDynamicPat(pat, bypass);
|
173
|
+
dynamicPatMeas.execute();
|
174
|
+
dynamicMeasurementResults.add(dynamicPatMeas.preserveResult());
|
175
|
+
}
|
176
|
+
|
177
|
+
// Executed the given (previously setup) patterns on all sites, where each site can have a
|
178
|
+
// different pattern
|
179
|
+
public void executeDynamicPat(MultiSiteString pats) {
|
180
|
+
selectDynamicPats(pats);
|
181
|
+
dynamicPatMeas.execute();
|
182
|
+
dynamicMeasurementResults.add(dynamicPatMeas.preserveResult());
|
183
|
+
}
|
184
|
+
|
185
|
+
public Functional_test selectDynamicPat(String pat, MultiSiteBoolean bypass) {
|
186
|
+
message(Origen.LOG_METHODTRACE, "Executing dynamic pattern: " + pat);
|
187
|
+
boolean patFound = false;
|
188
|
+
MultiSiteBoolean allSites = new MultiSiteBoolean(true);
|
189
|
+
List<IParallelGroup> paraGroups = dynamicPatMeas.operatingSequence().getParallelGroups();
|
190
|
+
for (IParallelGroup iParallelGroup : paraGroups) {
|
191
|
+
if (iParallelGroup.getName().equals(pat)) {
|
192
|
+
patFound = true;
|
193
|
+
iParallelGroup.setBypass(bypass);
|
194
|
+
} else {
|
195
|
+
iParallelGroup.setBypass(allSites);
|
196
|
+
}
|
197
|
+
}
|
198
|
+
if (!patFound) {
|
199
|
+
throw new Error(
|
200
|
+
"Dynamic pattern: " + pat + " not found!! Make sure you have it added in setup()");
|
201
|
+
}
|
202
|
+
return this;
|
203
|
+
}
|
204
|
+
|
205
|
+
public Functional_test selectDynamicPat(String pat) {
|
206
|
+
MultiSiteBoolean noSites = new MultiSiteBoolean(false);
|
207
|
+
selectDynamicPat(pat, noSites);
|
208
|
+
return this;
|
209
|
+
}
|
210
|
+
|
211
|
+
public Functional_test selectDynamicPats(MultiSiteString pats) {
|
212
|
+
// boolean patFound = false;
|
213
|
+
|
214
|
+
List<IParallelGroup> paraGroups = dynamicPatMeas.operatingSequence().getParallelGroups();
|
215
|
+
for (IParallelGroup iParallelGroup : paraGroups) {
|
216
|
+
MultiSiteBoolean bypass = new MultiSiteBoolean(true);
|
217
|
+
for (int site : context.getActiveSites()) {
|
218
|
+
if (iParallelGroup.getName().equals(pats.get(site))) {
|
219
|
+
bypass.set(site, false);
|
220
|
+
}
|
221
|
+
}
|
222
|
+
iParallelGroup.setBypass(bypass);
|
223
|
+
}
|
224
|
+
// if(!patFound) {
|
225
|
+
// throw new Error("Dynamic pattern: " + pat + " not found!! Make sure you have it
|
226
|
+
// added in setup()");
|
227
|
+
// }
|
228
|
+
return this;
|
229
|
+
}
|
230
|
+
|
231
|
+
/**
|
232
|
+
* The functional test method can optionally capture data by supplying the number of vectors to
|
233
|
+
* capture
|
234
|
+
*
|
235
|
+
* @param v Number of vectors to capture
|
236
|
+
* @return
|
237
|
+
*/
|
238
|
+
public Functional_test capture(int numVecs) {
|
239
|
+
_capture = numVecs;
|
240
|
+
return this;
|
241
|
+
}
|
242
|
+
|
243
|
+
/**
|
244
|
+
* If data capture is requested, supply the pin to capture data from
|
245
|
+
*
|
246
|
+
* @param pin Pin to capture from
|
247
|
+
* @return
|
248
|
+
*/
|
249
|
+
public Functional_test pin(String pin) {
|
250
|
+
_pin = pin;
|
251
|
+
return this;
|
252
|
+
}
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Serial capture data will be grouped into words, specify how many bits per word in the serial
|
256
|
+
* stream (default 1)
|
257
|
+
*
|
258
|
+
* @param bitsPerWord
|
259
|
+
* @return
|
260
|
+
*/
|
261
|
+
public Functional_test bitPerWord(int bitsPerWord) {
|
262
|
+
_bitPerWord = bitsPerWord;
|
263
|
+
return this;
|
264
|
+
}
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Override the pattern argument from the test suite
|
268
|
+
*
|
269
|
+
* @param patName
|
270
|
+
* @return
|
271
|
+
*/
|
272
|
+
public Functional_test pattern(String patName) {
|
273
|
+
_pattern = patName;
|
274
|
+
return this;
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
* Override the test name argument from the test suite, this can be useful if the main test item
|
279
|
+
* to be logged is a captured value and the pattern execution is to be logged separately. The
|
280
|
+
* override is only valid for one call to execute()
|
281
|
+
*
|
282
|
+
* @param testName
|
283
|
+
* @return
|
284
|
+
*/
|
285
|
+
public Functional_test testName(String newTestName) {
|
286
|
+
_testNameOverride = newTestName;
|
287
|
+
return this;
|
288
|
+
}
|
289
|
+
|
290
|
+
/**
|
291
|
+
* Gets all captured data
|
292
|
+
*
|
293
|
+
* @return
|
294
|
+
*/
|
295
|
+
public MultiSiteBitSequence capturedData() {
|
296
|
+
return _capturedData;
|
297
|
+
}
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Gets a specific word from the captured data Bitorder is fixed to RIGHT_TO_LEFT
|
301
|
+
*
|
302
|
+
* @param wordNr
|
303
|
+
* @return
|
304
|
+
*/
|
305
|
+
public MultiSiteLong capturedData(int wordNr) {
|
306
|
+
message(Origen.LOG_METHODTRACE, "Get captured data" + wordNr);
|
307
|
+
return capturedData(wordNr, BitOrder.RIGHT_TO_LEFT);
|
308
|
+
}
|
309
|
+
|
310
|
+
/**
|
311
|
+
* Gets a specific word from the captured data Bitorder has to be specified
|
312
|
+
*
|
313
|
+
* @param wordNr
|
314
|
+
* @param order BitOrder (eg. RIGHT_TO_LEFT)
|
315
|
+
* @return
|
316
|
+
*/
|
317
|
+
public MultiSiteLong capturedData(int wordNr, BitOrder order) {
|
318
|
+
// Init the MultiSite array
|
319
|
+
MultiSiteLong MSL = new MultiSiteLong();
|
320
|
+
|
321
|
+
// Loop through the sites to get the data
|
322
|
+
for (int site : context.getActiveSites()) {
|
323
|
+
message(
|
324
|
+
Origen.LOG_METHODTRACE,
|
325
|
+
"Num cap words: " + _capturedData.get(site).toLongArray(_bitPerWord, order).length);
|
326
|
+
MSL.set(site, _capturedData.get(site).toLongArray(_bitPerWord, order)[wordNr]);
|
327
|
+
}
|
328
|
+
return MSL;
|
329
|
+
}
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Gives the string representation of the binary sequence of the result data for a specific wordnr
|
333
|
+
* Bitorder is fixed to RIGHT_TO_LEFT
|
334
|
+
*
|
335
|
+
* @param wordNr
|
336
|
+
* @return
|
337
|
+
*/
|
338
|
+
public MultiSiteString getBinaryWord(int wordNr) {
|
339
|
+
MultiSiteString MSS = new MultiSiteString();
|
340
|
+
for (int site : context.getActiveSites()) {
|
341
|
+
MSS.set(
|
342
|
+
site,
|
343
|
+
OrigenHelpers.longToPaddedBinaryString(
|
344
|
+
_capturedData.get(site).toLongArray(_bitPerWord, BitOrder.RIGHT_TO_LEFT)[wordNr],
|
345
|
+
_bitPerWord,
|
346
|
+
BitOrder.RIGHT_TO_LEFT,
|
347
|
+
false));
|
348
|
+
}
|
349
|
+
return MSS;
|
350
|
+
}
|
351
|
+
|
352
|
+
/**
|
353
|
+
* Gives the string representation of the HEX sequence of the result data for a specific wordnr
|
354
|
+
* Bitorder is fixed to RIGHT_TO_LEFT
|
355
|
+
*
|
356
|
+
* @param wordNr
|
357
|
+
* @return
|
358
|
+
*/
|
359
|
+
public MultiSiteString getHexWord(int wordNr, int nrHexChars) {
|
360
|
+
MultiSiteString MSS = new MultiSiteString();
|
361
|
+
for (int site : context.getActiveSites()) {
|
362
|
+
MSS.set(
|
363
|
+
site,
|
364
|
+
OrigenHelpers.longToPaddedHexString(
|
365
|
+
_capturedData.get(site).toLongArray(_bitPerWord, BitOrder.RIGHT_TO_LEFT)[wordNr],
|
366
|
+
nrHexChars,
|
367
|
+
BitOrder.RIGHT_TO_LEFT));
|
368
|
+
}
|
369
|
+
return MSS;
|
370
|
+
}
|
371
|
+
|
372
|
+
/** Helper function for default bitPerWord use */
|
373
|
+
public MultiSiteString getHexWord(int wordNr) {
|
374
|
+
return getHexWord(wordNr, _bitPerWord / 4);
|
375
|
+
}
|
376
|
+
|
377
|
+
@Override
|
378
|
+
public void _preBody() {
|
379
|
+
dynamicMeasurementResults = new ArrayList<IMeasurementResult>();
|
380
|
+
}
|
381
|
+
|
382
|
+
/** Main run function for functional */
|
383
|
+
@SuppressWarnings("null")
|
384
|
+
@Override
|
385
|
+
public void run() {
|
386
|
+
IDigInOutCaptureResults digCapture = null;
|
387
|
+
|
388
|
+
logTrace("Functional_test", "run");
|
389
|
+
super.run();
|
390
|
+
|
391
|
+
// Check if we need to override the pattern name
|
392
|
+
if (_pattern != "") {
|
393
|
+
measurement.setPatternName(_pattern);
|
394
|
+
}
|
395
|
+
|
396
|
+
// Check if we need to capture anything
|
397
|
+
// When capture is enabled, we have to disable the cyclePassFail
|
398
|
+
if (_capture > 0) {
|
399
|
+
logTrace("Functional_test", "Enabling capture on " + _pin);
|
400
|
+
measurement.digInOut(_pin).result().cyclePassFail().setEnabled(false);
|
401
|
+
measurement.digInOut(_pin).result().capture().setEnabled(true);
|
402
|
+
} else {
|
403
|
+
logTrace("Functional_test", "Disabling capture on " + _pin);
|
404
|
+
measurement.digInOut(_pin).result().cyclePassFail().setEnabled(true);
|
405
|
+
measurement.digInOut(_pin).result().capture().setEnabled(false);
|
406
|
+
}
|
407
|
+
|
408
|
+
// Run the measurement
|
409
|
+
measurement.execute();
|
410
|
+
|
411
|
+
funcResult = measurement.preserveResult();
|
412
|
+
|
413
|
+
// When captured was enabled, we need to load the captured data for later processing
|
414
|
+
// After this is done, the tester can be released
|
415
|
+
if (_capture > 0) {
|
416
|
+
// protect results to be not overwritten
|
417
|
+
digCapture = measurement.digInOut(_pin).preserveCaptureResults();
|
418
|
+
}
|
419
|
+
|
420
|
+
// Activate the patched measurements
|
421
|
+
// Without this, you cannot patch any patterns that are not used in THIS testmethod
|
422
|
+
if (activatePatchedMeas) {
|
423
|
+
patchedMeas.activate();
|
424
|
+
}
|
425
|
+
|
426
|
+
// Assume for now that if force pass is set then branching decision could be dependent on the
|
427
|
+
// result of this test, in future add another attribute to control async processing on/off
|
428
|
+
if (!sync && !forcePass) {
|
429
|
+
releaseTester();
|
430
|
+
}
|
431
|
+
|
432
|
+
if (_capture > 0) {
|
433
|
+
_capturedData =
|
434
|
+
digCapture.getSerialBitsAsBitSequence(measurement.getSignal(_pin).getDutSignalName());
|
435
|
+
}
|
436
|
+
}
|
437
|
+
|
438
|
+
@Override
|
439
|
+
public void processResults() {
|
440
|
+
logTrace("Functional_test", "processResults");
|
441
|
+
|
442
|
+
if (_hasDynamicMeas && dynamicMeasurementResults.size() > 0) {
|
443
|
+
MultiSiteBoolean dynamicPassed = null;
|
444
|
+
for (IMeasurementResult result : dynamicMeasurementResults) {
|
445
|
+
if (dynamicPassed == null) {
|
446
|
+
dynamicPassed = result.hasPassed();
|
447
|
+
} else {
|
448
|
+
dynamicPassed = dynamicPassed.and(result.hasPassed());
|
449
|
+
}
|
450
|
+
}
|
451
|
+
if (funcResult != null) {
|
452
|
+
judgeAndDatalog(FUNC, dynamicPassed.and(funcResult.hasPassed()));
|
453
|
+
} else {
|
454
|
+
judgeAndDatalog(FUNC, dynamicPassed);
|
455
|
+
}
|
456
|
+
} else {
|
457
|
+
if (funcResult != null) {
|
458
|
+
judgeAndDatalog(FUNC, funcResult);
|
459
|
+
}
|
460
|
+
}
|
461
|
+
}
|
462
|
+
}
|