diff options
author | N. Engelhardt <nak@symbioticeda.com> | 2020-09-21 15:18:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 15:18:06 +0200 |
commit | ed5790382ac8427f8681456e00d76b8dce92d87d (patch) | |
tree | ae8eb8e76197fd4dbe0bda96eb977a380af009b6 /backends/smt2/smt2.cc | |
parent | c6ff947f6bac336ab5a31913c2daf7ad1cb8b91b (diff) | |
parent | 32381907972e16d5f72705eaf5350b731a9d71c8 (diff) | |
download | yosys-ed5790382ac8427f8681456e00d76b8dce92d87d.tar.gz yosys-ed5790382ac8427f8681456e00d76b8dce92d87d.tar.bz2 yosys-ed5790382ac8427f8681456e00d76b8dce92d87d.zip |
Merge pull request #2372 from nakengelhardt/name_is_public
add IdString::isPublic()
Diffstat (limited to 'backends/smt2/smt2.cc')
-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 4a53ce6d5..0b4e20ac6 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -822,7 +822,7 @@ struct Smt2Worker for (auto bit : SigSpec(wire)) if (reg_bits.count(bit)) is_register = true; - if (wire->port_id || is_register || wire->get_bool_attribute(ID::keep) || (wiresmode && wire->name[0] == '\\')) { + if (wire->port_id || is_register || wire->get_bool_attribute(ID::keep) || (wiresmode && wire->name.isPublic())) { RTLIL::SigSpec sig = sigmap(wire); std::vector<std::string> comments; if (wire->port_input) @@ -831,7 +831,7 @@ struct Smt2Worker comments.push_back(stringf("; yosys-smt2-output %s %d\n", get_id(wire), wire->width)); if (is_register) comments.push_back(stringf("; yosys-smt2-register %s %d\n", get_id(wire), wire->width)); - if (wire->get_bool_attribute(ID::keep) || (wiresmode && wire->name[0] == '\\')) + if (wire->get_bool_attribute(ID::keep) || (wiresmode && wire->name.isPublic())) comments.push_back(stringf("; yosys-smt2-wire %s %d\n", get_id(wire), wire->width)); if (GetSize(wire) == 1 && (clock_posedge.count(sig) || clock_negedge.count(sig))) comments.push_back(stringf("; yosys-smt2-clock %s%s%s\n", get_id(wire), |