diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-03-04 16:39:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 16:39:01 +0100 |
commit | 13655ddccf861de13f7b7faced793fdd2799dce4 (patch) | |
tree | a8c57c8f72aa84382c1f957f55ca4deb20ae3dd8 /frontends | |
parent | c3124023e441c99dbdff40cb730d5b05499a378d (diff) | |
parent | 29293a57bb02f40a17015a071380fde4c8a638d1 (diff) | |
download | yosys-13655ddccf861de13f7b7faced793fdd2799dce4.tar.gz yosys-13655ddccf861de13f7b7faced793fdd2799dce4.tar.bz2 yosys-13655ddccf861de13f7b7faced793fdd2799dce4.zip |
Merge pull request #3206 from YosysHQ/micko/quote_remove
Remove quotes if any from attribute
Diffstat (limited to 'frontends')
-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) { |