From 01966d594ebf97340a0dc0ad4a1fc02ebcdcc53b Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 1 Jun 2020 17:14:22 -0400 Subject: [PATCH] Additional modification to the devVisit routine in extflat to change from passing the HierName to passing the HierContext (of which HierName is a part) so that more information from HierContext (such as the cell use being visited) can be passed to the callback procedure (largely for diagnostic purposes). --- ext2sim/ext2sim.c | 11 +++++++---- ext2spice/ext2spice.c | 17 ++++++++++------- extflat/EFantenna.c | 7 +++++-- extflat/EFvisit.c | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ext2sim/ext2sim.c b/ext2sim/ext2sim.c index ecd18775..e5811290 100644 --- a/ext2sim/ext2sim.c +++ b/ext2sim/ext2sim.c @@ -37,6 +37,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/txcommands.h" #endif #include "extflat/extflat.h" +#include "extflat/EFint.h" #include "extract/extract.h" /* for extDevTable */ #include "utils/runstats.h" #include "utils/malloc.h" @@ -981,9 +982,9 @@ HierName *suffix; */ int -simdevVisit(dev, hierName, scale, trans) +simdevVisit(dev, hc, scale, trans) Dev *dev; /* Device being output */ - HierName *hierName; /* Hierarchical path down to this device */ + HierContext *hc; /* Hierarchical context down to this device */ float scale; /* Scale transform for output */ Transform *trans; /* Coordinate transform */ { @@ -992,6 +993,7 @@ simdevVisit(dev, hierName, scale, trans) int l, w; Rect r; char name[12]; + HierName *hierName = hc->hc_hierName; sprintf(name, "output"); @@ -1643,9 +1645,9 @@ Dev *dev; * ---------------------------------------------------------------------------- */ int -simmergeVisit(dev, hierName, scale, trans) +simmergeVisit(dev, hc, scale, trans) Dev *dev; /* Dev to examine */ -HierName *hierName; /* Hierarchical path down to this dev */ +HierContext *hc; /* Hierarchical context down to this dev */ float scale; /* Scale transform */ Transform *trans; /* Coordinate transform (not used) */ { @@ -1656,6 +1658,7 @@ Transform *trans; /* Coordinate transform (not used) */ int pmode, l, w; float m; devMerge *fp, *cfp; + HierName *hierName = hc->hc_hierName; if (dev->dev_nterm < 2) { TxError("outPremature\n"); diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index ab57d129..6fcc89ac 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -2220,9 +2220,9 @@ getCurDevMult() */ int -spcdevVisit(dev, hierName, scale, trans) +spcdevVisit(dev, hc, scale, trans) Dev *dev; /* Dev being output */ - HierName *hierName; /* Hierarchical path down to this dev */ + HierContext *hc; /* Hierarchical context down to this dev */ float scale; /* Scale transform for output */ Transform *trans; /* (unused) */ { @@ -2234,6 +2234,7 @@ spcdevVisit(dev, hierName, scale, trans) float sdM; char name[12], devchar; bool has_model = TRUE; + HierName *hierName = hc->hc_hierName; sprintf(name, "output"); @@ -3712,9 +3713,9 @@ mergeAttr(a1, a2) */ int -devMergeVisit(dev, hierName, scale, trans) +devMergeVisit(dev, hc, scale, trans) Dev *dev; /* Dev to examine */ - HierName *hierName; /* Hierarchical path down to this dev */ + HierContext *hc; /* Hierarchical context down to this dev */ float scale; /* Scale transform */ Transform *trans; /* (unused) */ { @@ -3726,9 +3727,10 @@ devMergeVisit(dev, hierName, scale, trans) bool hS, hD, chS, chD; devMerge *fp, *cfp; float m; + HierName *hierName = hc->hc_hierName; if (esDistrJunct) - devDistJunctVisit(dev, hierName, scale, trans); + devDistJunctVisit(dev, hc, scale, trans); if (dev->dev_nterm < 2) { @@ -3913,15 +3915,16 @@ update_w(resClass, w, n) */ int -devDistJunctVisit(dev, hierName, scale, trans) +devDistJunctVisit(dev, hc, scale, trans) Dev *dev; /* Dev to examine */ - HierName *hierName; /* Hierarchical path down to this dev */ + HierContext *hc; /* Hierarchical path down to this dev */ float scale; /* Scale transform */ Transform *trans; /* (unused) */ { EFNode *n; int i; int l, w; + HierName *hierName = hc->hc_hierName; if (dev->dev_nterm < 2) { diff --git a/extflat/EFantenna.c b/extflat/EFantenna.c index d31b6815..26a33a4a 100644 --- a/extflat/EFantenna.c +++ b/extflat/EFantenna.c @@ -31,6 +31,7 @@ #include "dbwind/dbwind.h" #include "textio/txcommands.h" #include "extflat/extflat.h" +#include "extflat/EFint.h" #include "extract/extract.h" #include "extract/extractInt.h" #include "utils/malloc.h" @@ -335,9 +336,9 @@ HierName *suffix; */ int -antennacheckVisit(dev, hierName, scale, trans, editUse) +antennacheckVisit(dev, hc, scale, trans, editUse) Dev *dev; /* Device being output */ - HierName *hierName; /* Hierarchical path down to this device */ + HierContext *hc; /* Hierarchical context down to this device */ float scale; /* Scale transform for output */ Transform *trans; /* Coordinate transform */ CellUse *editUse; /* ClientData is edit cell use */ @@ -354,6 +355,7 @@ antennacheckVisit(dev, hierName, scale, trans, editUse) SearchContext scx; TileTypeBitMask gatemask, saveConMask; bool antennaError; + HierName *hierName = hc->hc_hierName; extern CellDef *extPathDef; /* see extract/ExtLength.c */ extern CellUse *extPathUse; /* see extract/ExtLength.c */ @@ -554,6 +556,7 @@ antennacheckVisit(dev, hierName, scale, trans, editUse) antennaError = TRUE; if (efAntennaDebug == TRUE) { + TxError("Cell: %s\n", hc->hc_use->use_id); TxError("Antenna violation detected at plane %s\n", DBPlaneLongNameTbl[pNum2]); TxError("Effective antenna ratio %g > limit %g\n", diff --git a/extflat/EFvisit.c b/extflat/EFvisit.c index fccdc9f7..ef980491 100644 --- a/extflat/EFvisit.c +++ b/extflat/EFvisit.c @@ -321,7 +321,7 @@ efVisitDevs(hc, ca) if (efDevKilled(dev, hc->hc_hierName)) continue; - if ((*ca->ca_proc)(dev, hc->hc_hierName, scale, &t, ca->ca_cdata)) + if ((*ca->ca_proc)(dev, hc, scale, &t, ca->ca_cdata)) return 1; } return 0;