Added a command option "cellname dereference" to force a dereferencing
flush of a cell, by name.
This commit is contained in:
parent
f8edb30d4e
commit
6952e814f6
|
|
@ -689,6 +689,7 @@ CmdCellname(w, cmd)
|
||||||
"window list top-level cell of a layout window",
|
"window list top-level cell of a layout window",
|
||||||
"create create a new cell definition",
|
"create create a new cell definition",
|
||||||
"delete delete the named cell definition",
|
"delete delete the named cell definition",
|
||||||
|
"dereference reload the named cell from the search paths",
|
||||||
"filepath list the full path of the file for the cell",
|
"filepath list the full path of the file for the cell",
|
||||||
"flags list option flags of the indicated cell definition",
|
"flags list option flags of the indicated cell definition",
|
||||||
"lock lock the named cell (prevent changes to cell use)",
|
"lock lock the named cell (prevent changes to cell use)",
|
||||||
|
|
@ -703,10 +704,10 @@ CmdCellname(w, cmd)
|
||||||
};
|
};
|
||||||
typedef enum { IDX_CHILDREN, IDX_PARENTS, IDX_EXISTS, IDX_SELF,
|
typedef enum { IDX_CHILDREN, IDX_PARENTS, IDX_EXISTS, IDX_SELF,
|
||||||
IDX_INSTANCE, IDX_CHILDINST, IDX_CELLDEF, IDX_ALLCELLS,
|
IDX_INSTANCE, IDX_CHILDINST, IDX_CELLDEF, IDX_ALLCELLS,
|
||||||
IDX_TOPCELLS, IDX_IN_WINDOW, IDX_CREATE,
|
IDX_TOPCELLS, IDX_IN_WINDOW, IDX_CREATE, IDX_DELETE,
|
||||||
IDX_DELETE, IDX_FILEPATH, IDX_FLAGS, IDX_LOCK, IDX_UNLOCK,
|
IDX_DEREFERENCE, IDX_FILEPATH, IDX_FLAGS, IDX_LOCK,
|
||||||
IDX_PROPERTY, IDX_ABUTMENT, IDX_ORIENTATION, IDX_RENAME,
|
IDX_UNLOCK, IDX_PROPERTY, IDX_ABUTMENT, IDX_ORIENTATION,
|
||||||
IDX_READWRITE, IDX_MODIFIED } optionType;
|
IDX_RENAME, IDX_READWRITE, IDX_MODIFIED } optionType;
|
||||||
|
|
||||||
if (strstr(cmd->tx_argv[0], "in"))
|
if (strstr(cmd->tx_argv[0], "in"))
|
||||||
is_cellname = FALSE;
|
is_cellname = FALSE;
|
||||||
|
|
@ -743,8 +744,9 @@ CmdCellname(w, cmd)
|
||||||
if (option < 0) goto badusage;
|
if (option < 0) goto badusage;
|
||||||
|
|
||||||
if ((locargc > 3) && (option != IDX_RENAME) && (option != IDX_DELETE) &&
|
if ((locargc > 3) && (option != IDX_RENAME) && (option != IDX_DELETE) &&
|
||||||
(option != IDX_READWRITE) && (option != IDX_PROPERTY) &&
|
(option != IDX_DEREFERENCE) && (option != IDX_READWRITE) &&
|
||||||
(option != IDX_FILEPATH) && (option != IDX_ORIENTATION))
|
(option != IDX_PROPERTY) && (option != IDX_FILEPATH) &&
|
||||||
|
(option != IDX_ORIENTATION))
|
||||||
goto badusage;
|
goto badusage;
|
||||||
|
|
||||||
if ((locargc > 4) && (option != IDX_PROPERTY))
|
if ((locargc > 4) && (option != IDX_PROPERTY))
|
||||||
|
|
@ -790,6 +792,7 @@ CmdCellname(w, cmd)
|
||||||
return;
|
return;
|
||||||
case IDX_IN_WINDOW: case IDX_READWRITE: case IDX_FLAGS:
|
case IDX_IN_WINDOW: case IDX_READWRITE: case IDX_FLAGS:
|
||||||
case IDX_PROPERTY: case IDX_FILEPATH: case IDX_MODIFIED:
|
case IDX_PROPERTY: case IDX_FILEPATH: case IDX_MODIFIED:
|
||||||
|
case IDX_DEREFERENCE:
|
||||||
TxError("Function unimplemented for instances.\n");
|
TxError("Function unimplemented for instances.\n");
|
||||||
return;
|
return;
|
||||||
case IDX_DELETE:
|
case IDX_DELETE:
|
||||||
|
|
@ -867,6 +870,33 @@ CmdCellname(w, cmd)
|
||||||
TxError("Delete cell command missing cellname\n");
|
TxError("Delete cell command missing cellname\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IDX_DEREFERENCE:
|
||||||
|
/* Unload the cell definition and re-read with search paths */
|
||||||
|
if (locargc == 3)
|
||||||
|
{
|
||||||
|
void cmdFlushCell();
|
||||||
|
|
||||||
|
if (cellname == NULL)
|
||||||
|
cellDef = EditRootDef;
|
||||||
|
else
|
||||||
|
cellDef = DBCellLookDef(cellname);
|
||||||
|
|
||||||
|
/* Force dereferencing */
|
||||||
|
cellDef->cd_flags |= CDDEREFERENCE;
|
||||||
|
freeMagic(cellDef->cd_file);
|
||||||
|
cellDef->cd_file = NULL;
|
||||||
|
|
||||||
|
/* Reload cell */
|
||||||
|
cmdFlushCell(cellDef);
|
||||||
|
|
||||||
|
/* Clear dereferencing */
|
||||||
|
cellDef->cd_flags &= ~CDDEREFERENCE;
|
||||||
|
SelectClear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TxError("Dereference cell command missing cellname\n");
|
||||||
|
break;
|
||||||
|
|
||||||
case IDX_READWRITE:
|
case IDX_READWRITE:
|
||||||
if (cellname == NULL)
|
if (cellname == NULL)
|
||||||
cellDef = EditRootDef;
|
cellDef = EditRootDef;
|
||||||
|
|
|
||||||
|
|
@ -197,12 +197,7 @@ DRCCheckThis (celldef, operation, area)
|
||||||
* of CellDefs waiting for DRC
|
* of CellDefs waiting for DRC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Ignore internal GDS cells. */
|
/* Ignore internal cells. */
|
||||||
/* Note that this rescinds the former behavior of ignoring DRC on */
|
|
||||||
/* vendor and read-only cells. Such cells will be flattened in */
|
|
||||||
/* interaction areas and show errors anyway, so not showing errors */
|
|
||||||
/* in the cell is just confusing. */
|
|
||||||
|
|
||||||
if (celldef->cd_flags & CDINTERNAL) return;
|
if (celldef->cd_flags & CDINTERNAL) return;
|
||||||
|
|
||||||
/* Insert celldef into list of Defs waiting to be checked, unless */
|
/* Insert celldef into list of Defs waiting to be checked, unless */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue