diff --git a/src/db/db/dbNetlistSpiceReader.cc b/src/db/db/dbNetlistSpiceReader.cc index 199d640c1..7f7c4235c 100644 --- a/src/db/db/dbNetlistSpiceReader.cc +++ b/src/db/db/dbNetlistSpiceReader.cc @@ -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) diff --git a/src/db/unit_tests/dbNetlistReaderTests.cc b/src/db/unit_tests/dbNetlistReaderTests.cc index 9a1da190e..8683d27d6 100644 --- a/src/db/unit_tests/dbNetlistReaderTests.cc +++ b/src/db/unit_tests/dbNetlistReaderTests.cc @@ -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" diff --git a/testdata/algo/nreader5.cir b/testdata/algo/nreader5.cir index 3d020b0bd..512b9a0a1 100644 --- a/testdata/algo/nreader5.cir +++ b/testdata/algo/nreader5.cir @@ -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