Fixed unit tests, support floating pins for netlist compare

This commit is contained in:
Matthias Koefferlein 2019-05-20 23:48:07 +02:00
parent 625b173379
commit 252622e3f8
8 changed files with 2108 additions and 75 deletions

View File

@ -1801,14 +1801,10 @@ std::vector<size_t> collect_pins_with_empty_nets (const db::Circuit *c, CircuitP
{
std::vector<size_t> pins;
for (db::Circuit::const_net_iterator n = c->begin_nets (); n != c->end_nets (); ++n) {
const db::Net *net = n.operator-> ();
if (net->pin_count () > 0 && net->terminal_count () == 0 && net->subcircuit_pin_count () == 0) {
for (db::Net::const_pin_iterator p = net->begin_pins (); p != net->end_pins (); ++p) {
if (! circuit_pin_mapper->is_mapped (c, p->pin_id ())) {
pins.push_back (p->pin_id ());
}
}
for (db::Circuit::const_pin_iterator p = c->begin_pins (); p != c->end_pins (); ++p) {
const db::Net *net = c->net_for_pin (p->id ());
if ((! net || net->is_floating ()) && ! circuit_pin_mapper->is_mapped (c, p->id ())) {
pins.push_back (p->id ());
}
}
@ -2033,14 +2029,19 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
if (c1->pin_count () > 0 && c2->pin_count () > 0) {
std::vector<const db::Pin *> floating_pins;
std::multimap<size_t, const db::Pin *> net2pin;
for (db::Circuit::const_pin_iterator p = c2->begin_pins (); p != c2->end_pins (); ++p) {
const db::Net *net = c2->net_for_pin (p->id ());
if (net) {
net2pin.insert (std::make_pair (g2.node_index_for_net (net), p.operator-> ()));
} else {
floating_pins.push_back (p.operator-> ());
}
}
std::vector<const db::Pin *>::iterator next_float = floating_pins.begin ();
CircuitMapper &c12_pin_mapping = c12_circuit_and_pin_mapping [c1];
c12_pin_mapping.set_other (c2);
@ -2052,18 +2053,47 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
const db::Net *net = c1->net_for_pin (p->id ());
if (! net) {
if (next_float != floating_pins.end ()) {
// assign a floating pin
if (mp_logger) {
mp_logger->match_pins (p.operator-> (), *next_float);
}
c12_pin_mapping.map_pin (p->id (), (*next_float)->id ());
c22_pin_mapping.map_pin ((*next_float)->id (), p->id ());
++next_float;
} else {
// otherwise this is an error
if (mp_logger) {
mp_logger->pin_mismatch (p.operator-> (), 0);
}
pin_mismatch = true;
good = false;
}
continue;
}
const db::NetGraphNode &n = *(g1.begin () + g1.node_index_for_net (net));
if (! n.has_other ()) {
if (mp_logger) {
mp_logger->pin_mismatch (p.operator-> (), 0);
}
pin_mismatch = true;
good = false;
continue;
}
std::multimap<size_t, const db::Pin *>::iterator np = net2pin.find (n.other_net_index ());
@ -2104,6 +2134,15 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
good = false;
}
while (next_float != floating_pins.end ()) {
if (mp_logger) {
mp_logger->pin_mismatch (0, *next_float);
}
pin_mismatch = true;
good = false;
++next_float;
}
} else {
// skip pin mapping in case one circuit does not feature pins

View File

@ -489,8 +489,8 @@ TEST(1_SimpleInverter)
" terminal $1[S]:$2[S]\n"
" net VSS:VSS [Match]\n"
" terminal $2[S]:$1[D]\n"
" device $1:$2 [Match]\n"
" device $2:$1 [Match]\n"
" device $1:$2 [Match]\n"
);
EXPECT_EQ (good, true);
}
@ -614,9 +614,9 @@ TEST(1_SimpleInverterSkippedDevices)
" net VSS:VSS [Match]\n"
" terminal $3[S]:$1[D]\n"
" device (null):$3 [Mismatch]\n"
" device $1:$4 [Match]\n"
" device $2:$2 [MatchWithWarning]\n"
" device $3:$1 [Match]\n"
" device $2:$2 [MatchWithWarning]\n"
" device $1:$4 [Match]\n"
);
EXPECT_EQ (good, false);
@ -671,8 +671,8 @@ TEST(1_SimpleInverterSkippedDevices)
" terminal $1[S]:$4[S]\n"
" net VSS:VSS [Match]\n"
" terminal $3[S]:$1[D]\n"
" device $1:$4 [Match]\n"
" device $3:$1 [Match]\n"
" device $1:$4 [Match]\n"
);
EXPECT_EQ (good, true);
}
@ -1687,8 +1687,8 @@ TEST(11_MismatchingSubcircuits)
" net VSS:VSS [Match]\n"
" subcircuit_pin $1[$3]:$2[$2]\n"
" subcircuit_pin $2[$3]:$1[$2]\n"
" subcircuit $1:$2 [Match]\n"
" subcircuit $2:$1 [Match]\n"
" subcircuit $1:$2 [Match]\n"
);
EXPECT_EQ (good, false);
}

View File

@ -157,7 +157,7 @@ TEST (1)
EXPECT_EQ (model->hasChildren (ringoFbIndex), true);
EXPECT_EQ (model->rowCount (ringoFbIndex), 2);
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbIndex), Qt::UserRole).toString ()), "$1|INV2|$1");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbIndex), Qt::UserRole).toString ()), "INV2|$1");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbIndex), Qt::DisplayRole).toString ()), "<a href='int:pin?id=2'>$1</a> - <a href='int:circuit?id=0'>INV2</a>");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 1, ringoFbIndex), Qt::DisplayRole).toString ()), "<a href='int:subcircuit?id=7'>$1</a>");
EXPECT_EQ (tl::to_string (model->data (model->index (1, 0, ringoFbIndex), Qt::DisplayRole).toString ()), "<a href='int:pin?id=50'>IN</a> - <a href='int:circuit?id=0'>INV2</a>");
@ -168,7 +168,7 @@ TEST (1)
EXPECT_EQ (model->hasChildren (ringoFbSubcircuit2Index), true);
EXPECT_EQ (model->rowCount (ringoFbSubcircuit2Index), 5);
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbSubcircuit2Index), Qt::UserRole).toString ()), "$1|$2");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbSubcircuit2Index), Qt::UserRole).toString ()), "$2");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 0, ringoFbSubcircuit2Index), Qt::DisplayRole).toString ()), "<a href='int:pin?id=2'>$1</a>");
EXPECT_EQ (tl::to_string (model->data (model->index (0, 1, ringoFbSubcircuit2Index), Qt::DisplayRole).toString ()), "");
EXPECT_EQ (tl::to_string (model->data (model->index (1, 0, ringoFbSubcircuit2Index), Qt::DisplayRole).toString ()), "<a href='int:pin?id=18'>$3</a>");

View File

@ -971,7 +971,7 @@ Extractor &
Extractor::read (int &value)
{
if (! try_read (value)) {
error (tl::to_string (tr ("Expected a integer value")));
error (tl::to_string (tr ("Expected an integer value")));
}
return *this;
}

991
testdata/algo/lvs_test1b_au.lvsdb vendored Normal file
View File

@ -0,0 +1,991 @@
#%lvsdb-klayout
# Layout
layout(
top(RINGO)
unit(0.001)
# Layer section
# This section lists the mask layers (drawing or derived) and their connections.
# Mask layers
layer(bulk '1/0')
layer(nwell '1/0')
layer(poly '3/0')
layer(poly_lbl '3/1')
layer(diff_cont '4/0')
layer(poly_cont '5/0')
layer(metal1 '6/0')
layer(metal1_lbl '6/1')
layer(via1 '7/0')
layer(metal2 '8/0')
layer(metal2_lbl '8/1')
layer(ntie)
layer(psd)
layer(ptie)
layer(nsd)
# Mask layer connectivity
connect(nwell nwell ntie)
connect(poly poly poly_lbl poly_cont)
connect(poly_lbl poly)
connect(diff_cont diff_cont metal1 ntie psd ptie nsd)
connect(poly_cont poly poly_cont metal1)
connect(metal1 diff_cont poly_cont metal1 metal1_lbl via1)
connect(metal1_lbl metal1)
connect(via1 metal1 via1 metal2)
connect(metal2 via1 metal2 metal2_lbl)
connect(metal2_lbl metal2)
connect(ntie nwell diff_cont ntie)
connect(psd diff_cont psd)
connect(ptie diff_cont ptie)
connect(nsd diff_cont nsd)
# Global nets and connectivity
global(bulk BULK)
global(ptie BULK)
# Device class section
class(PMOS MOS4)
class(NMOS MOS4)
# Device abstracts section
# Device abstracts list the pin shapes of the devices.
device(D$PMOS PMOS
terminal(S
rect(psd (-650 -875) (525 1750))
)
terminal(G
rect(poly (-125 -875) (250 1750))
)
terminal(D
rect(psd (125 -875) (550 1750))
)
terminal(B
rect(nwell (-125 -875) (250 1750))
)
)
device(D$PMOS$1 PMOS
terminal(S
rect(psd (-675 -875) (550 1750))
)
terminal(G
rect(poly (-125 -875) (250 1750))
)
terminal(D
rect(psd (125 -875) (525 1750))
)
terminal(B
rect(nwell (-125 -875) (250 1750))
)
)
device(D$NMOS NMOS
terminal(S
rect(nsd (-650 -875) (525 1750))
)
terminal(G
rect(poly (-125 -875) (250 1750))
)
terminal(D
rect(nsd (125 -875) (550 1750))
)
terminal(B
rect(bulk (-125 -875) (250 1750))
)
)
device(D$NMOS$1 NMOS
terminal(S
rect(nsd (-675 -875) (550 1750))
)
terminal(G
rect(poly (-125 -875) (250 1750))
)
terminal(D
rect(nsd (125 -875) (525 1750))
)
terminal(B
rect(bulk (-125 -875) (250 1750))
)
)
# Circuit section
# Circuits are the hierarchical building blocks of the netlist.
circuit(INV2
# Nets with their geometries
net(1
rect(nwell (-1400 1800) (2800 3580))
rect(diff_cont (-1510 -650) (220 220))
rect(ntie (-510 -450) (800 680))
)
net(2 name(IN)
rect(poly (-525 -250) (250 2500))
rect(poly (-1425 -630) (2100 360))
rect(poly (-125 -2230) (250 2500))
rect(poly (-1050 -3850) (250 2400))
rect(poly (550 1200) (250 2400))
rect(poly (-250 -6000) (250 2400))
rect(poly (-1050 1200) (250 2400))
rect(poly_lbl (-526 -2601) (2 2))
rect(poly_cont (-831 -111) (220 220))
)
net(3 name(OUT)
rect(diff_cont (-910 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(metal1 (1310 -3710) (360 2220))
rect(metal1 (-1900 -800) (2220 360))
rect(metal1 (-2280 -2400) (360 2840))
rect(metal1 (-360 -3600) (360 1560))
rect(metal1 (1240 2040) (360 1560))
rect(metal1 (-360 -5160) (360 1560))
rect(metal1 (-1960 2040) (360 1560))
rect(metal1_lbl (1419 -2181) (2 2))
rect(psd (-276 524) (525 1750))
rect(psd (-2100 -1750) (525 1750))
rect(nsd (1050 -5350) (525 1750))
rect(nsd (-2100 -1750) (525 1750))
)
net(4 name(VSS)
rect(diff_cont (-110 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(metal1 (-290 -290) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(via1 (-305 -705) (250 250))
rect(via1 (-250 150) (250 250))
rect(via1 (-250 -1450) (250 250))
rect(via1 (-250 150) (250 250))
rect(metal2 (-1525 -775) (2800 1700))
rect(metal2_lbl (-161 -541) (2 2))
rect(nsd (-1516 -1186) (550 1750))
)
net(5 name(VDD)
rect(diff_cont (-110 2490) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(metal1 (-290 -1490) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(via1 (-305 -1505) (250 250))
rect(via1 (-250 150) (250 250))
rect(via1 (-250 150) (250 250))
rect(via1 (-250 150) (250 250))
rect(metal2 (-1525 -1575) (2800 1700))
rect(metal2_lbl (-151 -1251) (2 2))
rect(psd (-1526 -476) (550 1750))
)
net(6 name(BULK)
rect(diff_cont (-110 -2160) (220 220))
rect(ptie (-510 -450) (800 680))
)
# Outgoing pins and their connections to nets
pin(1)
pin(2 name(IN))
pin(3 name(OUT))
pin(4 name(VSS))
pin(5 name(VDD))
pin(6 name(BULK))
# Devices and their connections
device(1 D$PMOS
device(D$PMOS$1 800 0)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 3200)
param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
param(PS 6.85)
param(PD 6.85)
terminal(S 3)
terminal(G 2)
terminal(D 5)
terminal(B 1)
)
device(2 D$NMOS
device(D$NMOS$1 800 0)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 -400)
param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
param(PS 6.85)
param(PD 6.85)
terminal(S 3)
terminal(G 2)
terminal(D 4)
terminal(B 6)
)
)
circuit(INV2PAIR
# Nets with their geometries
net(1 name(BULK))
net(2
rect(diff_cont (4230 3290) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(metal1 (2350 -1490) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
)
net(3
rect(diff_cont (4230 890) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(metal1 (2350 -290) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
)
net(4
rect(diff_cont (790 890) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
net(5)
net(6
rect(diff_cont (3430 890) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
net(7)
# Outgoing pins and their connections to nets
pin(1 name(BULK))
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
pin(7)
# Subcircuits and their connections
circuit(1 INV2 location(1700 800)
pin(0 7)
pin(1 5)
pin(2 4)
pin(3 3)
pin(4 2)
pin(5 1)
)
circuit(2 INV2 location(4340 800)
pin(0 7)
pin(1 4)
pin(2 6)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
circuit(RINGO
# Nets with their geometries
net(1 name(FB)
rect(diff_cont (20210 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(metal1 (-22130 -2290) (360 360))
rect(via1 (-305 -305) (250 250))
rect(via1 (23190 -250) (250 250))
rect(metal2 (-23765 -325) (23840 400))
rect(metal2_lbl (-22121 -201) (2 2))
)
net(2 name(OSC)
rect(diff_cont (22850 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(via1 (1365 -2235) (250 250))
rect(metal2 (-325 -325) (400 400))
rect(metal2_lbl (-201 -201) (2 2))
)
net(3 name(VDD)
rect(diff_cont (7810 2490) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (12980 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (7700 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (7700 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-2860 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -1420) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(metal1 (-21410 -10) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (-16200 -2600) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (12840 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (7560 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (7560 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal2_lbl (-21301 -1181) (2 2))
)
net(4 name('BULK,VSS')
rect(diff_cont (7810 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (12980 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (7700 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (7700 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-2860 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 980) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(metal1 (-21410 -1330) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (2280 -1120) (360 1120))
rect(metal1 (-16200 -80) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (12840 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (7560 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (7560 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal1 (-3000 -1560) (360 1560))
rect(metal1 (-360 -1560) (360 1560))
rect(metal2_lbl (-21301 -381) (2 2))
)
net(5
rect(diff_cont (1730 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
net(6
rect(diff_cont (17570 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
net(7
rect(diff_cont (12290 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
net(8
rect(diff_cont (7010 90) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (1380 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 -3820) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-220 -620) (220 220))
rect(diff_cont (-1820 3380) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
rect(diff_cont (-220 180) (220 220))
)
# Outgoing pins and their connections to nets
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VDD))
pin(4 name('BULK,VSS'))
# Subcircuits and their connections
circuit(1 INV2PAIR location(19420 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 6)
pin(5 2)
pin(6 3)
)
circuit(2 INV2PAIR location(-1700 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 1)
pin(5 5)
pin(6 3)
)
circuit(3 INV2PAIR location(3580 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 5)
pin(5 8)
pin(6 3)
)
circuit(4 INV2PAIR location(8860 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 7)
pin(6 3)
)
circuit(5 INV2PAIR location(14140 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 6)
pin(6 3)
)
)
)
# Reference netlist
reference(
# Device class section
class(PMOS MOS4)
class(NMOS MOS4)
# Circuit section
# Circuits are the hierarchical building blocks of the netlist.
circuit(INV2
# Nets
net(1 name('1'))
net(2 name('2'))
net(3 name('3'))
net(4 name('4'))
net(5 name('5'))
net(6 name('6'))
# Outgoing pins and their connections to nets
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
# Devices and their connections
device(1 PMOS
name($1) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
param(PS 6.85)
param(PD 6.85)
terminal(S 3)
terminal(G 2)
terminal(D 5)
terminal(B 1)
)
device(2 NMOS
name($3) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
param(PS 6.85)
param(PD 6.85)
terminal(S 3)
terminal(G 2)
terminal(D 4)
terminal(B 6)
)
)
circuit(INV2PAIR
# Nets
net(1 name('1'))
net(2 name('2'))
net(3 name('3'))
net(4 name('4'))
net(5 name('5'))
net(6 name('6'))
net(7 name('7'))
# Outgoing pins and their connections to nets
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
pin(7)
# Subcircuits and their connections
circuit(1 INV2 name($1)
pin(0 7)
pin(1 5)
pin(2 4)
pin(3 3)
pin(4 2)
pin(5 1)
)
circuit(2 INV2 name($2)
pin(0 7)
pin(1 4)
pin(2 6)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
circuit(RINGO
# Nets
net(1 name('1'))
net(2 name('2'))
net(3 name('3'))
net(4 name('4'))
net(5 name('6'))
net(6 name('5'))
net(7 name('8'))
net(8 name('7'))
# Outgoing pins and their connections to nets
pin(1)
pin(2)
pin(3)
pin(4)
# Subcircuits and their connections
circuit(1 INV2PAIR name($1)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 5)
pin(5 2)
pin(6 3)
)
circuit(2 INV2PAIR name($2)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 1)
pin(5 6)
pin(6 3)
)
circuit(3 INV2PAIR name($3)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 6)
pin(5 7)
pin(6 3)
)
circuit(4 INV2PAIR name($4)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 8)
pin(6 3)
)
circuit(5 INV2PAIR name($5)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 5)
pin(6 3)
)
)
)
# Cross reference
xref(
circuit(INV2 INV2 match
xref(
net(1 1 match)
net(6 6 match)
net(2 2 match)
net(3 3 match)
net(5 5 match)
net(4 4 match)
pin(0 0 match)
pin(5 5 match)
pin(1 1 match)
pin(2 2 match)
pin(4 4 match)
pin(3 3 match)
device(1 1 match)
device(2 2 match)
)
)
circuit(INV2PAIR INV2PAIR match
xref(
net(2 2 match)
net(3 3 match)
net(4 4 match)
net(5 5 match)
net(6 6 match)
net(7 7 match)
net(1 1 match)
pin(1 1 match)
pin(2 2 match)
pin(3 3 match)
pin(4 4 match)
pin(5 5 match)
pin(6 6 match)
pin(0 0 match)
circuit(1 1 match)
circuit(2 2 match)
)
)
circuit(RINGO RINGO match
xref(
net(5 6 match)
net(6 5 match)
net(7 8 match)
net(8 7 match)
net(4 4 match)
net(1 1 match)
net(2 2 match)
net(3 3 match)
pin(3 3 match)
pin(0 0 match)
pin(1 1 match)
pin(2 2 match)
circuit(1 1 match)
circuit(2 2 match)
circuit(3 3 match)
circuit(4 4 match)
circuit(5 5 match)
)
)
)

View File

@ -982,6 +982,7 @@ xref(
net(6 5 match)
net(7 6 mismatch)
net(1 1 mismatch)
pin(() 4 mismatch)
pin(3 () mismatch)
pin(1 1 match)
pin(2 2 match)

1002
testdata/algo/lvs_test2b_au.lvsdb vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -129,12 +129,12 @@ X(INV2
R($8 -1400 2350 1400 3250)
R($1 -275 2325 275 3275)
)
P(IN 1)
P($1 2)
P(OUT 3)
P($3 4)
P($4 5)
D($1 D$PMOS
P(1 I(IN))
P(2)
P(3 I(OUT))
P(4)
P(5)
D(1 D$PMOS
Y(-400 2800)
E(L 0.25)
E(W 0.95)
@ -146,7 +146,7 @@ X(INV2
T(G 1)
T(D 5)
)
D($2 D$PMOS$1
D(2 D$PMOS$1
Y(400 2800)
E(L 0.25)
E(W 0.95)
@ -158,7 +158,7 @@ X(INV2
T(G 2)
T(D 3)
)
D($3 D$NMOS
D(3 D$NMOS
Y(-400 0)
E(L 0.25)
E(W 0.95)
@ -170,7 +170,7 @@ X(INV2
T(G 1)
T(D 4)
)
D($4 D$NMOS$1
D(4 D$NMOS$1
Y(400 0)
E(L 0.25)
E(W 0.95)
@ -375,64 +375,64 @@ X(RINGO
R($4 3330 90 3550 310)
R($4 3330 -310 3550 -90)
)
X($1 INV2 Y(23760 0)
P(IN 5)
P($1 1)
P($3 2)
P($4 3)
X(1 INV2 Y(23760 0)
P(0 5)
P(1 1)
P(3 2)
P(4 3)
)
X($2 INV2 Y(0 0)
P(IN 1)
P(OUT 4)
P($3 2)
P($4 3)
X(2 INV2 Y(0 0)
P(0 1)
P(2 4)
P(3 2)
P(4 3)
)
X($3 INV2 Y(2640 0)
P(IN 4)
P(OUT 12)
P($3 2)
P($4 3)
X(3 INV2 Y(2640 0)
P(0 4)
P(2 12)
P(3 2)
P(4 3)
)
X($4 INV2 Y(5280 0)
P(IN 12)
P(OUT 11)
P($3 2)
P($4 3)
X(4 INV2 Y(5280 0)
P(0 12)
P(2 11)
P(3 2)
P(4 3)
)
X($5 INV2 Y(7920 0)
P(IN 11)
P(OUT 10)
P($3 2)
P($4 3)
X(5 INV2 Y(7920 0)
P(0 11)
P(2 10)
P(3 2)
P(4 3)
)
X($6 INV2 Y(10560 0)
P(IN 10)
P(OUT 9)
P($3 2)
P($4 3)
X(6 INV2 Y(10560 0)
P(0 10)
P(2 9)
P(3 2)
P(4 3)
)
X($7 INV2 Y(13200 0)
P(IN 9)
P(OUT 8)
P($3 2)
P($4 3)
X(7 INV2 Y(13200 0)
P(0 9)
P(2 8)
P(3 2)
P(4 3)
)
X($8 INV2 Y(15840 0)
P(IN 8)
P(OUT 7)
P($3 2)
P($4 3)
X(8 INV2 Y(15840 0)
P(0 8)
P(2 7)
P(3 2)
P(4 3)
)
X($9 INV2 Y(18480 0)
P(IN 7)
P(OUT 6)
P($3 2)
P($4 3)
X(9 INV2 Y(18480 0)
P(0 7)
P(2 6)
P(3 2)
P(4 3)
)
X($10 INV2 Y(21120 0)
P(IN 6)
P(OUT 5)
P($3 2)
P($4 3)
X(10 INV2 Y(21120 0)
P(0 6)
P(2 5)
P(3 2)
P(4 3)
)
)