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