Skip to main content

emit_gpu_simt_testbench

Function emit_gpu_simt_testbench 

Source
pub fn emit_gpu_simt_testbench(
    name: &str,
    eng: &SimtEngine,
    n_vectors: usize,
) -> String
Expand description

A self-checking iverilog testbench: for each of n_vectors vectors, reset the load counter, stream the load slots from gpu_{name}_in.hex, pulse go (all lanes compute in one cycle), then read back every lane output + the reduced scalar via raddr and compare against the VM oracle in gpu_{name}_out.hex. Prints PASS/FAIL. Layout matches write_gpu_hex.