CL_Improve.dll Coding Detail
TBCG CLASS
1 //TB.header() 2 int TBCG::header(void) 3 { 4 TB_Timer.StartTimer(); 5 TBNameStore(); 6 CL_Comment("start",current_test_block(), "GREEN", 5); 7 // use to summay every duts' state 8 DutNumArray active_duts1; 9 int count = active_duts_get(&active_duts1); 10 int tmp = active_duts_get(&active_dut_mask); 11 curr_dut_mask = active_dut_mask; 12 13 if (count != 0) 14 { 15 results_get(&r1); // initialize Test result arrays 16 results_get(&r2); 17 results_get(&r3); 18 results_get(&r4); 19 results_get(&r5); 20 results_get(&r6); 21 results_get(&r7); 22 results_get(&r8); 23 results_get(&r9); 24 results_get(&r10); 25 results_get(&r11); 26 results_get(&r12); 27 results_get(&r13); 28 results_get(&r14); 29 results_get(&r15); 30 results_get(&r16); 31 results_get(&r17); 32 results_get(&r18); 33 results_get(&r19); 34 results_get(&r20); 35 results_get(&r21); 36 results_get(&r22); 37 results_get(&r23); 38 results_get(&r24); 39 results_get(&r25); 40 } 41 42 return TRUE; 43 }
1 int TBCG::end(bool flag) 2 { 3 CL_Comment("end",current_test_block(),"GREEN",5); 4 display_test_results(flag); 5 return MULTI_DUT; 6 }
1 void TBCG::Pdatalog(PinList *pPinList, IVMeasType meas_type) //call after a parametric test 2 { 3 remote_fetch(CL_dlog, 0, FALSE, INFINITE); 4 5 if (CL_dlog < 1) return; 6 7 8 // determine the what type of test was just run 9 e_log_type log_type, frc_type; 10 switch (parametric_mode()) { 11 case 0: log_type = LOG_I; frc_type = LOG_V; break; 12 case 2: log_type = LOG_I; frc_type = LOG_V; break; 13 case 1: log_type = LOG_V; frc_type = LOG_I; break; 14 default: output("Invalid parametric mode : %d", parametric_mode()); 15 } 16 17 if (CL_dlog > 1) { 18 if (measure() == TRUE) { 19 output("--------------------------------------------------------------------------------------------------"); 20 output("Tester Pin Pin Force Low High Measured"); 21 output(" Pin Name Result Value Limit Limit Value "); 22 output("--------------------------------------------------------------------------------------------------"); 23 } 24 25 } 26 int count = active_duts_get(&last_active_duts); 27 for (int ix = 0; ix<count; ix++) { 28 DutNum dut_num = last_active_duts[ix]; 29 active_duts_enable(dut_num); 30 // Print header info 31 32 CArray<double, double> meas_results; 33 CArray<PFState, PFState> pf_results; 34 35 // check the pinlist for either dps pins or signal pins 36 // get the measured results for this dut 37 if (all_dps(pPinList)){ 38 Dps_meas(meas_results); 39 Dps_pf(pf_results); 40 } 41 else if (all_hv(pPinList)) { 42 Hv_pf(pf_results); 43 Hv_meas(meas_results); 44 } 45 else if (all_dpo(pPinList)) 46 { 47 Dpo_meas(meas_results); 48 Dpo_pf(pf_results); 49 } 50 else if (all_dpohv(pPinList)) 51 { 52 DpoHv_meas(meas_results); 53 DpoHv_pf(pf_results); 54 } 55 else { 56 Pin_meas(meas_results); 57 Pin_pf(pf_results); 58 } 59 60 if (CL_dlog > 1) 61 output("Dut %d : %s", dut_num + 1, result_get(dut_num) ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>"); 62 63 int meas_index = 0; 64 65 // Loop through all dut pins 66 DutPin * dpin; 67 for (int dpi = 0; pin_info(pPinList, dpi, &dpin); ++dpi) { 68 69 // Get the HDTesterPin for this dut 70 HDTesterPin tpin; 71 pin_info(dpin, dut_num, &tpin); 72 if (tpin == t_na) 73 continue; 74 75 CString pin_name = resource_name(dpin); 76 CString tpin_name = testerpin_name(tpin); 77 78 if (measure()) 79 { 80 if (no_dps(pPinList) && no_dpo(pPinList) && no_dpohv(pPinList)) 81 { 82 switch (CL_dlog) 83 { 84 case 0: 85 case 1: 86 break; 87 case 2: //FAIL Only 88 if (!pf_results[meas_index]) 89 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 90 "<COLOR=Red>FAIL</COLOR>", 91 frc_type == LOG_I ? SwitchU(ipar_force(dpin), frc_type) : SwitchU(vpar_force(dpin), frc_type), 92 frc_type == LOG_I ? SwitchU(vpar_low(dpin), log_type) : SwitchU(ipar_low(dpin), log_type), 93 frc_type == LOG_I ? SwitchU(vpar_high(dpin), log_type) : SwitchU(ipar_high(dpin), log_type), 94 SwitchU(meas_results[meas_index], log_type)); 95 break; 96 case 3: //PASS only 97 if (pf_results[meas_index]) 98 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 99 "<COLOR=Green>PASS</COLOR>", 100 frc_type == LOG_I ? SwitchU(ipar_force(dpin), frc_type) : SwitchU(vpar_force(dpin), frc_type), 101 frc_type == LOG_I ? SwitchU(vpar_low(dpin), log_type) : SwitchU(ipar_low(dpin), log_type), 102 frc_type == LOG_I ? SwitchU(vpar_high(dpin), log_type) : SwitchU(ipar_high(dpin), log_type), 103 SwitchU(meas_results[meas_index], log_type)); 104 break; 105 case 4: //All 106 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 107 pf_results[meas_index] ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>", 108 frc_type == LOG_I ? SwitchU(ipar_force(dpin), frc_type) : SwitchU(vpar_force(dpin), frc_type), 109 frc_type == LOG_I ? SwitchU(vpar_low(dpin), log_type) : SwitchU(ipar_low(dpin), log_type), 110 frc_type == LOG_I ? SwitchU(vpar_high(dpin), log_type) : SwitchU(ipar_high(dpin), log_type), 111 SwitchU(meas_results[meas_index], log_type)); 112 break; 113 } 114 } 115 else if (all_dpohv(pPinList)) 116 { 117 switch (CL_dlog) 118 { 119 case 0: 120 case 1: 121 break; 122 case 2: //FAIL Only 123 if (!pf_results[meas_index]) 124 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 125 "<COLOR=Red>FAIL</COLOR>", 126 frc_type == LOG_I ? SwitchU(dpo_hv_ipar_force_get(dpin), frc_type) : SwitchU(dpo_hv_voltage_get(dpin), frc_type), 127 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_low_get(dpin), log_type) : SwitchU(dpo_hv_ipar_low_get(dpin), log_type), 128 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_high_get(dpin), log_type) : SwitchU(dpo_hv_ipar_high_get(dpin), log_type), 129 SwitchU(meas_results[meas_index], log_type)); 130 break; 131 case 3: //PASS only 132 if (pf_results[meas_index]) 133 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 134 "<COLOR=Green>PASS</COLOR>", 135 frc_type == LOG_I ? SwitchU(dpo_hv_ipar_force_get(dpin), frc_type) : SwitchU(dpo_hv_voltage_get(dpin), frc_type), 136 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_low_get(dpin), log_type) : SwitchU(dpo_hv_ipar_low_get(dpin), log_type), 137 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_high_get(dpin), log_type) : SwitchU(dpo_hv_ipar_high_get(dpin), log_type), 138 SwitchU(meas_results[meas_index], log_type)); 139 break; 140 case 4: //All 141 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 142 pf_results[meas_index] ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>", 143 frc_type == LOG_I ? SwitchU(dpo_hv_ipar_force_get(dpin), frc_type) : SwitchU(dpo_hv_voltage_get(dpin), frc_type), 144 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_low_get(dpin), log_type) : SwitchU(dpo_hv_ipar_low_get(dpin), log_type), 145 frc_type == LOG_I ? SwitchU(dpo_hv_vpar_high_get(dpin), log_type) : SwitchU(dpo_hv_ipar_high_get(dpin), log_type), 146 SwitchU(meas_results[meas_index], log_type)); 147 break; 148 } 149 } 150 151 else if (all_dpo(pPinList)) 152 { 153 switch (CL_dlog) 154 { 155 case 0: 156 case 1: 157 break; 158 case 2: //FAIL Only 159 if (!pf_results[meas_index]) 160 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 161 "<COLOR=Red>FAIL</COLOR>", 162 frc_type == LOG_I ? SwitchU(dpo_ipar_force_get(dpin), frc_type) : SwitchU(dpo_voltage_get(dpin), frc_type), 163 frc_type == LOG_I ? SwitchU(dpo_voltage_low_get(dpin), log_type) : SwitchU(dpo_current_low_get(dpin), log_type), 164 frc_type == LOG_I ? SwitchU(dpo_voltage_high_get(dpin), log_type) : SwitchU(dpo_current_high_get(dpin), log_type), 165 SwitchU(meas_results[meas_index], log_type)); 166 break; 167 case 3: //PASS only 168 if (pf_results[meas_index]) 169 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 170 "<COLOR=Green>PASS</COLOR>", 171 frc_type == LOG_I ? SwitchU(dpo_ipar_force_get(dpin), frc_type) : SwitchU(dpo_voltage_get(dpin), frc_type), 172 frc_type == LOG_I ? SwitchU(dpo_voltage_low_get(dpin), log_type) : SwitchU(dpo_current_low_get(dpin), log_type), 173 frc_type == LOG_I ? SwitchU(dpo_voltage_high_get(dpin), log_type) : SwitchU(dpo_current_high_get(dpin), log_type), 174 SwitchU(meas_results[meas_index], log_type)); 175 break; 176 case 4: //All 177 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 178 pf_results[meas_index] ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>", 179 frc_type == LOG_I ? SwitchU(dpo_ipar_force_get(dpin), frc_type) : SwitchU(dpo_voltage_get(dpin), frc_type), 180 frc_type == LOG_I ? SwitchU(dpo_voltage_low_get(dpin), log_type) : SwitchU(dpo_current_low_get(dpin), log_type), 181 frc_type == LOG_I ? SwitchU(dpo_voltage_high_get(dpin), log_type) : SwitchU(dpo_current_high_get(dpin), log_type), 182 SwitchU(meas_results[meas_index], log_type)); 183 break; 184 } 185 } 186 else 187 { 188 if (CL_dlog > 1) 189 output("%-10s\t%-10s\t\t%4s\t\t%s\t%s\t%s\t%s", tpin_name, pin_name, 190 pf_results[meas_index] ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>", 191 //bugs here add judgement 192 SwitchU(meas_type == 0 ? dps(dpin) : ipar_force(dpin), frc_type), 193 //bugs here(change dps_current_low( dpin ) to vpar_low(dpin)) ----colin 194 SwitchU(meas_type == 0 ? ipar_low(dpin) : vpar_low(dpin), log_type), 195 SwitchU(meas_type == 0 ? ipar_high(dpin) : vpar_high(dpin), log_type), 196 SwitchU(meas_results[meas_index], log_type)); 197 } 198 } 199 else{ 200 if (CL_dlog > 1) 201 output("%-10s %-10s %4s", tpin_name, pin_name, 202 pf_results[meas_index] ? "<COLOR=Green>PASS</COLOR>" : "<COLOR=Red>FAIL</COLOR>"); 203 } 204 ++meas_index; 205 } 206 ASSERT(meas_index == meas_results.GetSize()); 207 } 208 209 // restore original duts 210 active_duts_enable(last_active_duts); 211 }
1 void TBCG::ClosedMeasureResults(DoubleArray &buffer, PinList* pl, DutPin* wanted_dpin) 2 { 3 buffer.SetSize(max_dut() + 1); 4 5 6 SoftwareOnlyActiveDutIterator dut_loop; 7 bool acknowledge = FALSE; 8 while (dut_loop.More(TRUE)) 9 { 10 DutNum dut = active_dut_get(); 11 DoubleArray ary; 12 if (all_dps(pl)){ 13 Dps_meas(ary); 14 } 15 else if (all_hv(pl)) 16 { 17 Hv_meas(ary); 18 } 19 else if (all_dpo(pl)) 20 { 21 Dpo_meas(ary); 22 } 23 else if (all_dpohv(pl)) 24 { 25 DpoHv_meas(ary); 26 } 27 else 28 { 29 Pin_meas(ary); 30 } 31 DutPin * dpin; 32 for (int dpi = 0; pin_info(pl, dpi, &dpin); ++dpi) 33 { 34 if (dpin == wanted_dpin) 35 { 36 acknowledge = TRUE; 37 CL_Comment("Find pin:" + vFormat("%s", resource_name(dpin)) + " from PinList:" + vFormat("%s", resource_name(pl)), "MeasureResults"); 38 buffer.SetAt(dut, ary[dpi]); 39 } 40 } 41 } 42 if (acknowledge == FALSE) 43 warning("[CL Improvement]<MeasureResults> Can Not Find pin:" + vFormat("%s", resource_name(wanted_dpin)) + " from PinList:" + vFormat("%s", resource_name(pl))); 44 45 }
1 void TBCG::set_Coordinate(int x, int y, int dut_num) 2 { 3 int index = dut_num; 4 XArray.SetAtGrow(index, x); 5 YArray.SetAtGrow(index, y); 6 }
1 void TBCG::set_WaferInfo(CString lot, CString slot) 2 { 3 Lot_ID = lot; 4 Slot_ID = slot; 5 }

浙公网安备 33010602011771号