-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_loop.jsl
More file actions
572 lines (503 loc) · 17.6 KB
/
Copy pathmain_loop.jsl
File metadata and controls
572 lines (503 loc) · 17.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
//get all file names under the folder
files = Files In Directory( ::dir, Recursive );
nfiles = N Items( files );
::LIVcnt = 1;
::ACCcnt = 1;
//********************************************************************************
//Start of loop to cycle through csv summary files in the folder selected by the user
//********************************************************************************
For( ::i = 1, ::i <= N Items( files ), ::i++,
fullfile = ::dir || files[::i];
//Create a progress window for the user
totalfiles = N Items( ::files );
pctcomplete = Round( ((::i / totalfiles) * 100), 1 );
Caption( "Working on file " || Char( ::i ) || " out of " || Char( totalfiles ) || " = " || Char( pctcomplete ) || "%" );
//Progress window creation done
worksheet = Left( files[::i], 31 );
size = File Size (fullfile);
// Check if LIV file and process
If (size > 50000 & Contains(fullfile,"ACC") == 0,
Include (".\LIV_extraction.jsl");
Include (".\pct_change_summary.jsl");
::LIVcnt = 79;
);
// Check if ACC file and process
If (size > 50000 & Contains(fullfile,"ACC"),
Include (".\ACC_extraction.jsl");
::ACCcnt = 79;
);
);
//*****************************************************************************
//End of loop to cycle through csv summary files in the folder selected by the user
//*****************************************************************************
// On last file edit created tables into the desired format
Caption( "Finishing up...Almost there..." );
//********************************************************************************
//Start of code to post process the LIV over time tables and LIV and pct change graphs
//********************************************************************************
If(::LIVcnt == 79,
Caption( "Finishing up...Almost there...Sorting LIV tables" );
//Generate list of columns to be stacked
collist = dt1 << Get Column Names();
tlist={};
TotalCol = N Col(dt1);
for(n=8, n<=TotalCol, n++,
insertinto(tlist,collist[n]);
);
//Stack selected columns
dt2 = dt1 << Stack(column(tlist),Source Label Column( "Label" ),Stacked Data Column( "Data" ),Number of Series( 3 ),Output Table ("LIV_Summary"));
dt1 << closewindow;
dt2 << delete columns(:Name("Label 2"));
dt2 << delete columns(:Name("Label 3"));
:Name("Data") << set Name("I(mA)");
:Name("Data 2") << set Name("V(V)");
:Name("Data 3") << set Name("P(mW)");
// replace text in column to record device no
dt2 << Begin Data Update;
dt2 << Recode Column(
dt2:Label,
{Substitute( _rcNow, "LDI (mA) ", "Device" ),
Substitute( _rcNow, "LDI (mA)", "Device1" )},
Target Column( :Label )
);
dt2 << End Data Update;
dt2 << Update(With( dtwaf ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Wafer ));
:TimeElapsed << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
:PreviousBITime << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
dtliv3 = dt2 << Summary(Group( :StartDate ), Mean( :TimeElapsed ), Mean( :PreviousBITime), Freq( "None" ), Weight( "None" ), Link to original data table( 0 ));
dtliv3 << New Column( "Day",numeric,formula(Word(1,:StartDate,"/")));
dtliv3 << New Column( "Month",numeric,formula(Word(2,:StartDate,"/")));
dtliv3 << New Column( "Year",numeric,formula(left(Word(3,:StartDate,"/"),4)));
:Day << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
:Month << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
:Year << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
dtliv4 = dtliv3 << Sort(By( :Year, :Month, :Day ), Order( Ascending ), Copy formula( 0 ),Output Table ("Cum_Time_from_LIV"));
dtliv3 << closewindow();
dtliv4 << New Column( "Readpoint",numeric,formula(Col Cumulative Sum(:Name("Mean(PreviousBITime)"))));
dt2 << Update(With( dtliv4 ),Match Columns( :StartDate = :StartDate ),Add Columns from Update Table( :Readpoint ));
dt2:Readpoint << Data Type( Character );
Graph Builder(
Size( 965, 718 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :Name( "I(mA)" ) ),
Y( :Name( "P(mW)" ) ),
Group X( :Wafer ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 13 ) ) ),
Local Data Filter(
Add Filter(
columns( :Readpoint ),
Where( :Readpoint == "0" ),
Display( :Readpoint, Size( 178, 209 ), Height( 209 ) )
)
),
SendToReport(
Dispatch(
{},
"I(mA)",
ScaleBox,
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"P(mW)",
ScaleBox,
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 2 )}
)
)
);
Graph Builder(
Size( 965, 718 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :Name( "I(mA)" ) ),
Y( :Name( "V(V)" ) ),
Group X( :Wafer ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 13 ) ) ),
Local Data Filter(
Add Filter(
columns( :Readpoint ),
Where( :Readpoint == "0" ),
Display( :Readpoint, Size( 178, 209 ), Height( 209 ) )
)
),
SendToReport(
Dispatch(
{},
"I(mA)",
ScaleBox,
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"V(V)",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 2 )}
)
)
);
// Now add readpoint data from LIV work that is adjusted for possible interruptions to the pct change table allowing their graphgs to be drawn
dtsum2 << Update(With( dtwaf ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Wafer ));
dtsum2 << Update(With( dtliv4 ),Match Columns( :StartDate = :StartDate ),Add Columns from Update Table( :Readpoint ));
//********************************************************************************
//Start of code to post process the pct change tables
//********************************************************************************
If (::LIVcnt == 79,
Caption( "Finishing up...Almost there...Sorting pct tables" );
dtsum2;
//Correct column format
:column({"TimeElapsed"}) << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
//For loop to correct column names and calculate %change columns for each Iop and Vop
For( k = N Col( dtsum2 ), k >= 2, k--,
ID = column name(k);
If(contains(column name(k),"Current at Power"),
colname = char(column name(k));
newname = munger(colname,1,"Current at Power (","Iop@");
newname2 = munger(newname,1,".000 XPDP (mW):","mW (mA)");
:Column (k) << Set Name( newname2 );
// Split off 0hr data to subset then add as new column at the end of the current table
dtsum2 << select where(:Readpoint==0);
dtsum3 = dtsum2 << Subset(Selected Rows( 1 ),columns( :Label, :Column(k) ));
newname3 = newname2 || " 0hr";
:Column (2) << Set Name( newname3 );
dtsum2 << Update(With( dtsum3 ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Column(2) ));
dtsum3 << closewindow;
// calculate dIop% and add to new column at end
newname4 = munger(newname2,1,"Iop@","dIop(%) ");
l = N Col(dtsum2);
a = Column(l);
b = Column(k);
dtsum2 << New Column( newname4, formula((b[]-a[])/a[]));
:Column(l+1)<<format(percent,7,2);
);
If(contains(column name(k),"Voltage at Power"),
colname = char(column name(k));
newname = munger(colname,1,"Voltage at Power (","Vop@");
newname2 = munger(newname,1,".000 XPDP (mW):","mW (V)");
:Column (k) << Set Name( newname2 );
// Split off 0hr data to subset then add as new column at the end of the current table
dtsum2 << select where(:Readpoint==0);
dtsum3 = dtsum2 << Subset(Selected Rows( 1 ),columns( :Label, :Column(k) ));
newname3 = newname2 || " 0hr";
:Column (2) << Set Name( newname3 );
dtsum2 << Update(With( dtsum3 ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Column(2) ));
dtsum3 << closewindow;
// calculate dVop% and add to new column at end
newname4 = munger(newname2,1,"Vop@","dVop(%) ");
l = N Col(dtsum2);
a = Column(l);
b = Column(k);
dtsum2 << New Column( newname4, formula((b[]-a[])/a[]));
:Column(l+1)<<format(percent,7,2);
);
If(contains(column name(k),"Iop @ Pop (mA):"),
colname = char(column name(k));
newname = munger(colname,1,"(mA):","(mA)");
:Column (k) << Set Name( newname );
// Split off 0hr data to subset then add as new column at the end of the current table
dtsum2 << select where(:Readpoint==0);
dtsum3 = dtsum2 << Subset(Selected Rows( 1 ),columns( :Label, :Column(k) ));
newname3 = newname || " 0hr";
:Column (2) << Set Name( newname3 );
dtsum2 << Update(With( dtsum3 ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Column(2) ));
dtsum3 << closewindow;
// calculate dIop% and add to new column at end
newname4 = munger(newname,1,"Iop","dIop(%) ");
l = N Col(dtsum2);
a = Column(l);
b = Column(k);
dtsum2 << New Column( newname4, formula((b[]-a[])/a[]));
:Column(l+1)<<format(percent,7,2);
);
If(contains(column name(k),"Threshold"),
colname = char(column name(k));
newname = munger(colname,1,"Threshold:","Threshold");
:Column (k) << Set Name( newname );
// Split off 0hr data to subset then add as new column at the end of the current table
dtsum2 << select where(:Readpoint==0);
dtsum3 = dtsum2 << Subset(Selected Rows( 1 ),columns( :Label, :Column(k) ));
newname3 = newname || " 0hr";
:Column (2) << Set Name( newname3 );
dtsum2 << Update(With( dtsum3 ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Column(2) ));
dtsum3 << closewindow;
// calculate dVop% and add to new column at end
newname4 = munger(newname,1,"Threshold","dIth(%) ");
l = N Col(dtsum2);
a = Column(l);
b = Column(k);
dtsum2 << New Column( newname4, formula((b[]-a[])/a[]));
:Column(l+1)<<format(percent,7,2);
);
);
// Draw pct change graphs now that new readpoint has been added
Graph Builder(
Size( 1195, 641 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :Readpoint ),
Y( :Name( "dIop(%) 40mW (mA)" ) ),
Page( :Wafer ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch(
{},
"Readpoint",
ScaleBox,
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"Readpoint",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"dIop(%) 40mW (mA)",
ScaleBox,
{Format( "Percent", 9, 0 )}
),
Dispatch(
{},
"dIop(%) 40mW (mA)",
ScaleBox( 2 ),
{Format( "Percent", 9, 0 ), Min( -0.2 ), Max( 0.2 ), Inc( 0.05 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 2 )}
)
)
);
);
//********************************************************************************
//End of code to post process the pct change tables
//********************************************************************************
//********************************************************************************
//Start of code to add dVop at 1.5mA pct change tables
//********************************************************************************
If (::LIVcnt == 79,
Caption( "Finishing up...Almost there...Sorting dVop at 1.5mA pct table" );
dt2 << Select Where(:Name("I(mA)") < 1.6);
dt3 = dt2 << Subset(Selected Rows( 1 ));
For( k = N Col( dt3 ), k >= 2, k--,
ID = column name(k);
If(contains(column name(k),"V(V)"),
colname = char(column name(k));
newname2 = munger(colname,1,"V(V)","V@1.5mA");
:Column (k) << Set Name( newname2 );
// Split off 0hr data to subset then add as new column at the end of the current table
dt3 << select where(:Readpoint=="0");
dt4 = dt3 << Subset(Selected Rows( 1 ),columns( :Label, :Column(k) ));
newname3 = newname2 || " 0hr";
:Column (2) << Set Name( newname3 );
dt3 << Update(With( dt4 ),Match Columns( :Label = :Label ),Add Columns from Update Table( :Column(2) ));
dt4 << closewindow;
// calculate dVop% and add to new column at end
newname4 = "dVop(%)@1.5mA";
l = N Col(dt3);
a = Column(l);
b = Column(k);
dt3 << New Column( newname4, formula((b[]-a[])/a[]));
:Column(l+1)<<format(percent,7,2);
);
);
dt3 << set name("dVop at 1.5mA");
);
//********************************************************************************
//End of code to post process dVop at 1.5mA pct change tables
//********************************************************************************
dt3;
// Draw pct change graphs now that new readpoint has been added
Graph Builder(
Size( 1195, 641 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :Readpoint ),
Y( :Name( "dVop(%)@1.5mA" ) ),
Page( :Wafer ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch(
{},
"Readpoint",
ScaleBox,
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"Readpoint",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 0 )}
),
Dispatch(
{},
"dVop(%)@1.5mA",
ScaleBox,
{Format( "Percent", 9, 0 )}
),
Dispatch(
{},
"dVop(%)@1.5mA",
ScaleBox( 2 ),
{Format( "Percent", 9, 0 ), Min( -0.1 ), Max( 0.1 ), Inc( 0.02 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 2 )}
)
)
);
);
//*********************************************************************************************
//End of code to post process the LIV over time tables and graphs and LIV and pct change graphs
//*********************************************************************************************
//********************************************************************************
//Start of code to post process the ACC monitor files
//********************************************************************************
If (::ACCcnt == 79,
Caption( "Finishing up...Almost there...Sorting ACC tables" );
//Generate list of column names that we will be wanting to stack later
collist = dtacc2 << Get Column Names();
tlist={};
TotalCol = N Col(dtacc2)-1;
for(n=10, n<=TotalCol, n++,
insertinto(tlist,collist[n]);
);
//Create stack table
dtacc3 = dtacc2 << Stack(column(tlist),Source Label Column( "Label" ),Stacked Data Column( "Data" ),Number of Series( 9 ),Output Table ("Monitor_Data"));
dtacc2 << closewindow();
//Correct column names post stack and delete those we don't want
dtacc3;
:Name("Data") << Set Name( "Time Stamp" );
:Name("Data 2") << Set Name( "Accumulated BI (hrs)" );
:Name("Data 3") << Set Name( "LDI (mA)" );
:Name("Data 4") << Set Name( "LDV (V)" );
:Name("Data 5") << Set Name( "MDI (uA)" );
:Name("Data 6") << Set Name( "XPDP (mW)" );
:Name("Data 7") << Set Name( "XPDP/MPDI Tracking Ratio" );
:Name("Data 8") << Set Name( "Temp (C)" );
:Name("Data 9") << Set Name( "Temp Control" );
dtacc3 << delete columns(:Name("Label 2"));
dtacc3 << delete columns(:Name("Label 3"));
dtacc3 << delete columns(:Name("Label 4"));
dtacc3 << delete columns(:Name("Label 5"));
dtacc3 << delete columns(:Name("Label 6"));
dtacc3 << delete columns(:Name("Label 7"));
dtacc3 << delete columns(:Name("Label 8"));
dtacc3 << delete columns(:Name("Label 9"));
// replace text in column to record device no
dtacc3 << Begin Data Update;
dtacc3 << Recode Column(
dtacc3:Label,
{Substitute( _rcNow, "Time Stamp ", "Device" ),
Substitute( _rcNow, "Time Stamp", "Device1" )},
Target Column( :Label )
);
dtacc3 << End Data Update;
:TimeElapsed << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
:TotalTime << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
:PreviousTime << data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);
//Create new column with re-calculated cum time column in case there were any interruptions and re-starts
dtacc4 = dtacc3 << Summary(Group( :StartDate ), Mean( :TimeElapsed ), Mean( :TotalTime ), Mean( :PreviousTime ), Freq( "None" ), Weight( "None" ), Link to original data table( 0 ));
dtacc5 = dtacc4 << Sort(By( :StartDate ), Order( Ascending ), Copy formula( 0 ),Output Table ("Cum_Time_from_Monitor"));
dtacc4 << closewindow();
dtacc5 << New Column( "Cum_Time_End",numeric,formula(Col Cumulative Sum(:Name("Mean(TotalTime)"))));
dtacc5 << New Column( "Cum_Time_Start",numeric,formula(:Cum_Time_End - :Name( "Mean(TotalTime)" )));
dtacc3 << Update(With( dtacc5 ),Match Columns( :StartDate = :StartDate ),Add Columns from Update Table( :Cum_Time_Start ));
dtacc3 << New Column( "BI_run_stress_time",numeric,formula(:Name( "Accumulated BI (hrs)" ) - :TimeElapsed));
dtacc3 << New Column( "Cum_Time_Actual_hrs",numeric,formula(:Cum_Time_Start + :BI_run_stress_time));
Graph Builder(
Size( 1131, 632 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :Cum_Time_Actual_hrs ),
Y( :Name( "XPDP (mW)" ) ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"Cum_Time_Actual_hrs",
ScaleBox,
{Format( "Fixed Dec", 10, 0 )}
),
Dispatch(
{},
"XPDP (mW)",
ScaleBox,
{Format( "Fixed Dec", 12, 1 )}
),
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 12, 2 )}
),
Dispatch(
{},
"",
ScaleBox( 2 ),
{Format( "Fixed Dec", 12, 2 )}
)
)
);
);
//********************************************************************************
//End of code to post process the ACC monitor files
//********************************************************************************
//Collect all files into a jmp project
Project = new project();
Move to Project( destination( Project ), windows( { dt3, dt2 , dtsum2, dtacc3, dtwaf, dtacc5, dtliv4} ));
//Close progress window
Caption( remove );
Wait( 0 );