From f9f5c2c15e0888c2f772a55238a9d4a54eda2f63 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:40:34 +1200 Subject: [PATCH] smtr: Fix constants --- backends/functional/smtlib_rosette.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/functional/smtlib_rosette.cc b/backends/functional/smtlib_rosette.cc index 98b70182ef3..96172d1aaf5 100644 --- a/backends/functional/smtlib_rosette.cc +++ b/backends/functional/smtlib_rosette.cc @@ -187,7 +187,7 @@ struct SmtrPrintVisitor : public Functional::AbstractVisitor { SExpr logical_shift_right(Node, Node a, Node b) override { return list("bvlshr", n(a), extend(n(b), b.width(), a.width())); } SExpr arithmetic_shift_right(Node, Node a, Node b) override { return list("bvashr", n(a), extend(n(b), b.width(), a.width())); } SExpr mux(Node, Node a, Node b, Node s) override { return list("if", to_bool(n(s)), n(b), n(a)); } - SExpr constant(Node, RTLIL::Const const& value) override { return list("bv", value.as_string(), value.size()); } + SExpr constant(Node, RTLIL::Const const& value) override { return list("bv", "#b" + value.as_string(), value.size()); } SExpr memory_read(Node, Node mem, Node addr) override { log_error("memory_read not supported in Rosette printer"); } SExpr memory_write(Node, Node mem, Node addr, Node data) override { log_error("memory_write not supported in Rosette printer"); }