Skip to content

Commit 3438f10

Browse files
Merge pull request #124 from os-fpga/fix_special_char_sdf
double backslash fix
2 parents 00702e1 + bcbc0d2 commit 3438f10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

netlist_bitblast/src/BitBlaster.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ namespace BITBLAST {
3939
std::string BitBlaster::filterIcarusSDFUnsupportedCharacters(
4040
const std::string &st) {
4141
std::string result;
42+
char c_1 = ' ';
4243
for (uint32_t i = 0; i < st.size(); i++) {
4344
char c = st[i];
44-
if (c == '.' || c == ':' || c == '/')
45+
if (c == '\\' && c_1 == '\\') {
46+
result = result.substr(0, result.size()-1);
47+
result += "_";
48+
} else if (c == '.' || c == ':' || c == '/')
4549
result += "_";
4650
else
4751
result += c;
52+
c_1 = c;
4853
}
4954
return result;
5055
}

0 commit comments

Comments
 (0)