code wiki / _hdl_build / nx_assembly.nx
nx_assembly.nx
buildroot/runtime/_hdl_build/nx_assembly.nx
about
nx_assembly.nx -- LIB: GENERAL hierarchical PRODUCT digital twin -- the LibrePCB/BOM capability scaled all the way
up from a PCB to a whole product (a fridge, a car). A product is an ASSEMBLY TREE: nodes are sub-assemblies or
real parts (leaves); each leaf carries real supply-chain data (unit cost cents, mass grams, stock). Rollup computes
EXACT integer totals (cost, mass, part count) and supply-chain shortfalls over the whole tree -- the real "what it
costs / weighs / can we source it" of the product, hardware-rung-up. Sub-assemblies compose lower twins (e.g. the
control board = the nx_bom PCB twin). Data-driven: a new product = a new node table. never-brick #26: pure
arithmetic, bounded, deterministic. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_assembly_gate.nx
structs
| none |
consts
| none |
functions
| 12 | func asm_eff_count(parent: *i64, qty: *i64, n: i64, eff_out: *i64) -> i64 called by 1: main |
| 23 | func asm_total(eff: *i64, unit: *i64, is_leaf: *i64, n: i64) -> i64 called by 1: main |
| 31 | func asm_part_count(eff: *i64, is_leaf: *i64, n: i64) -> i64 called by 1: main |
| 39 | func asm_shortfalls(eff: *i64, stock: *i64, is_leaf: *i64, n: i64) -> i64 called by 1: main |