From 4a178d7cff51a0623666b3b7d6beaeacf04d1938 Mon Sep 17 00:00:00 2001 From: Anhijkt Date: Thu, 10 Apr 2025 17:42:39 +0300 Subject: [PATCH] ice40_dsp: change unextend call condition --- techlibs/ice40/ice40_dsp.pmg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/techlibs/ice40/ice40_dsp.pmg b/techlibs/ice40/ice40_dsp.pmg index 2cfb97b2a..ff7c5cb65 100644 --- a/techlibs/ice40/ice40_dsp.pmg +++ b/techlibs/ice40/ice40_dsp.pmg @@ -32,8 +32,8 @@ code sigA sigB sigH ++i; return sig.extract(0, i); }; - sigA = port(mul, \A).is_fully_const() ? port(mul, \A) : unextend(port(mul, \A)); - sigB = port(mul, \B).is_fully_const() ? port(mul, \B) : unextend(port(mul, \B)); + sigA = param(mul, \A_SIGNED).as_bool() ? unextend(port(mul, \A)) : port(mul, \A); + sigB = param(mul, \B_SIGNED).as_bool() ? unextend(port(mul, \B)) : port(mul, \B); SigSpec O; if (mul->type == $mul)