From 6162a9f4597925b23a74ffdc8c4ca66e374764e6 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 3 Oct 2024 20:37:43 -0400 Subject: [PATCH] Corrected the "bloat-all" function so that it behaves properly on angled edges. This is a rare case and so has never come up before, but can happen especially on transistors with gate or diffusion with 45 degree chamfers or flanges. Thanks to Mark Martin for providing the use case. --- VERSION | 2 +- cif/CIFgen.c | 21 +++++++++++++++++++-- ext2spice/ext2hier.c | 10 ++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index f36d4375..9a3e9689 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.493 +8.3.494 diff --git a/cif/CIFgen.c b/cif/CIFgen.c index 0d9e04b3..8707f2d9 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -1379,8 +1379,24 @@ cifBloatAllFunc(tile, bls) area.r_xtop *= locScale; area.r_ytop *= locScale; - DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area, - CIFPaintTable, (PaintUndoInfo *) NULL); + /* Diagonal: If expanding across the edge of a diagonal, */ + /* then just fill the whole tile. */ + + if (IsSplit(t)) + { + TileType tt; + tt = TiGetTypeExact(t); + if ((tt & TT_SIDE) && (TTMaskHasType(connect, TiGetLeftType(t)))) + DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *) NULL); + else if (!(tt & TT_SIDE) && (TTMaskHasType(connect, TiGetRightType(t)))) + DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *) NULL); + else + DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area, + CIFPaintTable, (PaintUndoInfo *) NULL); + } + else + DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area, + CIFPaintTable, (PaintUndoInfo *) NULL); /* Top */ for (tp = RT(t); RIGHT(tp) > LEFT(t); tp = BL(tp)) @@ -1401,6 +1417,7 @@ cifBloatAllFunc(tile, bls) for (tp = TR(t); TOP(tp) > BOTTOM(t); tp = LB(tp)) if (TTMaskHasType(connect, TiGetLeftType(tp))) PUSHTILE(tp, BloatStack); + } /* Clear the tiles that were processed */ diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index 725374b1..9c4a1c64 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -1874,11 +1874,13 @@ esMakePorts(hc, cdata) { nn->efnn_node->efnode_flags |= EF_PORT; nn->efnn_port = -1; // Will be sorted later - } - // Diagnostic - // TxPrintf("Port connection in %s from net %s to net %s (%s)\n", - // def->def_name, locname, name, portname); + // Diagnostic + /* TxPrintf("Port connection in %s from net %s to " + * "net %s (%s)\n", + * def->def_name, locname, name, portname); + */ + } } /* Propagate the EF_SUBS_PORT flag */