mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 09:55:20 +00:00
Add support for signed $shift/$shiftx in smt2 back-end
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
b4d82aa245
commit
b6781c6f4b
|
@ -554,7 +554,9 @@ struct Smt2Worker
|
||||||
|
|
||||||
if (cell->type.in("$shift", "$shiftx")) {
|
if (cell->type.in("$shift", "$shiftx")) {
|
||||||
if (cell->getParam("\\B_SIGNED").as_bool()) {
|
if (cell->getParam("\\B_SIGNED").as_bool()) {
|
||||||
/* FIXME */
|
return export_bvop(cell, stringf("(ite (bvsge B #b%0*d) "
|
||||||
|
"(bvlshr A B) (bvlshr A (bvneg B)))",
|
||||||
|
GetSize(cell->getPort("\\B")), 0), 's');
|
||||||
} else {
|
} else {
|
||||||
return export_bvop(cell, "(bvlshr A B)", 's');
|
return export_bvop(cell, "(bvlshr A B)", 's');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue