Decided that a different approach needed to be taken for having
timestamps that are fixed, since the timestamp update routine is called from too many places, too many times. Instead created a new cell definition flag indicating a fixed timestamp, which can be set by "cellname timestamp" for an individual cell, or with "gds datestamp" for cells read from a GDS file.
This commit is contained in:
parent
3065d4cc4b
commit
e1aedc6f41
|
|
@ -400,7 +400,11 @@ calmaParseStructure(filename)
|
|||
if (CalmaDateStamp == NULL)
|
||||
cifReadCellDef->cd_timestamp = timestampval;
|
||||
else
|
||||
{
|
||||
cifReadCellDef->cd_timestamp = *CalmaDateStamp;
|
||||
if (*CalmaDateStamp != (time_t)0)
|
||||
cifReadCellDef->cd_flags |= CDFIXEDSTAMP;
|
||||
}
|
||||
|
||||
/* For read-only cells, set flag in def */
|
||||
if (CalmaReadOnly)
|
||||
|
|
|
|||
|
|
@ -1378,11 +1378,20 @@ CmdCellname(w, cmd)
|
|||
}
|
||||
else if (locargc == 4 || (locargc == 3 && cellname == NULL))
|
||||
{
|
||||
int timestamp = atoi(cmd->tx_argv[2 + ((cellname == NULL) ? 0 : 1)]);
|
||||
if (timestamp != cellDef->cd_timestamp)
|
||||
int timestamp;
|
||||
if (StrIsInt(cmd->tx_argv[2 + ((cellname == NULL) ? 0 : 1)]))
|
||||
{
|
||||
cellDef->cd_timestamp = timestamp;
|
||||
cellDef->cd_flags &= ~CDGETNEWSTAMP;
|
||||
timestamp = atoi(cmd->tx_argv[2 + ((cellname == NULL) ? 0 : 1)]);
|
||||
if (timestamp != cellDef->cd_timestamp)
|
||||
{
|
||||
cellDef->cd_timestamp = timestamp;
|
||||
cellDef->cd_flags &= ~CDGETNEWSTAMP | CDFIXEDSTAMP;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TxError("Invalid timestamp \"%s\".\n",
|
||||
cmd->tx_argv[2 + ((cellname == NULL) ? 0 : 1)]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -1398,12 +1407,46 @@ CmdCellname(w, cmd)
|
|||
break;
|
||||
}
|
||||
#ifdef MAGIC_WRAPPER
|
||||
/* All of the flags are included for completeness. A number
|
||||
* of these flags are set in self-contained routines and will
|
||||
* never appear as the result of the "cellname flags" command.
|
||||
* Mainly for diagnostics (in case a routine is not cleaning
|
||||
* up its own flag settings, for example).
|
||||
*/
|
||||
if (cellDef->cd_flags & CDAVAILABLE)
|
||||
Tcl_AppendElement(magicinterp, "available");
|
||||
if (cellDef->cd_flags & CDMODIFIED)
|
||||
Tcl_AppendElement(magicinterp, "modified");
|
||||
if (cellDef->cd_flags & CDNOEDIT)
|
||||
Tcl_AppendElement(magicinterp, "readonly");
|
||||
if (cellDef->cd_flags & CDINTERNAL)
|
||||
Tcl_AppendElement(magicinterp, "internal");
|
||||
if (cellDef->cd_flags & CDFIXEDSTAMP)
|
||||
Tcl_AppendElement(magicinterp, "fixed-timestamp");
|
||||
if (cellDef->cd_flags & CDGETNEWSTAMP)
|
||||
Tcl_AppendElement(magicinterp, "timestamp-pending");
|
||||
if (cellDef->cd_flags & CDSTAMPSCHANGED)
|
||||
Tcl_AppendElement(magicinterp, "child-timestamp-changed");
|
||||
if (cellDef->cd_flags & CDFIXEDBBOX)
|
||||
Tcl_AppendElement(magicinterp, "fixed-bbox");
|
||||
if (cellDef->cd_flags & CDBOXESCHANGED)
|
||||
Tcl_AppendElement(magicinterp, "bbox-changed");
|
||||
if (cellDef->cd_flags & CDPROCESSED)
|
||||
Tcl_AppendElement(magicinterp, "bbox-processed");
|
||||
if (cellDef->cd_flags & CDFLATGDS)
|
||||
Tcl_AppendElement(magicinterp, "flat-gds");
|
||||
if (cellDef->cd_flags & CDFLATTENED)
|
||||
Tcl_AppendElement(magicinterp, "flattened-gds");
|
||||
if (cellDef->cd_flags & CDPROCESSEDGDS)
|
||||
Tcl_AppendElement(magicinterp, "processed-gds");
|
||||
if (cellDef->cd_flags & CDVENDORGDS)
|
||||
Tcl_AppendElement(magicinterp, "vendor-gds");
|
||||
if (cellDef->cd_flags & CDVISITED)
|
||||
Tcl_AppendElement(magicinterp, "visited");
|
||||
if (cellDef->cd_flags & CDDEREFERENCE)
|
||||
Tcl_AppendElement(magicinterp, "dereference");
|
||||
if (cellDef->cd_flags & CDNOTFOUND)
|
||||
Tcl_AppendElement(magicinterp, "not-found");
|
||||
#else
|
||||
TxPrintf("Flag settings for cell %s:\n", cellname);
|
||||
TxPrintf("in database: %s\n", (cellDef->cd_flags & CDAVAILABLE) ?
|
||||
|
|
@ -1412,6 +1455,12 @@ CmdCellname(w, cmd)
|
|||
"true" : "false");
|
||||
TxPrintf("readonly: %s\n", (cellDef->cd_flags & CDNOEDIT) ?
|
||||
"true" : "false");
|
||||
TxPrintf("vendor: %s\n", (cellDef->cd_flags & CDVENDORGDS) ?
|
||||
"true" : "false");
|
||||
TxPrintf("fixed-bbox: %s\n", (cellDef->cd_flags & CDFIXEDBBOX) ?
|
||||
"true" : "false");
|
||||
TxPrintf("fixed-timestamp: %s\n", (cellDef->cd_flags & CDFIXEDSTAMP) ?
|
||||
"true" : "false");
|
||||
#endif
|
||||
break;
|
||||
case IDX_RENAME:
|
||||
|
|
|
|||
|
|
@ -1809,7 +1809,6 @@ CmdWire(w, cmd)
|
|||
|
||||
#define OPT_WRITEALL_FORCE 0
|
||||
#define OPT_WRITEALL_MODIFIED 1
|
||||
#define OPT_WRITEALL_NOUPDATE 2
|
||||
|
||||
void
|
||||
CmdWriteall(w, cmd)
|
||||
|
|
@ -1818,7 +1817,7 @@ CmdWriteall(w, cmd)
|
|||
{
|
||||
int cmdWriteallFunc();
|
||||
int option = -1;
|
||||
static char *writeallOpts[] = { "force", "modified", "noupdate", 0 };
|
||||
static char *writeallOpts[] = { "force", "modified", 0 };
|
||||
int argc;
|
||||
int flags = CDMODIFIED | CDBOXESCHANGED | CDSTAMPSCHANGED;
|
||||
|
||||
|
|
@ -1848,15 +1847,13 @@ CmdWriteall(w, cmd)
|
|||
TxError("No such cell \"%s\".\n", cmd->tx_argv[i]);
|
||||
notfound++;
|
||||
}
|
||||
else if (option != OPT_WRITEALL_NOUPDATE)
|
||||
DBUpdateStamps(def);
|
||||
DBUpdateStamps(def);
|
||||
}
|
||||
if (notfound == cmd->tx_argc - 2) return;
|
||||
}
|
||||
}
|
||||
if (option != OPT_WRITEALL_NOUPDATE)
|
||||
if (cmd->tx_argc <= 2)
|
||||
DBUpdateStamps(NULL);
|
||||
if (cmd->tx_argc <= 2)
|
||||
DBUpdateStamps(NULL);
|
||||
|
||||
argc = cmd->tx_argc;
|
||||
(void) DBCellSrDefs(flags, cmdWriteallFunc, (ClientData)cmd);
|
||||
|
|
|
|||
|
|
@ -214,11 +214,18 @@ DBUpdateStamps(def)
|
|||
extern time_t time();
|
||||
|
||||
DBFixMismatch();
|
||||
|
||||
timestamp = time((time_t *) 0);
|
||||
if (def == NULL)
|
||||
(void) DBCellSrDefs(CDGETNEWSTAMP, dbStampFunc, (ClientData) NULL);
|
||||
|
||||
else if (def->cd_flags & CDGETNEWSTAMP)
|
||||
dbStampFunc(def);
|
||||
{
|
||||
if (def->cd_flags & CDFIXEDSTAMP)
|
||||
def->cd_flags &= ~CDGETNEWSTAMP;
|
||||
else
|
||||
dbStampFunc(def);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -234,11 +241,12 @@ dbStampFunc(cellDef)
|
|||
|
||||
if (cellDef->cd_timestamp == timestamp) return 0;
|
||||
|
||||
cellDef->cd_timestamp = timestamp;
|
||||
if (!(cellDef->cd_flags & CDFIXEDSTAMP))
|
||||
cellDef->cd_timestamp = timestamp;
|
||||
|
||||
cellDef->cd_flags &= ~CDGETNEWSTAMP;
|
||||
|
||||
/* printf("Writing new timestamp %d for %s.\n",
|
||||
timestamp, cellDef->cd_name); */
|
||||
// printf("Writing new timestamp %d for %s.\n", timestamp, cellDef->cd_name);
|
||||
|
||||
/* If a child's stamp has changed, then the stamps must change
|
||||
* in all its parents too. When the hierarchical DRC becomes
|
||||
|
|
|
|||
|
|
@ -411,24 +411,30 @@ typedef struct celldef
|
|||
* CDDEREFERENCE is a flag indicating that when loading or expanding
|
||||
* children of a cell, the path should be ignored and the cell
|
||||
* path should be searched for the location.
|
||||
* CDFIXEDSTAMP is a flag indicating that the cell has a fixed
|
||||
* timestamp that should not be modified. This should be used
|
||||
* with caution as it messes with the usual timestamp tracking,
|
||||
* but is useful for preparing libraries all cells of which have
|
||||
* the same timestamp value.
|
||||
*/
|
||||
|
||||
#define CDAVAILABLE 0x0001
|
||||
#define CDMODIFIED 0x0002
|
||||
#define CDNOTFOUND 0x0004
|
||||
#define CDINTERNAL 0x0008
|
||||
#define CDGETNEWSTAMP 0x0010
|
||||
#define CDSTAMPSCHANGED 0x0020
|
||||
#define CDBOXESCHANGED 0x0040
|
||||
#define CDFIXEDBBOX 0x0080
|
||||
#define CDNOEDIT 0x0100
|
||||
#define CDPROCESSED 0x0200
|
||||
#define CDFLATGDS 0x0400
|
||||
#define CDFLATTENED 0x0800
|
||||
#define CDPROCESSEDGDS 0x1000
|
||||
#define CDVENDORGDS 0x2000
|
||||
#define CDVISITED 0x4000
|
||||
#define CDDEREFERENCE 0x8000
|
||||
#define CDAVAILABLE 0x00001
|
||||
#define CDMODIFIED 0x00002
|
||||
#define CDNOTFOUND 0x00004
|
||||
#define CDINTERNAL 0x00008
|
||||
#define CDGETNEWSTAMP 0x00010
|
||||
#define CDSTAMPSCHANGED 0x00020
|
||||
#define CDBOXESCHANGED 0x00040
|
||||
#define CDFIXEDBBOX 0x00080
|
||||
#define CDNOEDIT 0x00100
|
||||
#define CDPROCESSED 0x00200
|
||||
#define CDFLATGDS 0x00400
|
||||
#define CDFLATTENED 0x00800
|
||||
#define CDPROCESSEDGDS 0x01000
|
||||
#define CDVENDORGDS 0x02000
|
||||
#define CDVISITED 0x04000
|
||||
#define CDDEREFERENCE 0x08000
|
||||
#define CDFIXEDSTAMP 0x10000
|
||||
|
||||
/*
|
||||
* Description of an array.
|
||||
|
|
|
|||
Loading…
Reference in New Issue