diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-03-07 11:31:46 -0800 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-03-07 11:31:46 -0800 |
commit | 5dfc7becca1f1faf6e77fb3b5d07d97171613d90 (patch) | |
tree | 90a5961eeaeff1d3fdc3aefefa4399730692ad55 /backends/smt2 | |
parent | 22ff60850e68b5e98d4693a9a06ec688dac6d5ee (diff) | |
download | yosys-5dfc7becca1f1faf6e77fb3b5d07d97171613d90.tar.gz yosys-5dfc7becca1f1faf6e77fb3b5d07d97171613d90.tar.bz2 yosys-5dfc7becca1f1faf6e77fb3b5d07d97171613d90.zip |
Use SVA label in smt export if available
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'backends/smt2')
-rw-r--r-- | backends/smt2/smt2.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 7f3cc94ca..a26bff57b 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -887,8 +887,8 @@ struct Smt2Worker string name_a = get_bool(cell->getPort("\\A")); string name_en = get_bool(cell->getPort("\\EN")); - decls.push_back(stringf("; yosys-smt2-%s %d %s\n", cell->type.c_str() + 1, id, - cell->attributes.count("\\src") ? cell->attributes.at("\\src").decode_string().c_str() : get_id(cell))); + string infostr = (cell->name[0] == '$' && cell->attributes.count("\\src")) ? cell->attributes.at("\\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->type == "$cover") decls.push_back(stringf("(define-fun |%s_%c %d| ((state |%s_s|)) Bool (and %s %s)) ; %s\n", |