From e04ac4e9e9658d80aa125332ec538f16f5f0f0c1 Mon Sep 17 00:00:00 2001 From: Scott Thibault Date: Tue, 1 Feb 2022 17:55:09 -0500 Subject: [PATCH] Fix unextend method for signed constants --- passes/pmgen/ice40_dsp.pmg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/passes/pmgen/ice40_dsp.pmg b/passes/pmgen/ice40_dsp.pmg index 7a01cbd51..378f251c0 100644 --- a/passes/pmgen/ice40_dsp.pmg +++ b/passes/pmgen/ice40_dsp.pmg @@ -29,8 +29,7 @@ code sigA sigB sigH if (sig[i] != sig[i-1]) break; // Do not remove non-const sign bit - if (sig[i].wire) - ++i; + ++i; return sig.extract(0, i); }; sigA = unextend(port(mul, \A)); -- 2.30.2