Remove quotes if any from attribute

This commit is contained in:
Miodrag Milanovic 2022-02-16 19:10:13 +01:00
parent 1586000048
commit 29293a57bb
1 changed files with 4 additions and 1 deletions

View File

@ -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) {