After a discussion about "cifinput" rules, realized that there is

no way to implement boolean operators on labels, so any "label"
statement in the section can apply only to one magic layer.  This
is regularly violated in most (all?) techfiles (due mainly to lack
of explanation and guidance).  The addition of the "no-reconnect-
labels" option for cifinput made it worse, as it can cause a label
to be attached to the wrong layer and be stuck that way.  Even
without the option, an attachment to a non-connecting type is a
problem;  DIFF cannot simultaneously have a connection to both
ndiff and pdiff, so it will be one or the other, and the one not
connected can easily get labels moved to other nets.  To avoid
this:  (1) removed the "no-reconnect-labels" option, and (2) made
the automatic label reconnection smarter, as well as splitting it
into two different behaviors based on whether a label is being
created or manipulated from the command line (more or less the
original behavior) vs. being read from GDS or LEF.  The new rules
assume that labels attached to a GDS type will all map to the
same plane in magic.  To avoid excessive error messages from
existing tech files, a warning is issued only if "labels" changes
the plane of the target layer (a realistic solution rather than
the preferred one).  Also:  Fixed an error that causes a crash on
the "wizard" command "*watch" if the cell being observed is
read-only (see github issue #271).
This commit is contained in:
Tim Edwards
2023-10-17 15:54:38 -04:00
parent 5b29870fce
commit fdcc178bcd
8 changed files with 212 additions and 133 deletions
+22 -8
View File
@@ -877,14 +877,27 @@ CIFReadTechLine(sectionName, argc, argv)
if (TTMaskHasType(&mask, i))
{
/* Only one magic type can be assigned to a GDS layer, so
* multiple assignments should be flagged as errors.
* multiple assignments should be flagged as errors. BUT,
* this is a common historic error. Since reattachments
* should be handled rationally (by code added 10/17/2023
* to DBlabel.c), there is no urgent need to flag an issue
* unless the new layer does not exist on the same plane
* as the old one.
*/
if (cifCurReadStyle->crs_labelLayer[i] != TT_SPACE)
TechError("Labels on layer \"%s\" attached to \"%s\" supersedes "
"prior attachment to \"%s\".\n",
{
int p1, p2;
p1 = DBPlane(cifCurReadLayer->crl_magicType);
p2 = DBPlane(cifCurReadStyle->crs_labelLayer[i]);
if (!DBTypeOnPlane(cifCurReadLayer->crl_magicType, p2) &&
!DBTypeOnPlane(cifCurReadStyle->crs_labelLayer[i], p1))
TechError("Labels on layer \"%s\" attached to \"%s\" "
"supersedes prior attachment to \"%s\".\n",
cifReadLayers[i],
DBTypeLongNameTbl[cifCurReadLayer->crl_magicType],
DBTypeLongNameTbl[cifCurReadStyle->crs_labelLayer[i]]);
}
cifCurReadStyle->crs_labelLayer[i]
= cifCurReadLayer->crl_magicType;
@@ -926,14 +939,15 @@ CIFReadTechLine(sectionName, argc, argv)
/* miscellaneous cif-reading boolean options */
if(strcmp(argv[0], "options") == 0) {
if (strcmp(argv[0], "options") == 0) {
int i;
if (argc < 2) goto wrongNumArgs;
for(i = 1; i < argc; i++) {
if(strcmp(argv[i], "ignore-unknown-layer-labels") == 0)
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "ignore-unknown-layer-labels") == 0)
cifCurReadStyle->crs_flags |= CRF_IGNORE_UNKNOWNLAYER_LABELS;
if(strcmp(argv[i], "no-reconnect-labels") == 0)
cifCurReadStyle->crs_flags |= CRF_NO_RECONNECT_LABELS;
/* Allow "no-reconnect-labels", although it has been deprecated */
else if (strcmp(argv[i], "no-reconnect-labels") != 0)
TechError("Unknown cifinput option \"%s\".\n", argv[i]);
}
return TRUE;
}
-1
View File
@@ -115,7 +115,6 @@ typedef struct cifrstyle
/* option bitmasks used in crs_flags */
#define CRF_IGNORE_UNKNOWNLAYER_LABELS 1
#define CRF_NO_RECONNECT_LABELS 2
/* Methods to deal with fractional results of conversion from CIF to magic */
/* units (see routine CIFScaleCoord() for details). */