projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4d82aa
)
Add support for signed $shift/$shiftx in smt2 back-end
author
Clifford Wolf
<clifford@clifford.at>
Thu, 1 Nov 2018 10:40:58 +0000
(11:40 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Thu, 1 Nov 2018 10:40:58 +0000
(11:40 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
backends/smt2/smt2.cc
patch
|
blob
|
history
diff --git
a/backends/smt2/smt2.cc
b/backends/smt2/smt2.cc
index e2777ae0463a274bdea00c04c42d45662c3c9224..418f8d76651f3677dc3aad23fb346dd7b172e874 100644
(file)
--- a/
backends/smt2/smt2.cc
+++ b/
backends/smt2/smt2.cc
@@
-554,7
+554,9
@@
struct Smt2Worker
if (cell->type.in("$shift", "$shiftx")) {
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 {
return export_bvop(cell, "(bvlshr A B)", 's');
}