From c3bbf3633079e6ddbecedc44c9d02a8d8b9562c9 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Thu, 8 Oct 2026 16:44:26 +0000 Subject: [PATCH] Class v6 census, the uniform tool: site s is load instruction s / 2 under the interleaved two-window schedule (rows 2k and 2k + 1 are instruction k) Co-Authored-By: Claude Fable 5.1 --- tools/attack/v6-census/uniform/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/attack/v6-census/uniform/src/main.rs b/tools/attack/v6-census/uniform/src/main.rs index 55f362d11..a8936429f 100644 --- a/tools/attack/v6-census/uniform/src/main.rs +++ b/tools/attack/v6-census/uniform/src/main.rs @@ -117,7 +117,9 @@ fn main() { .iter() .enumerate() .map(|(s, d)| { - let ins = &loads[s % loads.len()]; + // the interleaved two-window schedule runs instruction k on window 0 then on window 1 (rows 2k + // and 2k + 1), so site s is load instruction s / 2 there and s otherwise + let ins = if sites == 2 * loads.len() { &loads[s / 2] } else { &loads[s % loads.len()] }; let w = if p.class.era.is_some() { (window(ins, mask, log2).0 as u64 + 1) as f64 } else { (1u64 << log2) as f64 } / (ins.width.max(1) as f64); let e_s = n - n * n / (2.0 * w); (d.iter().map(|w| w.count_ones() as u64).sum::() as f64 / e_s, s)