fix off by one for sizing

This commit is contained in:
saji 2024-05-05 03:03:08 -05:00
parent 63b1ee41fb
commit dc02482d53

View file

@ -112,11 +112,12 @@ fn synth(s: SynthArgs) -> Result<()> {
{ {
warn!("Sop too large, attempting to split {name}. cur={sop_size} want={wanted_size}"); warn!("Sop too large, attempting to split {name}. cur={sop_size} want={wanted_size}");
let mut yosys = Command::new("yosys"); let mut yosys = Command::new("yosys");
let wsize = wanted_size - 1;
yosys yosys
.args(["-c", "shink_sop.tcl", "--"]) .args(["-c", "shink_sop.tcl", "--"])
.arg(&s.netlist) .arg(&s.netlist)
.arg(name) .arg(name)
.arg(wanted_size.to_string()); .arg(wsize.to_string());
info!("running yosys command {:?}", yosys); info!("running yosys command {:?}", yosys);