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
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
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
structs
| none |
consts
| none |
functions
| 35 | func nx_rfsmoke_slen(p: *u8) -> i64 |
| 41 | func nx_rfsmoke_puts(p: *u8) -> i64 |
| 46 | func nx_rfsmoke_count(buf: *u8, used: i64, needle: *u8) -> i64 |
| 64 | func main() -> i64 |