code wiki / _hdl_build / synth_emit_alu.nx
synth_emit_alu.nx
buildroot/runtime/_hdl_build/synth_emit_alu.nx
about
synth_emit_alu.nx -- per-module Verilog logic emitter for the ALU.
First per-RTL-module logic emitter -- demonstrates the pattern
the remaining 5 (decoder, regfile, csr, clint, uart) will follow.
Reads the declared NxRv64imAluPorts handles (op_in, a_in, b_in,
result) + emits a combinational `always_comb` block with a case
statement over the 29 NX_RV64IM_ALU_* op codes. Plugged into the
nishi_synth skeleton between the BEGIN/END logic-injection markers.
Status: SEED. 2026-05-26. Pattern reference for the remaining
5 module emitters per hdl/HACKING.md "Adding a per-module logic
emitter" recipe.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnishi_hdl_primitives.nxnishi_synth.nxrv64im_min_alu.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| none |
functions
| 21 | func nx_synth_emit_hex64(s: *NxSynthSink, value: i64) -> i64 |
| 38 | func nx_synth_emit_op_case_line(s: *NxSynthSink, op_kind: i64, expr: *u8) -> i64 |
| 60 | func nx_synth_emit_logic_alu(s: *NxSynthSink) -> i64 calls 1: nx_synth_emit_str |
| 135 | func nx_synth_module_to_verilog_alu(m: *NxHdlModule, s: *NxSynthSink) -> i64 |