aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-02-16 19:10:13 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2022-02-16 19:10:13 +0100
commit29293a57bb02f40a17015a071380fde4c8a638d1 (patch)
treeb849191511ec07982e8c09a2d9672e55a84b071a
parent15860000487e2d6748843888b78289f95f3ea46b (diff)
downloadyosys-29293a57bb02f40a17015a071380fde4c8a638d1.tar.gz
yosys-29293a57bb02f40a17015a071380fde4c8a638d1.tar.bz2
yosys-29293a57bb02f40a17015a071380fde4c8a638d1.zip
Remove quotes if any from attribute
-rw-r--r--frontends/verific/verific.cc5
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) {