code wiki / _hdl_build / nx_fpga_rexec.nx

nx_fpga_rexec.nx

buildroot/runtime/_hdl_build/nx_fpga_rexec.nx

3737 B59 linesdepth 7pulls 9 transitivereach 3 importersview sourcekind librarytopic fpga
docsdependenciesstructsconstsfunctions

about

nx_fpga_rexec.nx -- LIB: RUNG 32b -- the R-type ALU-class EXECUTE datapath as ONE composed fabric. Folds the R9 DECODER fabric (nx_fpga_decode: funct3/funct7b5 -> control) and the R8 ALU datapath (nx_fpga_alu: a,b,sub,msel0,msel1 -> result) into a SINGLE fabric via fab_append (R32a), wiring the decoder's {sub,msel0,msel1} control OUTPUTS directly into the ALU's control PIs. The composed fabric takes (funct3 bits, funct7b5, a[W], b[W]) and outputs the W-bit ALU result for the DECODED op -- the control unit + datapath as ONE synthesizable netlist (vs R29 which emitted the ALU alone, no decode). This is the first REAL-CPU-MODULE monolithic fold (toward the whole-CPU CPU.v); shift+compare+result-MUX for the full 10-op R-type are the next rung (R32b-2). Covers the ALU-class ops: ADD/SUB/XOR/OR/AND. NEVER-BRICK (#26): pure memory, bounded (8 + 9W cells), deterministic, zero hardware-state writes. license_tier: ORIGINAL

dependencies 5 imports · 3 importers

nx_fpga_compose.nx nx_fpga_decode.nx nx_fpga_alu.nx nx_fpga_fabric.nx nx_syscalls.nx nx_fpga_rexec.nx nx_fpga_rexec_gate.nx nx_nhdl_gate.nx nx_nhdl_scorecard_gate.nx

imports: nx_fpga_compose.nxnx_fpga_decode.nxnx_fpga_alu.nxnx_fpga_fabric.nxnx_syscalls.nx

imported by: nx_fpga_rexec_gate.nxnx_nhdl_gate.nxnx_nhdl_scorecard_gate.nx

structs

none

consts

17const K_MAGIC_2560: i64 = 2560

functions

21func fab_build_rexec_alu(W: i64, cinit: *i64, csrc: *i64, ckind: *i64, cpo: *i64, outnpi: *i64) -> i64
51func fab_rexec_run(W: i64, NCELLS: i64, NPI: i64, cinit: *i64, csrc: *i64, cpo: *i64, pi: *i64, co: *i64, f3: i64, f7b5: i64, a: i64, b: i64) -> i64
called by 2: mainmain calls 2: fab_evalfab_resolve