code wiki / _hdl_build / nx_vsroll_lib.nx
nx_vsroll_lib.nx
buildroot/runtime/_hdl_build/nx_vsroll_lib.nx
about
nx_vsroll_lib.nx -- roll per-SCOPE comparative claims into a DOMAIN verdict by MIN.
Everything here works on BUFFERS, not files, so the gate can feed it the ugly cases directly:
an empty roster, a roster whose domain has no rows, a claim for the RIGHT scope under the WRONG
domain, an unknown earns= label. A ruler that has only ever seen well-formed input is not a
ruler -- that lesson cost this lane a 14/14 gate sitting on a lib that fabricated retirements.
★★★★★MIN OVER A HAND-PICKED SUBSET IS A MAX. The roster is declared independently of the claims
so a missing axis reads UNMEASURED (refuses) rather than absent (rounds up).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 2 importers
imports: nx_vsbest_lib.nx
imported by: nx_vsroll.nxnx_vsroll_gate.nx
structs
| none |
consts
| 13 | const VR_SCOPE_CAP: i64 = 128 |
| 14 | const VR_OK: i64 = 0 |
| 15 | const VR_NO_ROSTER: i64 = 0 - 1 |
| 16 | const VR_INCOMPLETE: i64 = 0 - 2 |
| 19 | const VRO_NREQ: i64 = 0 |
| 20 | const VRO_NHAVE: i64 = 1 |
| 21 | const VRO_MINLV: i64 = 2 |
functions
| 23 | func vr_line_end(buf: *u8, p: i64, n: i64) -> i64 |
| 31 | func vr_field(buf: *u8, p: i64, e: i64, n: i64, out: *u8, cap: i64) -> i64 called by 1: vr_scope_at |
| 49 | func vr_level_of(buf: *u8, p: i64, e: i64) -> i64 |
| 72 | func vr_claim_level(cb: *u8, cn: i64, domain: *u8, scope: *u8) -> i64 |
| 123 | func vr_scope_at(rb: *u8, rn: i64, domain: *u8, idx: i64, out: *u8, cap: i64) -> i64 |
| 147 | func vr_roll_buf(domain: *u8, rb: *u8, rn: i64, cb: *u8, cn: i64, out: *i64) -> i64 |