code wiki / _hdl_build / nx_nrtl_opt.nx

nx_nrtl_opt.nx

buildroot/runtime/_hdl_build/nx_nrtl_opt.nx

3864 B69 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind librarytopic nrtl
docsdependenciesstructsconstsfunctions

about

nx_nrtl_opt.nx -- LIB: NHDL logic-OPTIMIZATION pass (closes the QoR-behind axis). The synthesizer (H4) lowers RTL to gates directly = correct but UNOPTIMIZED (the scorecard's one honest 'BEHIND' vs Yosys). This is the missing optimizer: two general, equivalence-preserving netlist transforms measured by GATE-COUNT REDUCTION (the metric logic-opt is judged on -- cited knowledge/library/eda_logicopt.txt: "cost = literal count, correlates with area"): * CSE (common-subexpression elimination): cells with identical (kind, init, canonicalized-srcs) compute the same value -> merge duplicates, redirect references. * DCE (dead-cell elimination): cells not in the transitive fanin of any primary output are removed. Both are SAFE BY CONSTRUCTION (they never change any output) -> the optimized netlist == the original, fewer gates. NEVER-BRICK (#26): pure memory, bounded, deterministic. license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_fpga_fabric.nx nx_syscalls.nx nx_nrtl_opt.nx nx_nrtl_opt_gate.nx

imports: nx_fpga_fabric.nxnx_syscalls.nx

imported by: nx_nrtl_opt_gate.nx

structs

none

consts

none

functions

14func opt_remap(s: i64, npi: i64, rep: *i64) -> i64
called by 1: nrtl_opt
20func nrtl_opt(ncells: i64, npi: i64, npo: i64, kind: *i64, init: *i64, src: *i64, po: *i64,
called by 1: main calls 2: sys_mmapopt_remap