code wiki / _hdl_build / nx_fabric_fec.nx
nx_fabric_fec.nx
buildroot/runtime/_hdl_build/nx_fabric_fec.nx
about
nx_fabric_fec.nx -- R3 of the SkyHammer fabric exceed ladder: built-in RESILIENCY.
(knowledge/research/2026-06-23-skyhammer-fabric-sclass-exceed-benchmark.md, ladder R3.)
SkyHammer sells "built-in resiliency" IN SILICON. On a LOSSY link with RTT the honest
software exceed is PROACTIVE FEC: a retransmit (ARQ) costs a full round-trip PER loss
round (= a stall), whereas Reed-Solomon parity already in flight RECONSTRUCTS the lost
shard with ZERO added round-trips. This rung MEASURES that vs ARQ on the SAME data-shard
loss pattern, and (NC3) PROVES every recovery is byte-exact -- not just "counted".
FOUNDED ON (composes, does not reinvent -- rule #15): nx_room_fec.nx -- the proven
sovereign GF(256) systematic Reed-Solomon MDS erasure code (gf_init / fec_build_G /
fec_encode / fec_decode / fec_data_eq; its own gate recovers ALL C(7,3) patterns +
tamper-breaks). R3 adds only the lossy-link + ARQ-vs-FEC latency model. Importing it
transitively splices nx_syscalls (single import; no double-import).
Integer-only, deterministic (LCG loss, reproducible). expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_room_fec.nx
imported by: nx_fabric_fec_gate.nx
structs
| 25 | struct FecMetrics |
consts
| 18 | const FB_MAGIC_1103515245: i64 = 1103515245 |
| 19 | const FB_MAGIC_12345: i64 = 12345 |
| 20 | const FB_MAGIC_2654435761: i64 = 2654435761 |
| 22 | const FB_ARQ: i64 = 0 // baseline: data-only, retransmit lost shards (RTT per loss round) |
| 23 | const FB_FEC: i64 = 1 // R3: k data + m parity; reconstruct <=m losses with no retransmit |
functions
| 34 | func fb_lcg(st: *i64) -> i64 { st[0] = (st[0] * FB_MAGIC_1103515245 + FB_MAGIC_12345) & 0x7fffffff; return st[0] } called by 1: fb_lost |
| 35 | func fb_lost(st: *i64, p_permille: i64) -> i64 { if (fb_lcg(st) % 1000) < p_permille { return 1 } return 0 } |
| 38 | func fb_arq_rounds(st: *i64, count: i64, p_permille: i64, sent: *i64) -> i64 |
| 53 | func fec_run(mode: i64, NBLOCKS: i64, k: i64, m: i64, S: i64, RTT: i64, p_permille: i64, base_seed: i64, mo: *FecMetrics) -> i64 |
| 135 | func main() -> i64 { return 0 } |