code wiki / _hdl_build / nx_multsynth.nx

nx_multsynth.nx

buildroot/runtime/_hdl_build/nx_multsynth.nx

3134 B67 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_multsynth.nx -- GATE-LEVEL search space #1: synthesize a MULTIPLIER from gates (the Vedic / array-multiplier domain). A 2x2 bit-multiplier's four output bits are each a 4-input boolean function; the team finds the minimal circuit for each and verifies it EXACTLY over all 16 input combinations (the truth-table-as-bitmask trick at 4 inputs: columns a0=0xAAAA, a1=0xCCCC, b0=0xF0F0, b1=0xFF00 -> a program's 16-bit output IS its truth table). This is where exhaustive gate-level search competes with hardware multiplier designs (Urdhva Tiryagbhyam etc.) -- the team's bits-up substrate, feeding the ALU upward. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_boolsynth.nx nx_multsynth.nx nx_multsynth_test.nx

imports: nx_boolsynth.nx

imported by: nx_multsynth_test.nx

structs

none

consts

12const B4_A0: i64 = 43690 // 0xAAAA
13const B4_A1: i64 = 52428 // 0xCCCC
14const B4_B0: i64 = 61680 // 0xF0F0
15const B4_B1: i64 = 65280 // 0xFF00
16const B4_MASK: i64 = 65535 // 0xFFFF

functions

19func bl4_enum(op: *i64, a: *i64, b: *i64, t: i64, L: i64, sv: *i64, target: i64) -> i64
36func bl4_find(target: i64, op: *i64, a: *i64, b: *i64, maxL: i64) -> i64
called by 1: ms_bit calls 1: bl4_enum
49func mult_tt(k: i64) -> i64
called by 1: ms_bit
63func bl4_reeval(op: *i64, a: *i64, b: *i64, L: i64) -> i64
called by 1: ms_bit calls 1: bl_eval