Skip to main content

emit_reversible_alu_verilog

Function emit_reversible_alu_verilog 

Source
pub fn emit_reversible_alu_verilog(width: u32, step: u64) -> String
Expand description

Emit a synthesizable Verilog SOFT-CORE for the reversible ALU datapath (corner 5, phase 3) — the register-VM’s RevAdd charge-recovery core as RTL: a width-bit register advanced by step each clock. q := (q + step) mod 2^width is a PERMUTATION of the state space (a cyclic reversible datapath whose reverse module is the −step decrement), and the emitted text is real synthesizable Verilog — parse_transition_system accepts it and BMC / k-induction discharge its obligations. This is the round-tripping HDL twin of the software RevAdd; the full VM-datapath soft-core + a VM↔RTL SMT equivalence are the larger MAKE_A_CHIP build this slice opens.