code wiki / _hdl_build / nx_pattern_emit5.nx

nx_pattern_emit5.nx

buildroot/runtime/_hdl_build/nx_pattern_emit5.nx

8129 B112 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind librarytopic pattern
docsdependenciesstructsconstsfunctions

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

nx_pattern_emit.nx nx_syscalls.nx nx_pattern_emit5.nx nx_pattern_emit5_demo.nx nx_warden_build.nx

imports: nx_pattern_emit.nxnx_syscalls.nx

imported by: nx_pattern_emit5_demo.nxnx_warden_build.nx

structs

none

consts

14const K_MAGIC_3000: i64 = 3000

functions

17func pe5_emit_geometry(fd: i64, name: *u8, min_feat: i64, min_gap: i64) -> i64
called by 1: pe5_author_geometry calls 2: pe_wpe_wn
29func pe5_emit_geometry_test(fd: i64, name: *u8, min_feat: i64, min_gap: i64) -> i64
42func pe5_author_geometry(name: *u8, modpath: *u8, testpath: *u8, min_feat: i64, min_gap: i64) -> i64
53func pe5_sim_final(kp: i64, ki: i64, imax: i64, sp: i64, steps: i64) -> i64
68func pe5_emit_pid(fd: i64, name: *u8, kp: i64, ki: i64, imax: i64) -> i64
80func pe5_emit_pid_test(fd: i64, name: *u8, kp: i64, ki: i64, imax: i64) -> i64
102func pe5_author_pid(name: *u8, modpath: *u8, testpath: *u8, kp: i64, ki: i64, imax: i64) -> i64