code wiki / _hdl_build / nx_cleanroom.nx
nx_cleanroom.nx source
↩ module page · 32 lines · 2350 B
1// nx_cleanroom.nx -- LIB: the fab CLEANLINESS twin. Answers "can an enclosed (3D-printer-type) chamber match a clean
2// room?" mechanistically. The required cleanliness scales with FEATURE SIZE: a killer particle is ~half the feature, so
3// a micron node tolerates particles a HEPA filter removes trivially, while a nanometer node needs ISO-1 air. Methods:
4// open bench (room air ~ISO9), an ENCLOSED HEPA laminar-flow chamber (mini-environment, ~ISO5), enclosed ULPA +
5// positive pressure + sealed handling (~ISO3), and a full clean room (~ISO1, which ITSELF uses mini-environments at the
6// tool). Lower ISO number = cleaner. This models the established mini-environment / SMIF practice + the DIY proof
7// (Zeloof, CMU Hacker Fab build working ICs at micron nodes with NO clean room). never-brick #26: pure logic. license_tier: ORIGINAL
8import "nx_syscalls.nx"
9const K_MAGIC_10000: i64 = 10000
10
11// required ISO class for a feature size (nm); smaller feature -> stricter (lower) class.
12func clean_required_iso(feature_nm: i64) -> i64 {
13 if feature_nm >= K_MAGIC_10000 { return 7 } // >=10um (DIY node): big particles, Class-10k is fine
14 if feature_nm >= 1000 { return 6 } // 1-10um
15 if feature_nm >= 100 { return 5 } // 100nm-1um
16 if feature_nm >= 10 { return 3 } // 10-100nm
17 return 1 // <10nm leading edge
18}
19
20// ISO class ACHIEVABLE by a method: 0 open bench, 1 enclosed HEPA laminar (mini-env), 2 enclosed ULPA+positive-pressure, 3 full clean room.
21func clean_achievable_iso(method: i64) -> i64 {
22 if method == 0 { return 9 } // open room air
23 if method == 1 { return 5 } // ENCLOSED HEPA laminar-flow chamber -- the "enclosed 3D-printer-type system"
24 if method == 2 { return 3 } // enclosed ULPA + positive pressure + sealed handling
25 return 1 // full ISO-1 clean room (built FROM mini-environments at each tool)
26}
27
28// meets the requirement iff achievable is cleaner-or-equal (lower-or-equal ISO number).
29func clean_meets(achievable_iso: i64, required_iso: i64) -> i64 { if achievable_iso <= required_iso { return 1 } return 0 }
30
31// yield in permil: meets -> CMU-class 943 ; fails -> contamination-killed 120.
32func clean_yield_permil(achievable_iso: i64, required_iso: i64) -> i64 { if achievable_iso <= required_iso { return 943 } return 120 }