projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1586000
)
Remove quotes if any from attribute
author
Miodrag Milanovic
<mmicko@gmail.com>
Wed, 16 Feb 2022 18:10:13 +0000
(19:10 +0100)
committer
Miodrag Milanovic
<mmicko@gmail.com>
Wed, 16 Feb 2022 18:10:13 +0000
(19:10 +0100)
frontends/verific/verific.cc
patch
|
blob
|
history
diff --git
a/frontends/verific/verific.cc
b/frontends/verific/verific.cc
index 17dbed067f15169b03e89fe3ff76c747d7c80580..8c2f7f0da36e4e600aa734e44264b07b73d4e648 100644
(file)
--- 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) {