code wiki / _hdl_build / nx_pattern_library.nx
nx_pattern_library.nx
buildroot/runtime/_hdl_build/nx_pattern_library.nx
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
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
| 23 | const PL_VERDICT_GATE: i64 = 1 |
| 24 | const PL_PARSER_KAT: i64 = 2 |
| 25 | const PL_COMPARATOR: i64 = 3 |
| 26 | const PL_THRESHOLD_TABLE: i64 = 4 |
| 27 | const PL_ACCUMULATOR: i64 = 5 |
| 28 | const PL_GOVERNOR: i64 = 6 |
| 29 | const PL_STATE_FLOW: i64 = 7 |
| 30 | const PL_SCAFFOLD: i64 = 8 |
| 31 | const PL_GEOMETRY: i64 = 9 |
| 32 | const PL_PID_LOOP: i64 = 10 |
| 36 | const PL_MATH_KERNEL: i64 = 11 |
| 37 | const PL_WIRE_TLV: i64 = 12 |
| 38 | const PL_STRUCT_WALK: i64 = 13 |
| 39 | const PL_IO_CONTRACT: i64 = 14 |
| 43 | const PL_WIRE_MARKER: i64 = 15 |
| 47 | const PL_PREDICTOR_CODER: i64 = 16 |
| 51 | const PL_TEMPLATE_TABLE: i64 = 17 |
| 56 | const PL_STATE_MACHINE: i64 = 18 |
| 65 | const PL_PNG_INGEST: i64 = 19 |
| 69 | const PL_LOG_SCAN: i64 = 20 |
| 74 | const PL_RANK_FUSE: i64 = 21 |
| 79 | const PL_RANK_RETRIEVE: i64 = 22 |
| 83 | const PL_RTL_SYNTH: i64 = 23 |
| 87 | const PL_NETLIST_COMPOSE: i64 = 24 |
| 92 | const PL_FABRIC_NETLIST: i64 = 25 |
| 93 | const PL_N_PATTERNS: i64 = 25 |
functions
| 96 | func pl_n_patterns() -> i64 { return PL_N_PATTERNS } |
| 99 | func pl_covered(shape_id: i64) -> i64 |
| 106 | func pl_match(shape_id: i64) -> i64 |
| 113 | func pl_coverage_permil(shape_ids: *i64, n: i64) -> i64 |
| 123 | func pl_is_comprehensive(shape_ids: *i64, n: i64, floor_permil: i64) -> i64 |
| 129 | func pl_name(pattern_id: i64) -> *u8 |