mirror of https://github.com/KLayout/klayout.git
Trying a solution for issue #1719, part 2
The solution is to drop clusters that have no area and not connections downward. This implies, we cannot connect from upward to such clusters - i.e. we cannot force a pin inside a subcircuit with a plain text. We need some polygon at least. This is not a problem as texts were not enough so far anyway.
This commit is contained in:
parent
48b32733c2
commit
0c52934100
|
|
@ -2903,11 +2903,32 @@ hier_clusters<T>::build_hier_connections (cell_clusters_box_converter<T> &cbc, c
|
|||
}
|
||||
|
||||
bs2.process (*rec, 1 /*touching*/, local_cluster_box_convert<T> (), cibc);
|
||||
|
||||
}
|
||||
|
||||
// join local clusters which got connected by child clusters
|
||||
rec->finish_cluster_to_instance_interactions ();
|
||||
|
||||
{
|
||||
// remove empty or point-like clusters which do not make a downward connection - i.e. from stray texts.
|
||||
// This implies, we cannot connect from upward down to such nets too. In other words: to force a pin,
|
||||
// inside a cell we need more than a text.
|
||||
// (issue #1719, part 2)
|
||||
std::vector<typename local_cluster<T>::id_type> to_delete;
|
||||
for (typename connected_clusters<T>::const_iterator c = local.begin (); c != local.end (); ++c) {
|
||||
box_type bbox = c->bbox ();
|
||||
if ((bbox.empty () || (bbox.width () == 0 && bbox.height () == 0)) && local.connections_for_cluster (c->id ()).empty ()) {
|
||||
to_delete.push_back (c->id ());
|
||||
}
|
||||
}
|
||||
for (auto i = to_delete.begin (); i != to_delete.end (); ++i) {
|
||||
local.remove_cluster (*i);
|
||||
}
|
||||
if (tl::verbosity () >= m_base_verbosity + 20) {
|
||||
tl::info << "Removed " << to_delete.size () << " clusters because they are point-like or empty and do not have connections downward (stray texts)";
|
||||
}
|
||||
}
|
||||
|
||||
if (tl::verbosity () >= m_base_verbosity + 20) {
|
||||
tl::info << "Cluster build cache statistics (instance to shape cache): size=" << rec->cluster_cache_size () << ", hits=" << rec->cluster_cache_hits () << ", misses=" << rec->cluster_cache_misses ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,3 +338,15 @@ TEST(55_SoftConnectionSecondLevel)
|
|||
{
|
||||
run_test (_this, "soft_connect6", "soft_connect6.gds", true, false /*no LVS*/);
|
||||
}
|
||||
|
||||
// Issue #1719, part 2
|
||||
TEST(60_StrayTextsDoNotMakeNets)
|
||||
{
|
||||
run_test (_this, "stray_texts1", "stray_texts.gds", true, false /*no LVS*/);
|
||||
}
|
||||
|
||||
// Issue #1719, part 2
|
||||
TEST(61_StrayTextsDoNotMakeNets)
|
||||
{
|
||||
run_test (_this, "stray_texts2", "stray_texts.gds", true, false /*no LVS*/);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,12 @@
|
|||
* Extracted by KLayout
|
||||
|
||||
.SUBCKT TOP
|
||||
X$1 \$2 \$5 \$4 E \$1 MIDDLE
|
||||
.ENDS TOP
|
||||
|
||||
.SUBCKT MIDDLE B \$I4 \$I3 \$I2 \$I1
|
||||
X$1 \$I1 B \$I3 \$I4 \$I2 F CHILD
|
||||
.ENDS MIDDLE
|
||||
|
||||
.SUBCKT CHILD A B C D \$8 \$9
|
||||
.ENDS CHILD
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
#%l2n-klayout
|
||||
W(TOP)
|
||||
U(0.001)
|
||||
L(l1 '1/0')
|
||||
L(l2 '1/0')
|
||||
L(l3 '2/0')
|
||||
C(l1 l2 l3)
|
||||
C(l2 l1 l2 l3)
|
||||
C(l3 l1 l2 l3)
|
||||
X(CHILD
|
||||
R((-1230 410) (4330 220))
|
||||
N(1 I(A)
|
||||
J(l1 A (-560 550))
|
||||
R(l2 (-80 -80) (170 160))
|
||||
)
|
||||
N(2 I(B)
|
||||
J(l1 B (660 510))
|
||||
J(l1 B (560 10))
|
||||
R(l2 (-650 -90) (160 150))
|
||||
R(l2 (410 -140) (140 160))
|
||||
)
|
||||
N(3 I(C)
|
||||
J(l1 C (-1160 530))
|
||||
R(l2 (-70 -90) (160 170))
|
||||
)
|
||||
N(4 I(D)
|
||||
J(l1 D (1820 510))
|
||||
R(l2 (-70 -90) (160 160))
|
||||
)
|
||||
N(5
|
||||
R(l2 (2370 410) (170 200))
|
||||
)
|
||||
N(6
|
||||
R(l2 (2910 430) (190 200))
|
||||
)
|
||||
P(1 I(A))
|
||||
P(2 I(B))
|
||||
P(3 I(C))
|
||||
P(4 I(D))
|
||||
P(5)
|
||||
P(6)
|
||||
)
|
||||
X(MIDDLE
|
||||
R((-1230 410) (4330 220))
|
||||
N(1 I(B)
|
||||
J(l1 B (640 520))
|
||||
J(l1 B (550 0))
|
||||
)
|
||||
N(2 I(F)
|
||||
J(l1 F (3000 510))
|
||||
)
|
||||
N(3)
|
||||
N(4)
|
||||
N(5)
|
||||
N(6)
|
||||
P(1 I(B))
|
||||
P(3)
|
||||
P(4)
|
||||
P(5)
|
||||
P(6)
|
||||
X(1 CHILD Y(0 0)
|
||||
P(0 6)
|
||||
P(1 1)
|
||||
P(2 4)
|
||||
P(3 3)
|
||||
P(4 5)
|
||||
P(5 2)
|
||||
)
|
||||
)
|
||||
X(TOP
|
||||
R((-1280 -190) (4350 840))
|
||||
N(1
|
||||
R(l3 (-680 -160) (170 760))
|
||||
R(l3 (-170 -790) (860 270))
|
||||
R(l3 (-200 -270) (220 780))
|
||||
)
|
||||
N(2
|
||||
R(l3 (530 -180) (220 790))
|
||||
R(l3 (-220 -790) (790 180))
|
||||
R(l3 (-260 -180) (260 810))
|
||||
)
|
||||
N(3 I(E)
|
||||
J(l1 E (2400 460))
|
||||
)
|
||||
N(4
|
||||
R(l3 (-1280 -150) (210 750))
|
||||
)
|
||||
N(5
|
||||
R(l3 (1660 -190) (240 840))
|
||||
)
|
||||
X(1 MIDDLE Y(-30 -40)
|
||||
P(0 2)
|
||||
P(1 5)
|
||||
P(2 4)
|
||||
P(3 3)
|
||||
P(4 1)
|
||||
)
|
||||
)
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
$lvs_test_source && source($lvs_test_source)
|
||||
|
||||
if $lvs_test_target_l2n
|
||||
report_netlist($lvs_test_target_l2n)
|
||||
else
|
||||
report_netlist
|
||||
end
|
||||
|
||||
writer = write_spice(true, false)
|
||||
$lvs_test_target_cir && target_netlist($lvs_test_target_cir, writer, "Extracted by KLayout")
|
||||
|
||||
deep
|
||||
|
||||
# separate labels and polygons
|
||||
|
||||
l1l = labels(1, 0)
|
||||
l1 = polygons(1, 0)
|
||||
l2 = input(2, 0)
|
||||
|
||||
connect(l1l, l1)
|
||||
connect(l1l, l2)
|
||||
connect(l1, l2)
|
||||
|
||||
connect_implicit("*", "*")
|
||||
|
||||
netlist
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
* Extracted by KLayout
|
||||
|
||||
.SUBCKT TOP
|
||||
X$1 \$2 \$5 \$4 E \$1 MIDDLE
|
||||
.ENDS TOP
|
||||
|
||||
.SUBCKT MIDDLE B \$I4 \$I3 \$I2 \$I1
|
||||
X$1 \$I1 B \$I3 \$I4 \$I2 F CHILD
|
||||
.ENDS MIDDLE
|
||||
|
||||
.SUBCKT CHILD A B C D \$6 \$7
|
||||
.ENDS CHILD
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
#%l2n-klayout
|
||||
W(TOP)
|
||||
U(0.001)
|
||||
L(l1 '1/0')
|
||||
L(l2 '2/0')
|
||||
C(l1 l1 l2)
|
||||
C(l2 l1 l2)
|
||||
X(CHILD
|
||||
R((-1230 410) (4330 220))
|
||||
N(1 I(A)
|
||||
R(l1 (-640 470) (170 160))
|
||||
R(l1 (-90 -80) (0 0))
|
||||
)
|
||||
N(2 I(B)
|
||||
R(l1 (570 430) (160 150))
|
||||
R(l1 (-70 -70) (0 0))
|
||||
R(l1 (480 -70) (140 160))
|
||||
R(l1 (-60 -80) (0 0))
|
||||
)
|
||||
N(3 I(C)
|
||||
R(l1 (-1230 440) (160 170))
|
||||
R(l1 (-90 -80) (0 0))
|
||||
)
|
||||
N(4 I(D)
|
||||
R(l1 (1750 420) (160 160))
|
||||
R(l1 (-90 -70) (0 0))
|
||||
)
|
||||
N(5
|
||||
R(l1 (2370 410) (170 200))
|
||||
)
|
||||
N(6
|
||||
R(l1 (2910 430) (190 200))
|
||||
)
|
||||
P(1 I(A))
|
||||
P(2 I(B))
|
||||
P(3 I(C))
|
||||
P(4 I(D))
|
||||
P(5)
|
||||
P(6)
|
||||
)
|
||||
X(MIDDLE
|
||||
R((-1230 410) (4330 220))
|
||||
N(1 I(B)
|
||||
R(l1 (640 520) (0 0))
|
||||
R(l1 (550 0) (0 0))
|
||||
)
|
||||
N(2 I(F)
|
||||
R(l1 (3000 510) (0 0))
|
||||
)
|
||||
N(3)
|
||||
N(4)
|
||||
N(5)
|
||||
N(6)
|
||||
P(1 I(B))
|
||||
P(3)
|
||||
P(4)
|
||||
P(5)
|
||||
P(6)
|
||||
X(1 CHILD Y(0 0)
|
||||
P(0 6)
|
||||
P(1 1)
|
||||
P(2 4)
|
||||
P(3 3)
|
||||
P(4 5)
|
||||
P(5 2)
|
||||
)
|
||||
)
|
||||
X(TOP
|
||||
R((-1280 -190) (4350 840))
|
||||
N(1
|
||||
R(l2 (-680 -160) (170 760))
|
||||
R(l2 (-170 -790) (860 270))
|
||||
R(l2 (-200 -270) (220 780))
|
||||
)
|
||||
N(2
|
||||
R(l2 (530 -180) (220 790))
|
||||
R(l2 (-220 -790) (790 180))
|
||||
R(l2 (-260 -180) (260 810))
|
||||
)
|
||||
N(3 I(E)
|
||||
R(l1 (2400 460) (0 0))
|
||||
)
|
||||
N(4
|
||||
R(l2 (-1280 -150) (210 750))
|
||||
)
|
||||
N(5
|
||||
R(l2 (1660 -190) (240 840))
|
||||
)
|
||||
X(1 MIDDLE Y(-30 -40)
|
||||
P(0 2)
|
||||
P(1 5)
|
||||
P(2 4)
|
||||
P(3 3)
|
||||
P(4 1)
|
||||
)
|
||||
)
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
$lvs_test_source && source($lvs_test_source)
|
||||
|
||||
if $lvs_test_target_l2n
|
||||
report_netlist($lvs_test_target_l2n)
|
||||
else
|
||||
report_netlist
|
||||
end
|
||||
|
||||
writer = write_spice(true, false)
|
||||
$lvs_test_target_cir && target_netlist($lvs_test_target_cir, writer, "Extracted by KLayout")
|
||||
|
||||
deep
|
||||
|
||||
# polygons and labels on same layer
|
||||
|
||||
l1 = input(1, 0)
|
||||
l2 = input(2, 0)
|
||||
|
||||
connect(l1, l2)
|
||||
|
||||
connect_implicit("*", "*")
|
||||
|
||||
netlist
|
||||
|
||||
Loading…
Reference in New Issue