Modified the JSON generation script to backslash-escape backslashes

in verilog net names, which are apparently legal in verilog but not
in python strings (if not escaped).  This is somewhat critical for
running the LVS GUI as yosys can generate backslashes in generated
net names in the synthesized netlist.
This commit is contained in:
Tim Edwards 2018-10-31 14:03:15 -04:00
parent 5e5720e7be
commit 397444acd3
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ proc netgen::convert_to_json {filename lvs_final} {
foreach net $cktval {
incr nidx
puts $fjson " \["
set netname [lindex $net 0]
set netname [string map {"\\" ""} [lindex $net 0]]
puts $fjson " \"$netname\","
puts $fjson " \["
set netconn [lindex $net 1]
@ -169,7 +169,7 @@ proc netgen::convert_to_json {filename lvs_final} {
foreach net $cktval {
incr nidx
puts $fjson " \["
set netname [lindex $net 0]
set netname [string map {"\\" ""} [lindex $net 0]]
puts $fjson " \"$netname\","
puts $fjson " \["
set netconn [lindex $net 1]