From: Miodrag Milanovic Date: Wed, 16 Feb 2022 18:10:13 +0000 (+0100) Subject: Remove quotes if any from attribute X-Git-Tag: yosys-0.16~58^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29293a57bb02f40a17015a071380fde4c8a638d1;p=yosys.git Remove quotes if any from attribute --- 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 &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) {