From 7b386fe85608a5fee15f54ee01afc9e173f7fe40 Mon Sep 17 00:00:00 2001 From: "Infineon\\StieberD" Date: Tue, 24 Jun 2025 15:07:31 -0700 Subject: [PATCH] modified CLEAN_INSP_ACTIONS WRITE action to post to transaction queue and proc queue --- LSL2/STPROC/CLEAN_INSP_ACTIONS.txt | 89 +------------------ LSL2/STPROC/CLEAN_INSP_SERVICES.txt | 129 +++++++++++++++++++++++++++- 2 files changed, 132 insertions(+), 86 deletions(-) diff --git a/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt b/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt index af6894a..3d1906e 100644 --- a/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt +++ b/LSL2/STPROC/CLEAN_INSP_ACTIONS.txt @@ -76,7 +76,7 @@ $insert WO_MAT_EQUATES Equ Comma$ to ',' Declare function Error_Services, Database_Services, Environment_Services, QA_Services, RDS_Services, MemberOf -Declare subroutine Error_Services, Database_Services, Post_Metrology_Manual_Data_Entry_Log +Declare subroutine Error_Services, Database_Services, Post_Metrology_Manual_Data_Entry_Log, Service_Services Declare subroutine Qa_Services If KeyID then GoSub Initialize_System_Variables @@ -799,96 +799,15 @@ WRITE_RECORD: WONo = Record ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X') - EpiPro = (ReactType EQ 'EPP') - GaN = (ReactType EQ 'GAN') NonEpiPro = ( (ReactType NE 'EPP') and (ReactType NE 'GAN') ) Stage = Record - If Stage EQ 'LWI' then - RDSNo = Record - PostCIKey = Xlate('RDS', RDSNo, 'POST_CI_NO', 'X') - If PostCIKey NE '' then - FailedWafers = Record - If FailedWafers NE '' then - NewPostSpecSampleQty = Sum(FailedWafers) - PostCIRec = Database_Services('ReadDataRow', 'CLEAN_INSP', PostCIKey) - PostSpecRecipes = PostCIRec - NumRecipes = DCount(PostSpecRecipes, @VM) - If NumRecipes GT 0 then - For RecipeIndex = 1 to NumRecipes - CurrSpec = PostCIRec - If ( (CurrSpec EQ '') or (CurrSpec LT NewPostSpecSampleQty) ) then - PostCIRec = NewPostSpecSampleQty - end - Next RecipeIndex - Database_Services('WriteDataRow', 'CLEAN_INSP', PostCIKey, PostCIRec, True$, False$, True$) - end - end - end + Service_Services('PostProcedure', 'CLEAN_INSP_SERVICES', 'UpdatePostCISampleQty':@VM:Name) end - If NonEpiPro then - // Sync up Insp, Clean, and SurfScan signatures with WO_MAT signature profile - Stage = {STAGE} - WOMatKey = {WO_MAT_KEY} - // Update failed wafer list - QA_Services('UpdateFailedWafers', WOMatKey) - WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) - WOMatSigProf = WOMatRec - WOMatSigs = WOMatRec - WOMatSigDTMs = WOMatRec - - OrigInspSig = OrigRecord - OrigInspSigDTM = OrigRecord - InspSig = Record - InspSigDTM = Record - - OrigCleanSig = OrigRecord - OrigCleanSigDTM = OrigRecord - CleanSig = Record - CleanSigDTM = Record - - OrigScanSig = OrigRecord - OrigScanSigDTM = OrigRecord - ScanSig = Record - ScanSigDTM = Record - - SigProfUpdate = False$ - - If ( (OrigInspSig NE InspSig) or (OrigInspSigDTM NE InspSigDTM) ) then - WOMatStage = '1':Stage:'I' - Locate WOMatStage in WOMatSigProf using @VM setting vPos then - WOMatSigs<0, vPos> = InspSig[-1, 'B':@VM] - WOMatSigDTMs<0, vPos> = InspSigDTM[-1, 'B':@VM] - SigProfUpdate = True$ - end - end - - If ( (OrigCleanSig NE CleanSig) or (OrigCleanSigDTM NE CleanSigDTM) ) then - WOMatStage = '1':Stage:'C' - Locate WOMatStage in WOMatSigProf using @VM setting vPos then - WOMatSigs<0, vPos> = CleanSig[-1, 'B':@VM] - WOMatSigDTMs<0, vPos> = CleanSigDTM[-1, 'B':@VM] - SigProfUpdate = True$ - end - end - - If ( (OrigScanSig NE ScanSig) or (OrigScanSigDTM NE ScanSigDTM) ) then - WOMatStage = '1':Stage:'S' - Locate WOMatStage in WOMatSigProf using @VM setting vPos then - WOMatSigs<0, vPos> = ScanSig[-1, 'B':@VM] - WOMatSigDTMs<0, vPos> = ScanSigDTM[-1, 'B':@VM] - SigProfUpdate = True$ - end - end - - If SigProfUpdate then - NumSteps = DCount(WOMatSigProf, @VM) - WOMatRec = Field(WOMatSigs, @VM, 1, NumSteps) - WOMatRec = Field(WOMatSigDTMs, @VM, 1, NumSteps) - Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$) - end + Service_Services('PostProcedure', 'QA_SERVICES', 'UpdateFailedWafers':@VM:WOMatKey) + Service_Services('PostProcedure', 'CLEAN_INSP_SERVICES', 'PushSigProfileToWoMat':@VM:Name) end return diff --git a/LSL2/STPROC/CLEAN_INSP_SERVICES.txt b/LSL2/STPROC/CLEAN_INSP_SERVICES.txt index de56b68..298e8db 100644 --- a/LSL2/STPROC/CLEAN_INSP_SERVICES.txt +++ b/LSL2/STPROC/CLEAN_INSP_SERVICES.txt @@ -56,7 +56,8 @@ $Insert PRS_STAGE_EQUATES $Insert WO_MAT_EQUATES Declare function Database_Services, SRP_JSON, Error_Services, obj_Clean_Insp -Declare subroutine Database_Services, SRP_JSON, Error_Services, obj_React_Run, Clean_Insp_Services, React_Run_Services, Btree.Extract +Declare subroutine Database_Services, SRP_JSON, Error_Services, obj_React_Run, Clean_Insp_Services, React_Run_Services +Declare subroutine Transaction_Services, Btree.Extract GoToService @@ -439,11 +440,13 @@ Service UpdateAllCleanInsp(WOMatKey) end service + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This service functions as a means to get the latest CINo for a specified RDS No where the defectivity measurements took place // This is specifically used to have the latest defectivity data //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Service GetLatestDefectCINoByRDSId(RDSNo) + LatestCINo = '' LatestInspDtm = '' Open 'DICT CLEAN_INSP' to @DICT then @@ -464,6 +467,130 @@ Service GetLatestDefectCINoByRDSId(RDSNo) end end Response = LatestCINo + +end service + + +Service PushSigProfileToWoMat(CleanInspKey) + + ErrorMsg = '' + If (CleanInspKey NE '') then + If RowExists('CLEAN_INSP', CleanInspKey) then + Record = Database_Services('ReadDataRow', 'CLEAN_INSP', CleanInspKey) + If Error_Services('NoError') then + WONo = Record + ReactType = Xlate('WO_LOG', WONo, 'REACT_TYPE', 'X') + NonEpiPro = ( (ReactType NE 'EPP') and (ReactType NE 'GAN') ) + If NonEpiPro then + // Sync up Insp, Clean, and SurfScan signatures with WO_MAT signature profile + Stage = Record + WOMatKey = Xlate('CLEAN_INSP', CleanInspKey, 'WO_MAT_KEY', 'X') + If WOMatKey NE '' then + WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) + If Error_Services('NoError') then + WOMatSigProf = WOMatRec + WOMatSigs = WOMatRec + WOMatSigDTMs = WOMatRec + + InspSig = Record + InspSigDTM = Record + CleanSig = Record + CleanSigDTM = Record + ScanSig = Record + ScanSigDTM = Record + + WOMatStage = '1':Stage:'I' + Locate WOMatStage in WOMatSigProf using @VM setting vPos then + WOMatSigs<0, vPos> = InspSig[-1, 'B':@VM] + WOMatSigDTMs<0, vPos> = InspSigDTM[-1, 'B':@VM] + end + + WOMatStage = '1':Stage:'C' + Locate WOMatStage in WOMatSigProf using @VM setting vPos then + WOMatSigs<0, vPos> = CleanSig[-1, 'B':@VM] + WOMatSigDTMs<0, vPos> = CleanSigDTM[-1, 'B':@VM] + end + + WOMatStage = '1':Stage:'S' + Locate WOMatStage in WOMatSigProf using @VM setting vPos then + WOMatSigs<0, vPos> = ScanSig[-1, 'B':@VM] + WOMatSigDTMs<0, vPos> = ScanSigDTM[-1, 'B':@VM] + end + + NumSteps = DCount(WOMatSigProf, @VM) + WOMatSigs = Field(WOMatSigs, @VM, 1, NumSteps) + WOMatSigDTMs = Field(WOMatSigDTMs, @VM, 1, NumSteps) + Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIGNATURE$, WOMatSigs) + Transaction_Services('PostWriteFieldTransaction', 'WO_MAT', WOMatKey, WO_MAT_SIG_DTM$, WOMatSigDTMs) + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + ErrorMsg = 'Error in ':Service:' service. Null WO_MAT_KEY returned for CLEAN_INSP ':CleanInspKey:'.' + end + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + ErrorMsg = 'Error in ':Service:' service. CLEAN_INSP ':CleanInspKey:' does not exist.' + end + end else + ErrorMsg = 'Error in ':Service:' service. Null CleanInspKey passed into service.' + end + + If ErrorMsg NE '' then Error_Services('Add', ErrorMsg) + +end service + + +Service UpdatePostCISampleQty(CleanInspKey) + + ErrorMsg = '' + If CleanInspKey NE '' then + If RowExists('CLEAN_INSP', CleanInspKey) then + Record = Database_Services('ReadDataRow', 'CLEAN_INSP', CleanInspKey) + If Error_Services('NoError') then + Stage = Record + If Stage EQ 'LWI' then + RDSNo = Record + PostCIKey = Xlate('RDS', RDSNo, 'POST_CI_NO', 'X') + If PostCIKey NE '' then + FailedWafers = Record + If FailedWafers NE '' then + NewPostSpecSampleQty = Sum(FailedWafers) + PostCIRec = Database_Services('ReadDataRow', 'CLEAN_INSP', PostCIKey) + PostSpecRecipes = PostCIRec + NumRecipes = DCount(PostSpecRecipes, @VM) + If NumRecipes GT 0 then + UpdatePostRec = False$ + For RecipeIndex = 1 to NumRecipes + CurrSpec = PostCIRec + If ( (CurrSpec EQ '') or (CurrSpec LT NewPostSpecSampleQty) ) then + UpdatePostRec = True$ + PostCIRec = NewPostSpecSampleQty + end + Next RecipeIndex + If UpdatePostRec then + PostCISpecSampQty = PostCIRec + Transaction_Services('PostWriteFieldTransaction', 'CLEAN_INSP', PostCIKey, CLEAN_INSP_SPEC_SS_SAMP_QTY$, PostCISpecSampQty) + end + end + end + end + end + end else + ErrorMsg = 'Error in ':Service:' service. Error message: ':Error_Services('GetMessage') + end + end else + ErrorMsg = 'Error in ':Service:' service. CLEAN_INSP ':CleanInspKey:' does not exist.' + end + end else + ErrorMsg = 'Error in ':Service:' service. Null CleanInspKey passed into service.' + end + + If ErrorMsg NE '' then Error_Services('Add', ErrorMsg) + end service ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////