Skip to content

Commit 3247d50

Browse files
committed
write_smt2: only take sign of cell if fit has one
* this is needed to handle $barrier cells which otherwise are similar to $buf but do not have a sign parameter
1 parent 0b31cf9 commit 3247d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/smt2/smt2.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ struct Smt2Worker
460460
{
461461
RTLIL::SigSpec sig_a, sig_b;
462462
RTLIL::SigSpec sig_y = sigmap(cell->getPort(ID::Y));
463-
bool is_signed = type == 'U' ? false : cell->getParam(ID::A_SIGNED).as_bool();
463+
bool is_signed = type == 'U' ? false : cell->hasParam(ID::A_SIGNED) && cell->getParam(ID::A_SIGNED).as_bool();
464464
int width = GetSize(sig_y);
465465

466466
if (type == 's' || type == 'S' || type == 'd' || type == 'b') {

0 commit comments

Comments
 (0)