diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2022-02-16 19:10:13 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2022-02-16 19:10:13 +0100 |
commit | 29293a57bb02f40a17015a071380fde4c8a638d1 (patch) | |
tree | b849191511ec07982e8c09a2d9672e55a84b071a | |
parent | 15860000487e2d6748843888b78289f95f3ea46b (diff) | |
download | yosys-29293a57bb02f40a17015a071380fde4c8a638d1.tar.gz yosys-29293a57bb02f40a17015a071380fde4c8a638d1.tar.bz2 yosys-29293a57bb02f40a17015a071380fde4c8a638d1.zip |
Remove quotes if any from attribute
-rw-r--r-- | frontends/verific/verific.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index 17dbed067..8c2f7f0da 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -169,7 +169,10 @@ void VerificImporter::import_attributes(dict<RTLIL::IdString, RTLIL::Const> &att FOREACH_ATTRIBUTE(obj, mi, attr) { if (attr->Key()[0] == ' ' || attr->Value() == nullptr) continue; - attributes[RTLIL::escape_id(attr->Key())] = RTLIL::Const(std::string(attr->Value())); + std::string val = std::string(attr->Value()); + if (val.size()>1 && val[0]=='\"' && val.back()=='\"') + val = val.substr(1,val.size()-2); + attributes[RTLIL::escape_id(attr->Key())] = RTLIL::Const(val); } if (nl) { |