Skip to content

Commit c13832d

Browse files
Merge pull request #365 from aitomatic/examples/semiconductor-etching-yieldguard
add examples/semiconductor-etching-yieldguard
2 parents eb85028 + 5ec0903 commit c13832d

File tree

15 files changed

+388
-0
lines changed

15 files changed

+388
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
HF_API_KEY=[... HuggingFace API key if running HuggingFace-hosted models ...]
2+
OPENAI_API_KEY=[... OpenAI API key if running on OpenAI services ...]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# environment variables
2+
.env
3+
4+
# Streamlit secrets
5+
.streamlit/secrets.toml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
HF_API_KEY = '[... HuggingFace API key if running HuggingFace-hosted models ...]'
2+
OPENAI_API_KEY = '[... OpenAI API key if running on OpenAI services ...]'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
streamlit-run:
2+
@poetry run streamlit run streamlit-main.py --server.allowRunOnSave=true --server.runOnSave=true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- markdownlint-disable MD013 MD043 -->
2+
3+
# Semiconductor Etching YieldGuard
4+
5+
## How to Run This Example
6+
7+
Install OpenSSA repo beforehand by running `make install` (or `.\make install` on Windows)
8+
at the OpenSSA repo root directory.
9+
10+
In this example's directory:
11+
12+
- Necessary credentials need to be in the `.env` file
13+
14+
- DANA problem-solving can be run by `make dana-solve prob="..."` (or `.\make dana-solve "..."` on Windows)
15+
16+
- Streamlit app can be run by `make streamlit-run` (or `.\make streamlit-run` on Windows)
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
from argparse import ArgumentParser
2+
from functools import cache
3+
from pathlib import Path
4+
5+
from dotenv import load_dotenv
6+
import yaml
7+
8+
from openssa import DANA, ProgramStore, HTP, HTPlanner, FileResource, HuggingFaceLM
9+
10+
# pylint: disable=wrong-import-order
11+
from semikong_lm import SemiKongLM
12+
13+
14+
load_dotenv()
15+
16+
17+
BASE_DIR: Path = Path(__file__).parent
18+
19+
DATA_DIR_PATH: Path = BASE_DIR / 'data'
20+
21+
EXPERTISE_DIR_PATH: Path = BASE_DIR / 'expertise'
22+
23+
EXPERT_KNOWLEDGE_FILE_PATH: Path = EXPERTISE_DIR_PATH / 'expert-knowledge.txt'
24+
with open(file=EXPERT_KNOWLEDGE_FILE_PATH,
25+
buffering=-1,
26+
encoding='utf-8',
27+
errors='strict',
28+
newline=None,
29+
closefd=True,
30+
opener=None) as f:
31+
EXPERT_KNOWLEDGE: str = f.read()
32+
33+
EXPERT_PROGRAMS_FILE_PATH: Path = EXPERTISE_DIR_PATH / 'expert-programs.yml'
34+
with open(file=EXPERT_PROGRAMS_FILE_PATH,
35+
buffering=-1,
36+
encoding='utf-8',
37+
errors='strict',
38+
newline=None,
39+
closefd=True,
40+
opener=None) as f:
41+
EXPERT_PROGRAMS: dict[str, dict] = yaml.safe_load(stream=f)
42+
43+
44+
@cache
45+
def get_or_create_dana(use_semikong_lm: bool = True, max_depth=2, max_subtasks_per_decomp=4) -> DANA:
46+
lm = (SemiKongLM if use_semikong_lm else HuggingFaceLM).from_defaults()
47+
48+
program_store = ProgramStore(lm=lm)
49+
if EXPERT_PROGRAMS:
50+
for program_name, htp_dict in EXPERT_PROGRAMS.items():
51+
htp = HTP.from_dict(htp_dict)
52+
program_store.add_or_update_program(name=program_name, description=htp.task.ask, program=htp)
53+
54+
return DANA(knowledge={EXPERT_KNOWLEDGE},
55+
program_store=program_store,
56+
programmer=HTPlanner(lm=lm, max_depth=max_depth, max_subtasks_per_decomp=max_subtasks_per_decomp),
57+
resources={FileResource(path=DATA_DIR_PATH, re_index=True)})
58+
59+
60+
if __name__ == '__main__':
61+
arg_parser = ArgumentParser()
62+
arg_parser.add_argument('problem')
63+
args = arg_parser.parse_args()
64+
65+
print(get_or_create_dana().solve(problem=args.problem))
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
WaterBatch: 1, 2, 3, 4, 5, 6
2+
3+
ReflectedPower_W: 36.6, 35.4, 37.5, 40.1, 42.3, 37.9
4+
5+
ForwardPower_W: 60.0, 58.0, 58.2, 57.8, 65.3, 60.0
6+
7+
ChamberPressure_Torr: 3.89, 4.18, 3.85, 4.22, 4.25, 3.53
8+
9+
GasFlowRate_sccm: 59.7, 58.1, 56.2, 55.1, 59.7, 54.4
10+
11+
ChamberWallTemperature_C: 76.3, 78.3, 76.6, 79.6, 81.7, 81.9
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
SEMICONDUCTOR ETCHING EQUIPMENT MONITORING, MAINTENANCE & OPTIMIZATION
2+
======================================================================
3+
4+
5+
RF Power Fluctuation Rule
6+
-------------------------
7+
HEURISTIC: If the reflected power in the TEL Tactras RLSA Etcher increases by more than 5% for three consecutive wafers,
8+
and the forward power adjustment exceeds 10%, this suggests possible electrode erosion or plasma instability.
9+
10+
ACTION: Alert the maintenance engineer to inspect the electrodes and adjust gas flow or power settings,
11+
potentially avoiding costly equipment downtime.
12+
13+
14+
Pressure Stability Monitoring
15+
-----------------------------
16+
HEURISTIC: If the chamber pressure deviation exceeds ±3% for more than 30 seconds during steady-state etching,
17+
coupled with a gas flow variation of more than 5%, it indicates potential chamber wall coating or residue buildup.
18+
19+
ACTION: Recommend a preventative chamber clean and adjust the gas flow to stabilize pressure,
20+
reducing the likelihood of non-uniform etching.
21+
22+
23+
Temperature-Dependent Chamber Cleaning Optimization
24+
---------------------------------------------------
25+
HEURISTIC: If the chamber wall temperature shows a steady increase of 2°C over three lots,
26+
despite maintaining the same power settings, it indicates polymer build-up on the chamber walls.
27+
28+
ACTION: Suggest adjusting the chamber clean cycle frequency and alerts engineers to check the wall lining.
29+
Automated cleaning recommendations can significantly reduce variation and increase yield.
30+
31+
32+
Etch Rate Uniformity Rule
33+
-------------------------
34+
HEURISTIC: If the etch rate between the wafer center and edge varies by more than 7% for three consecutive lots,
35+
this could indicate gas flow distribution issues or hardware alignment issues within the TEL Tactras system.
36+
37+
ACTION: Alert the process engineer to investigate gas flow uniformity
38+
and suggests optimizing flow parameters or performing a hardware realignment.
39+
40+
41+
Chamber Matching Network Heuristic
42+
----------------------------------
43+
HEURISTIC: If the chamber matching network requires more than two adjustments per wafer run
44+
to maintain desired RF power settings, it suggests possible impedance mismatch or degradation in the matching components.
45+
46+
ACTION: Optimize matching network settings and recommend maintenance
47+
if impedance mismatch trends persist, potentially preventing plasma stability issues.
48+
49+
50+
Microloading Effect Detection
51+
-----------------------------
52+
HEURISTIC: If the etch rate is higher in areas with smaller feature densities compared to high-density areas
53+
(indicative of the microloading effect), and the difference exceeds a set threshold,
54+
this can lead to non-uniform etching and yield loss.
55+
56+
ACTION: Alert engineers to optimize gas flow and power settings based on specific wafer feature density,
57+
enhancing etch uniformity across wafers.
58+
59+
60+
Real-Time Recipe Adjustment Based on Yield Data
61+
-----------------------------------------------
62+
HEURISTIC: If yield data shows a consistent defect pattern (e.g., at the wafer edge or specific die locations)
63+
for more than 5% of wafers, correlate this with historical process parameters and makes real-time recipe adjustments.
64+
65+
ACTION: Automated recipe optimization based on yield trends can reduce defect occurrence,
66+
improving overall productivity and wafer quality.
67+
68+
69+
Anomaly Detection with Historical Baseline Comparison
70+
-----------------------------------------------------
71+
HEURISTIC: If real-time sensor data (e.g., temperature, pressure, RF power) shows deviations
72+
outside historical baseline ranges for similar recipes, this could indicate tool degradation or unexpected chamber behavior.
73+
74+
ACTION: Trigger alerts and suggest corrective actions such as parameter adjustment or additional inspections,
75+
preventing potential faults.
76+
77+
78+
Particle Generation Control for Bevel Etching
79+
---------------------------------------------
80+
HEURISTIC: If particle count in the bevel area increases beyond acceptable limits during bevel etching
81+
in the Tactras UDEMAE system, this suggests non-uniform edge plasma distribution or excessive material removal.
82+
83+
ACTION: Recommend reducing RF power or modifying gas flow in the bevel area,
84+
significantly reducing the risk of yield-impacting particle contamination.
85+
86+
87+
Multi-Parameter Fault Isolation for Complex Equipment
88+
-----------------------------------------------------
89+
HEURISTIC: If multiple parameters (e.g., RF power, pressure, temperature) show simultaneous deviations
90+
outside standard operating windows, use historical fault isolation data to pinpoint the most likely root cause.
91+
92+
ACTION: Provide a ranked list of potential root causes with confidence levels,
93+
enabling faster and more accurate fault isolation.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
rf-power-fluctuation-monitoring:
2+
task: |-
3+
Monitor RF Power fluctuation and recommend inspection/maintenance actions if fluctuation is excessive
4+
5+
sub-htps:
6+
- task: >-
7+
What are the values of Reflected Power in the recent data?
8+
9+
- task: |-
10+
Analyze whether the lowest and highest Reflected Power values differ by more than 15%.
11+
If so, note down the corresponding wafer batch number range between them.
12+
13+
- task: >-
14+
What are the values of Forward Power in the recent data?
15+
16+
- task: |-
17+
Analyze whether the lowest and highest Forward Power values differ by more than 10%.
18+
If so, note down the corresponding wafer batch number range between them.
19+
20+
- task: |-
21+
If there are excessive fluctuations in both Reflected Power and Forward Power in the previous analyses,
22+
and if the wafer batch number ranges overlap, report a RF Power Fluctuation problem,
23+
and recommend the following maintenance actions:
24+
- Inspect the electrodes
25+
- Adjust gas flow
26+
- Adjust power settings
27+
28+
29+
pressure-instability-monitoring:
30+
task: |-
31+
Monitor Chamber Pressure fluctuation and recommend inspection/maintenance actions if fluctuation is excessive
32+
33+
sub-htps:
34+
- task: >-
35+
What are the values of Chamber Pressure in the recent data?
36+
37+
- task: |-
38+
Analyze whether there are consecutive Chamber Pressure values differing by at least 3%.
39+
If so, note down the corresponding wafer batch numbers.
40+
41+
- task: >-
42+
What are the values of Gas Flow Rate in the recent data?
43+
44+
- task: |-
45+
Analyze whether there are consecutive Gas Flow Rate values differing by at least 5%.
46+
If so, note down the corresponding wafer batch numbers.
47+
48+
- task: |-
49+
If there are excessive fluctuations in both Chamber Pressure and Gas Flow Rate in the previous analyses,
50+
and if the wafer batch numbers contain some same batch(es), report a Pressure Instability problem,
51+
and recommend the following maintenance actions:
52+
- Preventative chamber cleaning
53+
- Adjustment of the gas flow to stabilize pressure
54+
55+
56+
chamber-temperature-monitoring:
57+
task: |-
58+
Monitor Chamber Temperature increases and recommend inspection/maintenance actions if heating is excessive
59+
60+
sub-htps:
61+
- task: >-
62+
What are the values of Chamber Temperature in the recent data?
63+
64+
- task: |-
65+
Analyze whether there are 3 consecutive Chamber Temperature values
66+
showing increases of at least 2 Celcius degrees from first to second and from second to third
67+
68+
- task: |-
69+
If there is/are significant Chamber Temperature increase(s) identified in the previous analysis,
70+
recommend the following maintenance actions:
71+
- Adjustment of chamber clean frequency
72+
- Alerting engineers to check wall lining for polymer build-up
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@echo off
2+
3+
4+
:: TARGETS
5+
:: =======
6+
SET TARGET=%1
7+
8+
IF "%TARGET%"=="streamlit-run" GOTO streamlit-run
9+
10+
11+
:: STREAMLIT APP
12+
:: =============
13+
:streamlit-run
14+
poetry run streamlit run streamlit-main.py --server.allowRunOnSave=true --server.runOnSave=true
15+
GOTO end
16+
17+
18+
:: END
19+
:: ===
20+
:end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
WaterBatch,ForwardPower_W,ReflectedPower_W,ChamberPressure_Torr,GasFlowRate_sccm,ChamberWallTemperature_C
2+
1,59.8658484197038,36.58009357302478,3.8912139968434072,59.656320330745594,76.29389990800009
3+
2,58.16704785825934,35.38252446429568,4.178602163853312,58.08397348116461,78.31261142176992
4+
3,58.166955288079336,37.50547593215342,3.850684781489443,56.22890595323773,76.55855538044706
5+
4,57.79118453875756,40.13085924740417,4.2179458479297685,55.054858831268945,79.60034010588906
6+
5,65.30403852879604,42.33805650601139,4.250891926683164,59.68444677837765,81.7335513967164
7+
6,59.87527628850847,37.941053938071626,3.5335182210508873,54.40152493739601,81.92427227762764
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OpenSSA[contrib] @ https://GitHub.com/Aitomatic/OpenSSA/archive/main.zip
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from __future__ import annotations
2+
3+
from argparse import ArgumentParser
4+
from dataclasses import dataclass
5+
6+
from openssa.core.util.lm.llama import LlamaLM
7+
8+
9+
DEFAULT_MODEL = 'pentagoniac/SEMIKONG-70B'
10+
DEFAULT_API_KEY = '...'
11+
DEFAULT_API_BASE = 'http://34.44.90.64:8081/v1'
12+
13+
14+
@dataclass
15+
class SemiKongLM(LlamaLM):
16+
"""SemiKong LM."""
17+
18+
@classmethod
19+
def from_defaults(cls) -> SemiKongLM:
20+
"""Get default SemiKong LM instance."""
21+
# pylint: disable=unexpected-keyword-arg
22+
return cls(model=DEFAULT_MODEL, api_key=DEFAULT_API_KEY, api_base=DEFAULT_API_BASE)
23+
24+
25+
if __name__ == '__main__':
26+
arg_parser = ArgumentParser()
27+
arg_parser.add_argument('question')
28+
args = arg_parser.parse_args()
29+
30+
print(SemiKongLM.from_defaults().get_response(prompt=args.question))

0 commit comments

Comments
 (0)