nishi_synth.nx
buildroot/runtime/nishi_synth.nx
about
nishi_synth.nx -- WHEELER-ONLY Verilog emitter.
!!! STATUS 2026-05-26: DEPRECATED FROM THE CANONICAL EMIT PATH. !!!
This file emits Verilog 2005. Per the operator's cardinal of
2026-05-26 ("our own verilog without any of this being something
we can be legally hit on") + [[feedback-open-source-licensed-
is-still-third-party]] + the audit in
hdl/SILICON_SOVEREIGNTY_AUDIT.md, Verilog is an EXTERNAL spec
(IEEE 1364) and emitting it bakes in third-party tools as
essential to the path.
The sovereign canonical emit path is hdl/nishi_synth_gates.nx
(.nxgate v1 format, ours).
This file STAYS for Wheeler-only test purposes per
[[feedback-c-is-wheeler-test-only]]:
- During development, run BOTH emitters in parallel
- Diff the resulting netlists for correctness
- NEVER ship Verilog as the canonical artifact
All consumers of THIS file must be Wheeler test harnesses, not
production paths. If you find a non-Wheeler caller, file it as
a sovereignty regression.
Reads an NxHdlModule (declared via nishi_hdl_primitives.nx
constructors) and emits a Verilog 2005 module definition.
Status: SEED. 2026-05-26. Module-shape emit only -- declares
ports, wires, regs. The combinational LOGIC that drives the
outputs (decoder lookup tables, ALU compute, CSR mux, etc.) is
emitted by per-module "logic emitter" functions that follow-on
commits will write -- one per RTL module under hdl/.
This is the structural skeleton; the behavioural layer plugs in
behind a small extension point (nx_synth_emit_logic_<module>).
dependencies 2 imports · 5 importers
imports: nx_syscalls.nxnishi_hdl_primitives.nx
imported by: nishi_synth_gates.nxsynth_emit_alu.nxsynth_emit_alu_gates_smoke.nxsynth_emit_regfile_gates.nxsynth_emit_regfile_gates_smoke.nx
structs
| 48 | struct NxSynthSink |
consts
| none |
functions
| 55 | func nx_synth_sink_init(s: *NxSynthSink, buf: *u8, cap: i64) -> i64 |
| 65 | func nx_synth_emit_bytes(s: *NxSynthSink, src: *u8, n: i64) -> i64 |
| 77 | func nx_synth_emit_str(s: *NxSynthSink, src: *u8) -> i64 |
| 89 | func nx_synth_emit_dec(s: *NxSynthSink, value: i64) -> i64 |
| 124 | func nx_synth_emit_signal_name(s: *NxSynthSink, handle: i64) -> i64 |
| 134 | func nx_synth_emit_range(s: *NxSynthSink, width: i64) -> i64 |
| 147 | func nx_synth_kind_keyword(kind: i64) -> *u8 called by 1: nx_synth_emit_module |
| 166 | func nx_synth_emit_module(s: *NxSynthSink, m: *NxHdlModule) -> i64 |
| 264 | func nx_synth_module_to_verilog(m: *NxHdlModule, s: *NxSynthSink) -> i64 |