diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-03-04 16:39:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 16:39:12 +0100 |
commit | a95e5d505b8e5dd841ba6eb8b6d1e9cfe75aa776 (patch) | |
tree | f3640bdd4d521efefa4f54e008bde2ac34d3ac0a /backends/smt2/smt2.cc | |
parent | 13655ddccf861de13f7b7faced793fdd2799dce4 (diff) | |
parent | dc739362c7e0c0d7befe2a5dc2866aef31ca5a20 (diff) | |
download | yosys-a95e5d505b8e5dd841ba6eb8b6d1e9cfe75aa776.tar.gz yosys-a95e5d505b8e5dd841ba6eb8b6d1e9cfe75aa776.tar.bz2 yosys-a95e5d505b8e5dd841ba6eb8b6d1e9cfe75aa776.zip |
Merge pull request #3186 from nakengelhardt/smtbmc_sby_print_id
add argument for printing cell names in yosys-smtbmc
Diffstat (limited to 'backends/smt2/smt2.cc')
-rw-r--r-- | backends/smt2/smt2.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index a928419a1..9bf0de03e 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -985,8 +985,10 @@ struct Smt2Worker string name_a = get_bool(cell->getPort(ID::A)); string name_en = get_bool(cell->getPort(ID::EN)); - string infostr = (cell->name[0] == '$' && cell->attributes.count(ID::src)) ? cell->attributes.at(ID::src).decode_string() : get_id(cell); - decls.push_back(stringf("; yosys-smt2-%s %d %s\n", cell->type.c_str() + 1, id, infostr.c_str())); + if (cell->name[0] == '$' && cell->attributes.count(ID::src)) + decls.push_back(stringf("; yosys-smt2-%s %d %s %s\n", cell->type.c_str() + 1, id, get_id(cell), cell->attributes.at(ID::src).decode_string().c_str())); + else + decls.push_back(stringf("; yosys-smt2-%s %d %s\n", cell->type.c_str() + 1, id, get_id(cell))); if (cell->type == ID($cover)) decls.push_back(stringf("(define-fun |%s_%c %d| ((state |%s_s|)) Bool (and %s %s)) ; %s\n", |