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).
This commit is contained in:
Tim Edwards 2020-06-01 17:14:22 -04:00
parent 15f1c82bc9
commit 01966d594e
4 changed files with 23 additions and 14 deletions

View File

@ -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");

View File

@ -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)
{

View File

@ -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",

View File

@ -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;