projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0b2a9a
)
Strip quotes around fileinfo strings
author
Sahand Kashani
<sahand.kashani@gmail.com>
Sat, 21 Mar 2020 14:57:53 +0000
(15:57 +0100)
committer
Sahand Kashani
<sahand.kashani@gmail.com>
Sat, 21 Mar 2020 14:57:53 +0000
(15:57 +0100)
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.
backends/firrtl/firrtl.cc
patch
|
blob
|
history
diff --git
a/backends/firrtl/firrtl.cc
b/backends/firrtl/firrtl.cc
index 7d2da7b00f0ee8f8856da8c80be585a0838cca01..a6cb9cfbee17241dddaf3a7e0acb30345639f07c 100644
(file)
--- a/
backends/firrtl/firrtl.cc
+++ b/
backends/firrtl/firrtl.cc
@@
-106,7
+106,11
@@
std::string getFileinfo(dict<RTLIL::IdString, RTLIL::Const> attributes)
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.