HgCV metrology validation from upstream

This commit is contained in:
Chase Tucker
2025-10-02 12:41:17 -07:00
committed by Tucker Chase (CSC FI SPS MESLEO)
parent b485de10ef
commit 52504272f9
2 changed files with 62 additions and 17 deletions

View File

@ -82,12 +82,15 @@ $Insert NOTIFICATION_EQUATES
$Insert RLIST_EQUATES $Insert RLIST_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert IQS_VIOL_DATA_EQUATES $Insert IQS_VIOL_DATA_EQUATES
$Insert FEATURE_FLAGS_EQUATES
Common /MetrologyServices/ MachineType@, LegacyLotId@ Common /MetrologyServices/ MachineType@, LegacyLotId@
Equ RETRY_ATTEMPTS$ TO 3 Equ RETRY_ATTEMPTS$ TO 3
Equ MINUTES_UNTIL_RETRY$ TO 3 Equ MINUTES_UNTIL_RETRY$ TO 3
Equ IMPORT_VALIDATION_IDX$ TO 99
Equ ORP$THICK_READS TO 1 Equ ORP$THICK_READS TO 1
Equ ORP$SHEET_RHO_READS TO 2 Equ ORP$SHEET_RHO_READS TO 2
Equ ORP$HGCV1_READS TO 3 Equ ORP$HGCV1_READS TO 3
@ -338,6 +341,7 @@ Service GetHgCV(Handle)
Result<5> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN Result<5> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].PSN'); // PSN
Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // LayerZonePair Result<8> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Wafer'); // LayerZonePair
Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp Result<11> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Date'); // Timestamp
Result<IMPORT_VALIDATION_IDX$> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].IndexOf'); // Validation
END END
ForOffset = (RecordIndex - 1) * FieldPositionIncrement; ForOffset = (RecordIndex - 1) * FieldPositionIncrement;
Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Site'); // Position Result<FieldPosition + ForOffset> = SRP_JSON(Handle, 'GETVALUE', 'Records[':RecordIndex:'].Site'); // Position
@ -404,6 +408,7 @@ end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service ImportMetrologyFiles(Machine=MACHINE_TYPES) Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
ErrMsg = ''
If Machine NE '' then If Machine NE '' then
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID:'*':Machine then Lock hSysLists, ServiceKeyID:'*':Machine then
@ -430,10 +435,10 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Case Machine _EQC 'SRP' Case Machine _EQC 'SRP'
DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\' DataPath = Environment_Services('GetApplicationRootPath') : '\Metrology\MET08ANLYSDIFAAST230\Source\MET08ANLYSDIFAAST230\'
Case Otherwise$ Case Otherwise$
Error_Services('Add', 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service') ErrMsg = 'Error in ':Service:' service. Unsupported Machine "':Machine:'" passed into service'
End Case End Case
If Error_Services('NoError') then If Error_Services('NoError') and ErrMsg EQ '' then
SearchPattern = '*.pdsf'; SearchPattern = '*.pdsf';
InitDir DataPath:SearchPattern InitDir DataPath:SearchPattern
FileList = DirList() FileList = DirList()
@ -525,23 +530,28 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
************************* *************************
* Import metrology data * * Import metrology data *
************************* *************************
IF RunData NE '' then IF RunData NE '' then
Metrology_Services('ImportMetrologyRunData', Machine, DataPath, FileName, RunData) AllowImport = Metrology_Services('AllowImport', RunData)
If AllowImport EQ True$ then
Metrology_Services('ImportMetrologyRunData', Machine, DataPath, FileName, RunData)
end else
ErrMsg = 'Import validation failed'
Metrology_Services('LogResults', PSN, Machine, 'UID002', Service : ' : ' : ErrMsg);
end
END ELSE END ELSE
Error_Services('Add', 'RunData argument was missing') ErrMsg = 'RunData argument was missing'
Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : Error_Services('GetMessage')) Metrology_Services('LogResults', '', '', 'UID001', Service : ' : ' : ErrMsg)
END END
If Error_Services('NoError') then If Error_Services('NoError') and ErrMsg EQ '' then
Continue = True$ Continue = True$
end else end else
ErrorMessage = Error_Services('GetMessage') If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
FQAError = IndexC(ErrorMessage, 'FQA has already been signed', 1) FQAError = IndexC(ErrMsg, 'FQA has already been signed', 1)
If ( Index(ErrorMessage, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then If ( Index(ErrMsg, 'UID002', 1) and (ImportAttempts LE RETRY_ATTEMPTS$) and Not(FQAError) ) then
Continue = False$ Continue = False$
end else end else
Continue = True$ Continue = True$
end end
end end
@ -561,10 +571,9 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
Metrology_Services('LogResults', '', Machine, 'UID001', 'Delete : ' : FileName : ', Size : ' : FileSize : ', Error : ' : ErrCode) Metrology_Services('LogResults', '', Machine, 'UID001', 'Delete : ' : FileName : ', Size : ' : FileSize : ', Error : ' : ErrCode)
end end
END else END else
If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
ErrorMessage = Error_Services('GetMessage')
MetrologyLog = Database_Services('ReadDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG') MetrologyLog = Database_Services('ReadDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG')
MetrologyLog := ErrorMessage : @FM MetrologyLog := ErrMsg : @FM
Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$) Database_Services('WriteDataRow', 'SYSLISTS', UCase(Machine):'_METROLOGY_LOG', MetrologyLog, True$)
end end
@ -577,13 +586,16 @@ Service ImportMetrologyFiles(Machine=MACHINE_TYPES)
NEXT FileLoopIndex NEXT FileLoopIndex
end else end else
Metrology_Services('LogResults', '', '', 'UID001', Error_Services('GetMessage')) If ErrMsg EQ '' then ErrMsg = Error_Services('GetMessage')
Metrology_Services('LogResults', '', '', 'UID001', ErrMsg)
end end
Unlock hSysLists, ServiceKeyID:'*':Machine else Null Unlock hSysLists, ServiceKeyID:'*':Machine else Null
end end
end else end else
Metrology_Services('LogResults', '', '', 'UID001', 'Null Machine passed into service') Metrology_Services('LogResults', '', '', 'UID001', 'Null Machine passed into service')
end end
If ErrMsg NE '' then Error_Services('Add', ErrMsg)
end service end service
@ -3203,6 +3215,13 @@ Service ScanNumDataPointsMatchesRdsTestSpecThickMPattern(RdsNo, RecipeLayer, Sca
Response = MatchFound Response = MatchFound
end service end service
Service AllowImport(RunData)
MetrologyImportValidationFeatureFlag = Xlate('FEATURE_FLAGS', 'METROLOGY_IMPORT_VALIDATION', FEATURE_FLAGS.ENABLED$, 'X')
FeatureDisabled = MetrologyImportValidationFeatureFlag NE True$
ImportValidated = RunData<IMPORT_VALIDATION_IDX$> EQ '' or RunData<IMPORT_VALIDATION_IDX$> EQ 1
Response = FeatureDisabled or ImportValidated
end service
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs // Internal GoSubs
@ -3646,3 +3665,5 @@ LoadRunDataToDatabase:
end end
return return

View File

@ -179,3 +179,27 @@ Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternEpiProWithCorrectArgsShould
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2) Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2)
Assert Matches equals True$ Assert Matches equals True$
end test end test
//-----------------------------------------------------------------------------
// AllowImport Tests
//-----------------------------------------------------------------------------
Test AllowImportWithFeatureFlagTurnedOffShouldReturnTrue
RunData = ''
RunData<99> = 1
AllowImport = Metrology_Services('AllowImport', RunData)
Assert AllowImport equals True$
end test
Test AllowImportWithFeatureFlagTurnedOnAndImportFlagTrueShouldReturnTrue
RunData = ''
RunData<99> = 1
AllowImport = Metrology_Services('AllowImport', RunData)
Assert AllowImport equals True$
end test
Test AllowImportWithFeatureFlagTurnedOnAndImportFlagFalseShouldReturnFalse
RunData = ''
RunData<99> = 'not valid'
AllowImport = Metrology_Services('AllowImport', RunData)
Assert AllowImport equals False$
end test