code wiki / _hdl_build / synth_emit_regfile_gates_smoke.nx

synth_emit_regfile_gates_smoke.nx

buildroot/runtime/_hdl_build/synth_emit_regfile_gates_smoke.nx

3809 B97 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind smoketopic synth
docsdependenciesstructsconstsfunctions

about

synth_emit_regfile_gates_smoke.nx -- structural smoke for the regfile .nxgate emitter. Builds the rv64im_min regfile HDL module, runs nx_emit_regfile_gates into a sink, prints the netlist (so progress is followable), then asserts the structural invariants the emitter MUST satisfy: .NXGATE 1 present (format header) .MODULE present (module declared) .PORT x 9 (clk reset rs1_idx rs2_idx rd_idx rd_value write_en rs1_data rs2_data) .FLOP x 31 (x1..x31; x0 has no flop) .CONST x 33 (31 shared index consts + 2 read-cascade zeros) .CELL x 217 (per-reg EQ+AND+MUX write path = 93; dual read EQ+MUX = 124) .NET x 248 (every internal non-const net, width-declared) .END present UNKNOWN x 0 (no cell emitted an out-of-enum kind) Exit code 0 = all green. Non-zero = the first failed check (see per-check codes). This is a CORRECTNESS gate (EXEMPT from the NISHIBENCH winner-tier per the bench standard). Functional gate-sim equivalence vs the behavioural regfile is NOT checked here -- that needs nishi-pnr's gate simulator (M5). This smoke proves the netlist is well-formed + complete + on-spec.

dependencies 6 imports · 0 importers

nx_syscalls.nx nishi_hdl_primitives.nx nishi_synth.nx nishi_synth_gates.nx rv64im_min_regfile.nx synth_emit_regfile_gates.nx synth_emit_regfile_gates_smoke

imports: nx_syscalls.nxnishi_hdl_primitives.nxnishi_synth.nxnishi_synth_gates.nxrv64im_min_regfile.nxsynth_emit_regfile_gates.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_hdl_module_init nx_rv64im_rf_build nx_hdl_clock nx_hdl_signal_alloc nx_hdl_kind_is_valid nx_hdl_width_is_valid nx_hdl_reset nx_hdl_signal_alloc ↻ nx_hdl_input nx_hdl_signal_alloc ↻ nx_hdl_output nx_hdl_signal_alloc ↻ nx_synth_sink_init nx_emit_regfile_gates nx_gate_emit_header nx_synth_emit_str nx_synth_emit_bytes sys_mmap ↻ nx_rf_const nx_hdl_wire nx_hdl_signal_alloc ↻ nx_rf_net nx_hdl_wire ↻ nx_synth_emit_str ↻ nx_gate_emit_net_ref nx_synth_emit_str ↻ nx_synth_emit_dec nx_synth_emit_str ↻ sys_mmap ↻ nx_synth_emit_bytes ↻ nx_synth_emit_dec ↻ nx_rf_bin nx_rf_net ↻ sys_mmap ↻ nx_rf_mux nx_rf_net ↻ sys_mmap ↻ nx_hdl_connect

structs

none

consts

none

functions

35func nx_rfsmoke_slen(p: *u8) -> i64
41func nx_rfsmoke_puts(p: *u8) -> i64
called by 1: main calls 2: sys_writenx_rfsmoke_slen
46func nx_rfsmoke_count(buf: *u8, used: i64, needle: *u8) -> i64
called by 1: main calls 1: nx_rfsmoke_slen
64func main() -> i64