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
This commit is contained in:
George Rennie
2026-09-30 09:52:46 +02:00
committed by nella
parent 3cb100b6be
commit c0d1032979
+1 -1
View File
@@ -460,7 +460,7 @@ struct Smt2Worker
{
RTLIL::SigSpec sig_a, sig_b;
RTLIL::SigSpec sig_y = sigmap(cell->getPort(ID::Y));
bool is_signed = type == 'U' ? false : cell->getParam(ID::A_SIGNED).as_bool();
bool is_signed = type == 'U' ? false : cell->hasParam(ID::A_SIGNED) && cell->getParam(ID::A_SIGNED).as_bool();
int width = GetSize(sig_y);
if (type == 's' || type == 'S' || type == 'd' || type == 'b') {