From: Clifford Wolf Date: Sat, 15 Aug 2015 09:45:44 +0000 (+0200) Subject: Fixed generation of smt2 concat statements X-Git-Tag: yosys-0.6~192 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b659ffb4571a07db7df7c102790f850f003c9066;p=yosys.git Fixed generation of smt2 concat statements --- diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 9b1972b14..1e00ac718 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -201,10 +201,12 @@ struct Smt2Worker } if (GetSize(subexpr) > 1) { - std::string expr = "(concat"; - for (int i = GetSize(subexpr)-1; i >= 0; i--) + std::string expr = "", end_str = ""; + for (int i = GetSize(subexpr)-1; i >= 0; i--) { + if (i > 0) expr += " (concat", end_str += ")"; expr += " " + subexpr[i]; - return expr + ")"; + } + return expr.substr(1) + end_str; } else { log_assert(GetSize(subexpr) == 1); return subexpr[0];