Skip to main content

emit_reversible_datapath_verilog

Function emit_reversible_datapath_verilog 

Source
pub fn emit_reversible_datapath_verilog(width: u32) -> String
Expand description

Emit the reversible RevAdd DATAPATH as synthesizable Verilog — a width-bit accumulator advanced by a data INPUT each clock (q := (q + delta) mod 2^width), the genuine charge-recovery ALU slice (its reverse is q := q − delta). For every fixed delta the clocked transition is a bijection in q. Unlike the constant-step emit_reversible_alu_verilog, this is the real datapath the VM’s RevAdd maps to; benchmarks/silicon/ synthesizes + place-and-routes the 32-bit form on an ECP5 FPGA.