3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-09 19:21:26 +00:00

Merge pull request #4711 from georgerennie/george/btor_buf

write_btor: support $buf
This commit is contained in:
Jannis Harder 2025-09-01 13:38:25 +02:00 committed by GitHub
commit 501bf4ce40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -509,7 +509,7 @@ struct BtorWorker
goto okay;
}
if (cell->type.in(ID($not), ID($neg), ID($_NOT_), ID($pos)))
if (cell->type.in(ID($not), ID($neg), ID($_NOT_), ID($pos), ID($buf), ID($_BUF_)))
{
string btor_op;
if (cell->type.in(ID($not), ID($_NOT_))) btor_op = "not";
@ -521,9 +521,9 @@ struct BtorWorker
int nid_a = get_sig_nid(cell->getPort(ID::A), width, a_signed);
SigSpec sig = sigmap(cell->getPort(ID::Y));
// the $pos cell just passes through, all other cells need an actual operation applied
// the $pos/$buf cells just pass through, all other cells need an actual operation applied
int nid = nid_a;
if (cell->type != ID($pos))
if (!cell->type.in(ID($pos), ID($buf), ID($_BUF_)))
{
log_assert(!btor_op.empty());
int sid = get_bv_sid(width);