code wiki / _hdl_build / _enc_r_replace_gate.nx

_enc_r_replace_gate.nx

buildroot/runtime/_hdl_build/_enc_r_replace_gate.nx

3127 B68 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

_enc_r_replace_gate.nx -- DIFFERENTIAL-REPLACEMENT of the RV64 R-type encoder (eve "inside", full encoder family). Is the SEARCH-derived evo_enc_r (_evo_enc_r_champ.nx) behaviorally IDENTICAL to the Claude asm_enc.enc_r across the field space? enc_r_ref is the REAL encoder inlined VERBATIM from nxasm/asm_enc.nx:18-22. GREEN over 12800 field combinations = the team derived a verified drop-in for a second toolchain-internal encoder (the workhorse R-type). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx _evo_enc_r_champ.nx _enc_r_replace_gate.nx

imports: nx_syscalls.nx_evo_enc_r_champ.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main v_op v_f7 v_rd v_r evo_enc_r enc_r_ref err_w sys_write err_n sys_write ↻ sys_mmap sys_exit

structs

none

consts

none

functions

10func enc_r_ref(opcode: i64, funct3: i64, funct7: i64, rd: i64, rs1: i64, rs2: i64) -> i64
called by 1: main
14func err_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
15func err_n(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
22func v_op(i: i64) -> i64 { if i == 0 { return 0x33 } if i == 1 { return 0x3B } if i == 2 { return 0x13 } return 0x7F }
called by 1: main
23func v_f7(i: i64) -> i64 { if i == 0 { return 0x00 } if i == 1 { return 0x20 } if i == 2 { return 0x01 } if i == 3 { return 0x40 } return 0x7F }
called by 1: main
24func v_rd(i: i64) -> i64 { if i == 0 { return 0 } if i == 1 { return 1 } if i == 2 { return 15 } if i == 3 { return 16 } return 31 }
called by 1: main
25func v_r(i: i64) -> i64 { if i == 0 { return 0 } if i == 1 { return 1 } if i == 2 { return 15 } return 31 }
called by 1: main
27func main() -> i64