From 52ad7a47f3798f17d9c33209649136418fe1194f Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 18 May 2023 10:37:55 +1200 Subject: [PATCH] Assign wires an smtoffset Wires weren't being assigned an smtoffset value so when generating a yosys witness trace it would also use an offset of 0. Not sure if this has any other effects, but it fixes the bug I was having. @jix could you take a look at this? --- backends/smt2/smt2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 48da3f4be..bdef8d569 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -628,7 +628,7 @@ struct Smt2Worker bool init_only = cell->type.in(ID($anyconst), ID($anyinit), ID($allconst)); for (auto chunk : cell->getPort(QY).chunks()) if (chunk.is_wire()) - decls.push_back(witness_signal(init_only ? "init" : "seq", chunk.width, chunk.offset, "", idcounter, chunk.wire)); + decls.push_back(witness_signal(init_only ? "init" : "seq", chunk.width, chunk.offset, "", idcounter, chunk.wire, chunk.offset)); makebits(stringf("%s#%d", get_id(module), idcounter), GetSize(cell->getPort(QY)), log_signal(cell->getPort(QY))); if (cell->type == ID($anyseq))