code wiki / _hdl_build / nx_pattern_emit5.nx
nx_pattern_emit5.nx
buildroot/runtime/_hdl_build/nx_pattern_emit5.nx
about
nx_pattern_emit5.nx -- PATTERN EMITTERS: GEOMETRY (shape 9 of 10) + PID_LOOP (shape 10 of 10). With
these + SCAFFOLD (team-owned scaffold_author) the Builder's pattern library is 10/10 hands-off.
GEOMETRY: nm coords + area/spacing/DRC (the mask_geom / micron_geom / fab_slice shape). min_feat and
min_gap are SPEC PARAMS (the process node's design rules), baked from the assignment -- rule 11.
Negative dimensions are REFUSED (-1), never silently absd.
PID_LOOP: error -> control with the PLANT SIM AS ORACLE (the heater_pid shape). The emitter SIMULATES
the closed loop (first-order plant x += u/8) AT EMIT TIME and REFUSES to author gains that do not
converge -- a mechanical pre-flight, no Claude judgment. The exact simulated endpoint is baked into
the authored test as a KAT (bit-exact integer replay) plus a convergence bound + integral-clamp KAT.
Extends emit(231)/emit2(235)/emit3(241)/emit4(262). LAWS: struct-free, integer-only, flat ifs,
<=6 args per func (filed >6-stack-args miscompile). license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_pattern_emit.nxnx_syscalls.nx
imported by: nx_pattern_emit5_demo.nxnx_warden_build.nx
structs
| none |
consts
| 14 | const K_MAGIC_3000: i64 = 3000 |
functions
| 17 | func pe5_emit_geometry(fd: i64, name: *u8, min_feat: i64, min_gap: i64) -> i64 |
| 29 | func pe5_emit_geometry_test(fd: i64, name: *u8, min_feat: i64, min_gap: i64) -> i64 |
| 42 | func pe5_author_geometry(name: *u8, modpath: *u8, testpath: *u8, min_feat: i64, min_gap: i64) -> i64 |
| 53 | func pe5_sim_final(kp: i64, ki: i64, imax: i64, sp: i64, steps: i64) -> i64 |
| 68 | func pe5_emit_pid(fd: i64, name: *u8, kp: i64, ki: i64, imax: i64) -> i64 |
| 80 | func pe5_emit_pid_test(fd: i64, name: *u8, kp: i64, ki: i64, imax: i64) -> i64 |
| 102 | func pe5_author_pid(name: *u8, modpath: *u8, testpath: *u8, kp: i64, ki: i64, imax: i64) -> i64 |