Skip to main content

encode_soft_core_full_w

Function encode_soft_core_full_w 

Source
pub fn encode_soft_core_full_w(
    program: &CompiledProgram,
    width: u32,
) -> Result<Vec<u32>, String>
Expand description

The width-parametric form of encode_soft_core_full. width is retained as an API/experimental knob describing the runtime datapath’s fast-path size, but it NO LONGER changes the emitted image: every over-i32 constant is a 3-word LoadConstWide64 (op 222) carrying the full i64 at every width, and the value plane auto-promotes to BigInt on overflow exactly like the VM’s unbounded Int. So the full core reproduces the VM EXACTLY — every constant and every arithmetic result, into the BigInt tail — and does so identically at width 32 and 64 (BigInt handles exactness; the width is a perf/area knob, not a correctness switch). Runs on crate::codegen_sva::soft_core_model::run_soft_core_w at the matching width. (The distinct 32-bit tape-out core in scalar_asm.rs genuinely wraps at 2³² — that is the small-area chip.)