Merge pull request #3655 from jix/smt2_fix_b_op_width

smt2: Fix operation width computation for boolean producing cells
This commit is contained in:
Jannis Harder 2023-02-01 18:06:59 +01:00 committed by GitHub
commit 0f2cb80a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -462,7 +462,10 @@ struct Smt2Worker
int width = GetSize(sig_y); int width = GetSize(sig_y);
if (type == 's' || type == 'S' || type == 'd' || type == 'b') { if (type == 's' || type == 'S' || type == 'd' || type == 'b') {
width = max(width, GetSize(cell->getPort(ID::A))); if (type == 'b')
width = GetSize(cell->getPort(ID::A));
else
width = max(width, GetSize(cell->getPort(ID::A)));
if (cell->hasPort(ID::B)) if (cell->hasPort(ID::B))
width = max(width, GetSize(cell->getPort(ID::B))); width = max(width, GetSize(cell->getPort(ID::B)));
} }