Strip quotes around fileinfo strings

Yosys puts quotes around the string that represents the fileinfo whereas
firrtl does not. So when firrtl sees quotes, it escapes them with an extra
backslash which makes it hard to read afterwards.
This commit is contained in:
Sahand Kashani 2020-03-21 15:57:53 +01:00
parent c0b2a9af2e
commit 21492914a2
1 changed files with 5 additions and 1 deletions

View File

@ -106,7 +106,11 @@ std::string getFileinfo(dict<RTLIL::IdString, RTLIL::Const> attributes)
fileinfo << "]"; fileinfo << "]";
} }
} }
return fileinfo.str();
std::string fileinfo_str = fileinfo.str();
fileinfo_str.erase(std::remove(fileinfo_str.begin(), fileinfo_str.end(), '\"'), fileinfo_str.end());
return fileinfo_str;
} }
// Get a port direction with respect to a specific module. // Get a port direction with respect to a specific module.