From dc02482d53da5707be941ef8e0106a501a1528a9 Mon Sep 17 00:00:00 2001 From: saji Date: Sun, 5 May 2024 03:03:08 -0500 Subject: [PATCH] fix off by one for sizing --- compiler/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/main.rs b/compiler/src/main.rs index 1a41799..cf4bd66 100644 --- a/compiler/src/main.rs +++ b/compiler/src/main.rs @@ -112,11 +112,12 @@ fn synth(s: SynthArgs) -> Result<()> { { warn!("Sop too large, attempting to split {name}. cur={sop_size} want={wanted_size}"); let mut yosys = Command::new("yosys"); + let wsize = wanted_size - 1; yosys .args(["-c", "shink_sop.tcl", "--"]) .arg(&s.netlist) .arg(name) - .arg(wanted_size.to_string()); + .arg(wsize.to_string()); info!("running yosys command {:?}", yosys);