code wiki / _hdl_build / nx_pattern_library.nx

nx_pattern_library.nx

buildroot/runtime/_hdl_build/nx_pattern_library.nx

10656 B156 linesdepth 2pulls 2 transitivereach 13 importersview sourcekind librarytopic pattern
docsdependenciesstructsconstsfunctions

about

nx_pattern_library.nx -- the BUILDER's PATTERN LIBRARY (operator: "get the builders pattern library truly s class exceed comprehensive"). The scaffold author emits BOILERPLATE; the gap is the module CORE. But most module cores aren't novel -- they fit a small set of recurring SHAPES. This library catalogs those shapes so the Builder authors the core itself, dropping bp_claude_touch toward 0. The more shapes covered, the more of the team's build work is autonomous = the S-class-exceed measure. Derived from the REAL modules built this session (each is one of these shapes): VERDICT_GATE -- thresholds -> a named verdict (jam_check, litho_stepper dose, dose verdict) PARSER_KAT -- bytes -> value, exact KATs (claim_extract, stl parse, gcode emit) COMPARATOR -- a vs b -> winner/score, no self-grade(research_exceed, referee) THRESHOLD_TABLE-- interpolated lookup (jam capacity, metrology class) ACCUMULATOR -- fold over an array -> a metric (metrology deviation, autonomy permil, breadth) GOVERNOR -- rate/pace/backoff over per-host state (polite_crawl) STATE_FLOW -- stages + transitions + verdict (build_raci, build_pipeline, ingest verdict) SCAFFOLD -- module+test+register boilerplate (scaffold_author -- already team-owned) GEOMETRY -- nm coords + area/spacing/DRC (mask_geom, micron_geom, fab_slice) PID_LOOP -- error -> control, plant sim oracle (heater_pid) A spec's `shape_id` (from the assignment) maps to a pattern; covered shapes are team-authorable. RACI: the BUILDER owns this (the AUTHOR's pattern catalog). Wires to bp_core_autonomous (a covered shape means pattern_id>0 -> autonomous core). LAWS: struct-free, integer-only. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_pattern_library.nx nx_pattern_classify.nx nx_pattern_library_test.nx nx_self_reliance_gate.nx nx_session_autonomy_gate.nx

imports: nx_syscalls.nx

imported by: nx_pattern_classify.nxnx_pattern_library_test.nxnx_self_reliance_gate.nxnx_session_autonomy_gate.nx

structs

none

consts

23const PL_VERDICT_GATE: i64 = 1
24const PL_PARSER_KAT: i64 = 2
25const PL_COMPARATOR: i64 = 3
26const PL_THRESHOLD_TABLE: i64 = 4
27const PL_ACCUMULATOR: i64 = 5
28const PL_GOVERNOR: i64 = 6
29const PL_STATE_FLOW: i64 = 7
30const PL_SCAFFOLD: i64 = 8
31const PL_GEOMETRY: i64 = 9
32const PL_PID_LOOP: i64 = 10
36const PL_MATH_KERNEL: i64 = 11
37const PL_WIRE_TLV: i64 = 12
38const PL_STRUCT_WALK: i64 = 13
39const PL_IO_CONTRACT: i64 = 14
43const PL_WIRE_MARKER: i64 = 15
47const PL_PREDICTOR_CODER: i64 = 16
51const PL_TEMPLATE_TABLE: i64 = 17
56const PL_STATE_MACHINE: i64 = 18
65const PL_PNG_INGEST: i64 = 19
69const PL_LOG_SCAN: i64 = 20
74const PL_RANK_FUSE: i64 = 21
79const PL_RANK_RETRIEVE: i64 = 22
83const PL_RTL_SYNTH: i64 = 23
87const PL_NETLIST_COMPOSE: i64 = 24
92const PL_FABRIC_NETLIST: i64 = 25
93const PL_N_PATTERNS: i64 = 25

functions

96func pl_n_patterns() -> i64 { return PL_N_PATTERNS }
99func pl_covered(shape_id: i64) -> i64
106func pl_match(shape_id: i64) -> i64
called by 3: mainmainmain calls 1: pl_covered
113func pl_coverage_permil(shape_ids: *i64, n: i64) -> i64
called by 2: pl_is_comprehensivemain calls 1: pl_covered
123func pl_is_comprehensive(shape_ids: *i64, n: i64, floor_permil: i64) -> i64
called by 1: main calls 1: pl_coverage_permil
129func pl_name(pattern_id: i64) -> *u8
called by 2: mainwb_report