origen_std_lib 0.10.1 → 0.13.1
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/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/{stdlib/v93k → src/advantest/smt7}/origen/origen/helpers.hpp +25 -8
- data/src/advantest/smt7/origen/origen/site.cpp +237 -0
- data/src/advantest/smt7/origen/origen/site.hpp +50 -0
- 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/test_method.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/{stdlib/v93k → src/advantest/smt7}/origen/origen/utils.hpp +1 -3
- data/src/advantest/smt7/origen/origen.cpp +18 -0
- data/{stdlib/v93k → src/advantest/smt7}/origen/origen.hpp +3 -3
- 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/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/origen.cpp +0 -22
- 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,334 @@
|
|
1
|
+
package origen.common;
|
2
|
+
|
3
|
+
import java.util.List;
|
4
|
+
import xoc.dta.ITestContext;
|
5
|
+
import xoc.dta.datatypes.MultiSiteLong;
|
6
|
+
import xoc.dta.datatypes.MultiSiteString;
|
7
|
+
import xoc.dta.measurement.IMeasurement;
|
8
|
+
import xoc.dta.setupaccess.IPattern;
|
9
|
+
import xoc.dta.signals.ISignal;
|
10
|
+
|
11
|
+
public class Origen {
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Define the different loglevels <br>
|
15
|
+
* Internally the SMT8 logging system will be used (message()) the constants here just work as
|
16
|
+
* shorthand for default use cases
|
17
|
+
*/
|
18
|
+
public static final int LOG_METHODTRACE = 9;
|
19
|
+
|
20
|
+
public static final int LOG_DATA = 10;
|
21
|
+
public static final int LOG_PARAM = 3;
|
22
|
+
public static final int LOG_FUNC = 4;
|
23
|
+
public static final int LOG_FAIL = 2;
|
24
|
+
public static final int LOG_WARNING = 1;
|
25
|
+
public static final int LOG_ERROR = 0;
|
26
|
+
|
27
|
+
// All general multisite variables
|
28
|
+
// The booleans keep track of their state, these are not multisite since we only use multisite
|
29
|
+
// assignments for the _vars
|
30
|
+
private static MultiSiteString _lotid;
|
31
|
+
private static boolean _lotidSet;
|
32
|
+
|
33
|
+
private static MultiSiteLong _wafer;
|
34
|
+
private static boolean _waferSet;
|
35
|
+
|
36
|
+
private static MultiSiteLong _x;
|
37
|
+
private static boolean _xSet;
|
38
|
+
|
39
|
+
private static MultiSiteLong _y;
|
40
|
+
private static boolean _ySet;
|
41
|
+
|
42
|
+
public static ITestContext context;
|
43
|
+
public static IMeasurement meas;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Implementing the SMT8 message system also for this non-TM class. Perhaps not the prettiest
|
47
|
+
* thing to do but it fixes the logging. The context needs to be set from a TM (like Base)
|
48
|
+
*
|
49
|
+
* @param level
|
50
|
+
* @param msg
|
51
|
+
*/
|
52
|
+
public static void message(int level, String msg) {
|
53
|
+
// No longer works on SMT 8.2, should this function be removed completely?
|
54
|
+
// context.message(level,msg);
|
55
|
+
}
|
56
|
+
|
57
|
+
public Origen() {
|
58
|
+
_lotidSet = false;
|
59
|
+
_waferSet = false;
|
60
|
+
_xSet = false;
|
61
|
+
_ySet = false;
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Returns the IPattern from the name of the pattern
|
66
|
+
*
|
67
|
+
* @param patname
|
68
|
+
* @return
|
69
|
+
*/
|
70
|
+
public static IPattern getPat(String patname) {
|
71
|
+
return context.pattern(patname);
|
72
|
+
}
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Patch data per site
|
76
|
+
*
|
77
|
+
* @param subroutinePattern Name of the pattern to patch
|
78
|
+
* @param pin Name of the pin to use
|
79
|
+
* @param decData The data to patch with
|
80
|
+
* @param size The amount of vectors to patch
|
81
|
+
*/
|
82
|
+
public static void overlaySubroutinePerSite(
|
83
|
+
String subroutinePattern, String pin, MultiSiteLong decData, int size) {
|
84
|
+
message(Origen.LOG_METHODTRACE, "Performing patching on " + subroutinePattern);
|
85
|
+
OrigenHelpers.overlaySubroutine(
|
86
|
+
getPat(subroutinePattern),
|
87
|
+
Origen.pinFromGroup(pin),
|
88
|
+
decData,
|
89
|
+
size,
|
90
|
+
context.getActiveSites());
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Patch the same data to all sites
|
95
|
+
*
|
96
|
+
* @param subroutinePattern Name of the pattern to patch
|
97
|
+
* @param pin Name of the pin to use
|
98
|
+
* @param decData The data to patch with
|
99
|
+
* @param size The amount of vectors to patch
|
100
|
+
*/
|
101
|
+
public static void overlaySubroutineAllSites(
|
102
|
+
String subroutinePattern, String pin, long decData, int size) {
|
103
|
+
message(Origen.LOG_METHODTRACE, "Performing patching on " + subroutinePattern);
|
104
|
+
OrigenHelpers.overlaySubroutine(
|
105
|
+
getPat(subroutinePattern), Origen.pinFromGroup(pin), decData, size);
|
106
|
+
}
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Get 1 pin name from a pingroup. Throws an exception if the group contains more than 1 pin
|
110
|
+
*
|
111
|
+
* @param group
|
112
|
+
* @return
|
113
|
+
*/
|
114
|
+
public static String pinFromGroup(String group) {
|
115
|
+
List<ISignal> dutGroup = meas.getSignalGroup(group).getDutSignals();
|
116
|
+
if (dutGroup.size() > 1) {
|
117
|
+
throw new NumberFormatException("Can only patch one signal at a time");
|
118
|
+
}
|
119
|
+
return dutGroup.get(0).toString();
|
120
|
+
}
|
121
|
+
|
122
|
+
// /**
|
123
|
+
// * Debug function to display the STDF variables to check if they are properly setup
|
124
|
+
// */
|
125
|
+
// public static void showDieInfoFromSTDF() {
|
126
|
+
// MultiSiteLong x_coord =context.testProgram().variables().getLong("STDF.X_COORD");
|
127
|
+
// MultiSiteLong y_coord =context.testProgram().variables().getLong("STDF.Y_COORD");
|
128
|
+
// MultiSiteString wafer_id =context.testProgram().variables().getString("STDF.WAFER_ID");
|
129
|
+
// MultiSiteString lot_id =context.testProgram().variables().getString("STDF.LOT_ID");
|
130
|
+
// String sublot_id =context.testProgram().variables().getString("STDF.SBLOT_ID").get();
|
131
|
+
// message(Origen.LOG_DATA,"Wafer_id:" + wafer_id);
|
132
|
+
// message(Origen.LOG_DATA,"Lot_id:" + lot_id);
|
133
|
+
// message(Origen.LOG_DATA,"Sublot_id:" + sublot_id);
|
134
|
+
// message(Origen.LOG_DATA,"(x,y):(" + x_coord + "," + y_coord + ")");
|
135
|
+
// }
|
136
|
+
|
137
|
+
/** Set the lot ID to the given value, e.g. "ABC1234" */
|
138
|
+
public static void lotid(MultiSiteString v) {
|
139
|
+
_lotid = v;
|
140
|
+
_lotidSet = true;
|
141
|
+
}
|
142
|
+
|
143
|
+
/** Convert long value to 8 character ASCII string */
|
144
|
+
private static String toASCII(long value) {
|
145
|
+
int length = 8;
|
146
|
+
StringBuilder builder = new StringBuilder(length);
|
147
|
+
for (int i = length - 1; i >= 0; i--) {
|
148
|
+
builder.append((char) ((value >> (8 * i)) & 0xFF));
|
149
|
+
}
|
150
|
+
return builder.toString();
|
151
|
+
}
|
152
|
+
|
153
|
+
/** Set the lot ID based on the integer representation returned from lotidInt */
|
154
|
+
public static void lotid(MultiSiteLong v) {
|
155
|
+
MultiSiteString lotStr = new MultiSiteString("");
|
156
|
+
for (int site : v.getActiveSites()) {
|
157
|
+
long val = v.get(site);
|
158
|
+
lotStr.set(site, toASCII(val));
|
159
|
+
}
|
160
|
+
lotid(lotStr);
|
161
|
+
}
|
162
|
+
|
163
|
+
/* Get the lot ID. If it has not previously been set to a value it will be automatically queried
|
164
|
+
* from the test system.
|
165
|
+
*/
|
166
|
+
public static MultiSiteString lotid() {
|
167
|
+
if (!_lotidSet) {
|
168
|
+
|
169
|
+
MultiSiteString lot_id = new MultiSiteString("TR7T7290W25D0");
|
170
|
+
|
171
|
+
if(!context.testProgram().variables().getString("mi8_recipe_version").get().isEmpty()) {
|
172
|
+
lot_id = context.testProgram().variables().getString("STDF.WAFER_ID"); //for use with prober
|
173
|
+
}
|
174
|
+
|
175
|
+
MultiSiteString batch_id = new MultiSiteString();
|
176
|
+
for (int site : context.getActiveSites()) {
|
177
|
+
String perSiteWID = lot_id.get(site); // per site string contains batch id & wafer number
|
178
|
+
String sBatch =
|
179
|
+
perSiteWID.substring(
|
180
|
+
0, Math.min(perSiteWID.length(), 8)); // this will give you batch id
|
181
|
+
batch_id.set(site, sBatch);
|
182
|
+
System.out.println("Wafer batch " + sBatch);
|
183
|
+
}
|
184
|
+
|
185
|
+
_lotid = batch_id; // store the batch number
|
186
|
+
// _lotidSet = true;
|
187
|
+
}
|
188
|
+
|
189
|
+
return _lotid;
|
190
|
+
}
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Returns the lot ID as a 64-bit integer that is suitable for programming to the device. Each
|
194
|
+
* character in the lotID is converted to its ASCII code. An error will be raised if the length of
|
195
|
+
* the current lotID overflows 64-bits.STDF.WAFER_ID
|
196
|
+
*/
|
197
|
+
public static MultiSiteLong lotidInt() {
|
198
|
+
MultiSiteLong tempLong = new MultiSiteLong();
|
199
|
+
MultiSiteString lotid = lotid();
|
200
|
+
for (int site : lotid.getActiveSites()) {
|
201
|
+
String id = lotid.get(site);
|
202
|
+
|
203
|
+
// Convert each character to ascii using 2 hex (8 bytes)
|
204
|
+
StringBuilder sb = new StringBuilder();
|
205
|
+
char[] letters = id.toCharArray();
|
206
|
+
for (char ch : letters) {
|
207
|
+
sb.append(Long.toHexString(ch));
|
208
|
+
}
|
209
|
+
// Convert the hex string to long again
|
210
|
+
tempLong.set(site, Long.parseLong(sb.toString(), 16));
|
211
|
+
}
|
212
|
+
return tempLong;
|
213
|
+
}
|
214
|
+
|
215
|
+
/** Set the wafer number to the given value */
|
216
|
+
public static void wafer(MultiSiteLong valMSL) {
|
217
|
+
_wafer = valMSL;
|
218
|
+
_waferSet = true;
|
219
|
+
}
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Get the wafer number. If it has not previously been set to a value it will be automatically
|
223
|
+
* queried from the test system.
|
224
|
+
*/
|
225
|
+
public static MultiSiteLong wafer() {
|
226
|
+
if (!_waferSet) {
|
227
|
+
|
228
|
+
MultiSiteString wafer_id = new MultiSiteString("TR7T7290W55D0");
|
229
|
+
|
230
|
+
if(!context.testProgram().variables().getString("mi8_recipe_version").get().isEmpty()) {
|
231
|
+
wafer_id = context.testProgram().variables().getString("STDF.WAFER_ID"); //for use with prober
|
232
|
+
// Expect to return something like "TR7T7290W25D0)", where 25 is the wafer number
|
233
|
+
}
|
234
|
+
|
235
|
+
MultiSiteLong mslWnum = new MultiSiteLong(0);
|
236
|
+
for (int site : context.getActiveSites()) {
|
237
|
+
String perSiteWID = wafer_id.get(site); // per site string contains batch id & wafer number
|
238
|
+
String sWnum =
|
239
|
+
perSiteWID.substring(
|
240
|
+
perSiteWID.length() - 4,
|
241
|
+
perSiteWID.length() - 2); // extracted wafer number as string
|
242
|
+
Long lWnum = new Long(sWnum); // wafer number in Long
|
243
|
+
mslWnum.set(site, lWnum);
|
244
|
+
System.out.println("Wafer number " + lWnum);
|
245
|
+
}
|
246
|
+
|
247
|
+
// TBD :check for valid value
|
248
|
+
// if (lWnum < 1 || lWnum > 25) {
|
249
|
+
// throw new Error("ERROR: Wafer is out of the range : " + mslWnum);
|
250
|
+
// }
|
251
|
+
|
252
|
+
_wafer = mslWnum; // store the wafer number
|
253
|
+
// _waferSet = true;
|
254
|
+
}
|
255
|
+
return _wafer;
|
256
|
+
}
|
257
|
+
|
258
|
+
/** Query the X and Y coordinates from the test system and set them for all sites. */
|
259
|
+
public static void setXY() {
|
260
|
+
|
261
|
+
MultiSiteLong x_coord = new MultiSiteLong(90); // for debug purpose
|
262
|
+
MultiSiteLong y_coord = new MultiSiteLong(100); // for debug purpose
|
263
|
+
|
264
|
+
if(!context.testProgram().variables().getString("mi8_recipe_version").get().isEmpty()) {
|
265
|
+
x_coord =context.testProgram().variables().getLong("STDF.X_COORD"); //for use with probe
|
266
|
+
y_coord =context.testProgram().variables().getLong("STDF.Y_COORD"); //for use with probe
|
267
|
+
}
|
268
|
+
|
269
|
+
// MultiSiteLong x_coord = new MultiSiteLong(90); // for debug purpose
|
270
|
+
// MultiSiteLong y_coord = new MultiSiteLong(100); // for debug purpose
|
271
|
+
|
272
|
+
// TBD
|
273
|
+
// if (x_coord.lessThan(-32768) || x_coord.greaterThan(32767) ) {
|
274
|
+
|
275
|
+
// throw new NumberFormatException("Can only patch one signal at a time");
|
276
|
+
// cout << "ERROR: X is out of the range of an Int16: " << lx << endl;
|
277
|
+
// ERROR_EXIT(TM::EXIT_FLOW);
|
278
|
+
|
279
|
+
// }
|
280
|
+
|
281
|
+
// GetDiePosXYOfSite(_number, &lx, &ly);
|
282
|
+
// if (lx < -32768 || lx > 32767) {
|
283
|
+
// cout << "ERROR: X is out of the range of an Int16: " << lx << endl;
|
284
|
+
// ERROR_EXIT(TM::EXIT_FLOW);
|
285
|
+
// }
|
286
|
+
// if (ly < -32768 || ly > 32767) {
|
287
|
+
// cout << "ERROR: Y is out of the range of an Int16: " << ly << endl;
|
288
|
+
// ERROR_EXIT(TM::EXIT_FLOW);
|
289
|
+
// }
|
290
|
+
// _x = (int) lx;
|
291
|
+
// _y = (int) ly;
|
292
|
+
|
293
|
+
_x = x_coord;
|
294
|
+
_y = y_coord;
|
295
|
+
// _xSet = true;
|
296
|
+
// _ySet = true;
|
297
|
+
}
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Get the X co-ord. If it has not previously been set to a value it will be automatically queried
|
301
|
+
* from the test system.
|
302
|
+
*/
|
303
|
+
public static MultiSiteLong x() {
|
304
|
+
if (!_xSet) {
|
305
|
+
setXY();
|
306
|
+
}
|
307
|
+
return _x;
|
308
|
+
}
|
309
|
+
|
310
|
+
/**
|
311
|
+
* Get the Y co-ord. If it has not previously been set to a value it will be automatically queried
|
312
|
+
* from the test system.
|
313
|
+
*
|
314
|
+
* @return
|
315
|
+
*/
|
316
|
+
public static MultiSiteLong y() {
|
317
|
+
if (!_ySet) {
|
318
|
+
setXY();
|
319
|
+
}
|
320
|
+
return _y;
|
321
|
+
}
|
322
|
+
|
323
|
+
/** Set the X co-ordinate to the given value */
|
324
|
+
public static void x(MultiSiteLong v) {
|
325
|
+
_x = v;
|
326
|
+
_xSet = true;
|
327
|
+
}
|
328
|
+
|
329
|
+
/** Set the Y co-ordinate to the given value */
|
330
|
+
public static void y(MultiSiteLong v) {
|
331
|
+
_y = v;
|
332
|
+
_ySet = true;
|
333
|
+
}
|
334
|
+
}
|