code wiki / _hdl_build / nx_recip64.nx

nx_recip64.nx

buildroot/runtime/_hdl_build/nx_recip64.nx

3616 B89 linesdepth 9pulls 9 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_recip64.nx -- the TRUE 64-bit Goldschmidt/Newton reciprocal divider as a GATE-NETWORK. Mirrors the bit-exact scalar (nx_recip64_scalar_test) op-for-op, using ONLY gate-sim cells + the proven 64x64->128 wide multiplier for mulh. No 128-bit datapath: the normalized reciprocal keeps every value in 64 bits and uses the high word of each product (mulhu = nx_mul_wide hi). Requires the sim's LOGICAL SHR (the quotient can have bit 63 set). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_mul_wide.nx nx_recip64.nx nx_recip64_test.nx

imports: nx_mul_wide.nx

imported by: nx_recip64_test.nx

structs

none

consts

10const R64_ITERS: i64 = 7
11const R64_KCORR: i64 = 6

functions

14func r64_mulhu(g: *NxGsim, a: i64, b: i64) -> i64
called by 1: nx_recip64_synth calls 1: nx_mul_wide_synth
22func r64_msb(g: *NxGsim, nd: i64) -> i64
called by 1: nx_recip64_synth calls 2: div_constdiv_op2
36func nx_recip64_synth(g: *NxGsim, na: i64, nb: i64, rem_out: *i64) -> i64