Additional work to incorporate handling of split tiles throughout

the extraction, especially for routines like ExtFindNeighbors where
it was previously not handled at all.  A new method was introduced
in which split tiles with neither side TT_SPACE will get an extra
allocated structure that contains pointers to two regions representing
the nodes on the tile's left and right sides, independently.  The fix
(as yet not fully tested) should resolve problems with extracting the
sky130 I/O cells, which contain a FET with 45 degree angles on the
gate, where a split tile is divided between the gate and the source or
drain, and therefore represents two different nodes.  Also, there were
extraction errors related to incorrect handling of split tiles having
only one node, where a split tile became connected to the wrong node.
This commit is contained in:
R. Timothy Edwards
2026-01-09 12:05:03 -05:00
parent 1cb58e973a
commit 8bd01f5597
20 changed files with 858 additions and 1377 deletions
+19 -12
View File
@@ -154,6 +154,17 @@ typedef struct reg
struct reg *reg_next; /* Next region in list */
} ExtRegion;
/*
* Special structure for split tiles which have something other than
* TT_SPACE on both sides and require two regions to represent both
* nets connected to the tile.
*/
typedef struct split_reg
{
ExtRegion *reg_left; // Region belonging to tile left side
ExtRegion *reg_right; // Region belonging to tile right side
} ExtSplitRegion;
/*
* GENERIC region with labels.
* Any other structure that wants to reference node names
@@ -228,6 +239,7 @@ typedef struct treg
typedef struct { /* Maintain plane information when pushing */
Rect area; /* tiles on the node stack. For use with */
int plane; /* function extNbrPushFunc(). */
ClientData uninit; /* Value of an unvisited region */
} PlaneAndArea;
/* Structure to be kept in a hash table of node regions for the current */
@@ -259,7 +271,7 @@ typedef struct
CellDef *fra_def; /* Def being searched */
int fra_pNum; /* Plane currently searching */
ClientData fra_uninit; /* This value appears in the ti_client
* field of a tile if it's not yet
* field of a tile if it has not yet
* been visited.
*/
ExtRegion *(*fra_first)(); /* Function to init new region */
@@ -975,17 +987,10 @@ typedef struct node
/* -------------------------------------------------------------------- */
/*
* Value normally resident in the ti_client field of a tile,
* indicating that the tile has not yet been visited in a
* region search.
*/
extern ClientData extUnInit;
extern ExtRegion *ExtGetRegion(Tile *tile, TileType dinfo);
#define extGetRegion(tp) ( (tp)->ti_client )
#define extHasRegion(tp,und) ( (tp)->ti_client != (und) )
/* For non-recursive flooding algorithm */
#define VISITPENDING ((ClientData) NULL) /* Marks tiles on stack */
@@ -1062,11 +1067,12 @@ extern Tile *extNodeToTile();
#define NODETONODE(nold, et, nnew) \
if (1) { \
Tile *tp; \
TileType di; \
\
(nnew) = (NodeRegion *) NULL; \
tp = extNodeToTile((nold), (et), (TileType *)NULL); \
if (tp && extHasRegion(tp, extUnInit)) \
(nnew) = (NodeRegion *) extGetRegion(tp); \
tp = extNodeToTile((nold), (et), (TileType *)&di); \
if (tp && extHasRegion(tp, CLIENTDEFAULT)) \
(nnew) = (NodeRegion *) ExtGetRegion(tp, di); \
}
/* -------------------- Miscellaneous procedures ---------------------- */
@@ -1078,6 +1084,7 @@ extern ExtTree *extHierNewOne();
extern int extNbrPushFunc();
extern TileType extGetDevType();
extern void extMakeNodeNumPrint();
extern void ExtSetRegion();
/* --------------------- Miscellaneous globals ------------------------ */