Fix unextend method for signed constants
authorScott Thibault <sathibault@yahoo.com>
Tue, 1 Feb 2022 22:55:09 +0000 (17:55 -0500)
committerMarcelina Koƛcielnicka <mwk@0x04.net>
Wed, 2 Feb 2022 02:21:09 +0000 (03:21 +0100)
passes/pmgen/ice40_dsp.pmg

index 7a01cbd51e299b6d2b72e406b1c0eaa9f46249a4..378f251c09fb6a8f2bcea0e1de861f6fbb874c9e 100644 (file)
@@ -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));