mirror of https://github.com/KLayout/klayout.git
Added < and > to allowed chars for net names in Spice reader
This commit is contained in:
parent
a9e1af0a1b
commit
1251fb2cd6
|
|
@ -173,7 +173,7 @@ bool NetlistSpiceReaderDelegate::element (db::Circuit *circuit, const std::strin
|
|||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
static const char *allowed_name_chars = "_.:,!+$/&\\#[]|";
|
||||
static const char *allowed_name_chars = "_.:,!+$/&\\#[]|<>";
|
||||
|
||||
NetlistSpiceReader::NetlistSpiceReader (NetlistSpiceReaderDelegate *delegate)
|
||||
: mp_netlist (0), mp_stream (0), mp_delegate (delegate)
|
||||
|
|
|
|||
|
|
@ -164,12 +164,12 @@ TEST(5_CircuitParameters)
|
|||
reader.read (is, nl);
|
||||
|
||||
EXPECT_EQ (nl.to_string (),
|
||||
"circuit SUBCKT ($1=$1,A=A,'V42(%)'='V42(%)',Z=Z,GND=GND,GND$1=GND$1);\n"
|
||||
"circuit SUBCKT ($1=$1,'A[5]<1>'='A[5]<1>','V42(%)'='V42(%)',Z=Z,GND=GND,GND$1=GND$1);\n"
|
||||
" subcircuit HVPMOS D_$1 ($1='V42(%)',$2=$3,$3=Z,$4=$1);\n"
|
||||
" subcircuit HVPMOS D_$2 ($1='V42(%)',$2=A,$3=$3,$4=$1);\n"
|
||||
" subcircuit HVPMOS D_$2 ($1='V42(%)',$2='A[5]<1>',$3=$3,$4=$1);\n"
|
||||
" subcircuit HVNMOS D_$3 ($1=GND,$2=$3,$3=GND,$4=GND$1);\n"
|
||||
" subcircuit HVNMOS D_$4 ($1=GND,$2=$3,$3=Z,$4=GND$1);\n"
|
||||
" subcircuit HVNMOS D_$5 ($1=GND,$2=A,$3=$3,$4=GND$1);\n"
|
||||
" subcircuit HVNMOS D_$5 ($1=GND,$2='A[5]<1>',$3=$3,$4=GND$1);\n"
|
||||
"end;\n"
|
||||
"circuit HVPMOS ($1=(null),$2=(null),$3=(null),$4=(null));\n"
|
||||
"end;\n"
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@
|
|||
* pin Z
|
||||
* pin gnd
|
||||
* pin gnd
|
||||
.SUBCKT SUBCKT \$1 A V42\x28\x25\x29 Z gnd gnd$1
|
||||
.SUBCKT SUBCKT \$1 A[5]<1> V42\x28\x25\x29 Z gnd gnd$1
|
||||
* device instance $1 r0 *1 0,0 HVPMOS
|
||||
XD_$1 V42\x28\x25\x29 \$3 Z \$1 HVPMOS PARAMS: L=0.2 W=1 AS=0.18 AD=0.18
|
||||
+ PS=2.16 PD=2.16
|
||||
* device instance $2 r0 *1 0,0 HVPMOS
|
||||
XD_$2 V42\x28\x25\x29 A \$3 \$1 HVPMOS PARAMS: L=0.2 W=1 AS=0.18 AD=0.18
|
||||
XD_$2 V42\x28\x25\x29 A[5]<1> \$3 \$1 HVPMOS PARAMS: L=0.2 W=1 AS=0.18 AD=0.18
|
||||
+ PS=2.16 PD=2.16
|
||||
* device instance $3 r0 *1 0,0 HVNMOS
|
||||
XD_$3 gnd \$3 gnd gnd$1 HVNMOS PARAMS: L=1.13 W=2.12 PS=6 PD=6 AS=0 AD=0
|
||||
* device instance $4 r0 *1 0,0 HVNMOS
|
||||
XD_$4 gnd \$3 Z gnd$1 HVNMOS PARAMS: L=0.4 W=0.4 PS=1.16 PD=1.16 AS=0.19 AD=0.19
|
||||
* device instance $5 r0 *1 0,0 HVNMOS
|
||||
XD_$5 gnd A \$3 gnd$1 HVNMOS PARAMS: L=0.4 W=0.4 PS=1.76 PD=1.76 AS=0.19 AD=0.19
|
||||
XD_$5 gnd A[5]<1> \$3 gnd$1 HVNMOS PARAMS: L=0.4 W=0.4 PS=1.76 PD=1.76 AS=0.19 AD=0.19
|
||||
.ENDS SUBCKT
|
||||
|
|
|
|||
Loading…
Reference in New Issue