Merge branch 'work' into tomerge

This commit is contained in:
Tim Edwards 2018-10-31 14:36:02 -04:00
commit 56e838ebb6
3 changed files with 39 additions and 8 deletions

View File

@ -211,7 +211,8 @@ Exttospice_Init(interp)
#define EXTTOSPC_BLACKBOX 11 #define EXTTOSPC_BLACKBOX 11
#define EXTTOSPC_RENUMBER 12 #define EXTTOSPC_RENUMBER 12
#define EXTTOSPC_MERGENAMES 13 #define EXTTOSPC_MERGENAMES 13
#define EXTTOSPC_HELP 14 #define EXTTOSPC_LVS 14
#define EXTTOSPC_HELP 15
void void
CmdExtToSpice(w, cmd) CmdExtToSpice(w, cmd)
@ -262,6 +263,7 @@ CmdExtToSpice(w, cmd)
"renumber [on|off] on = number instances X1, X2, etc.\n" "renumber [on|off] on = number instances X1, X2, etc.\n"
" off = keep instance ID names", " off = keep instance ID names",
"global [on|off] on = merge unconnected global nets by name", "global [on|off] on = merge unconnected global nets by name",
"lvs apply typical default settings for LVS",
"help print help information", "help print help information",
NULL NULL
}; };
@ -418,6 +420,27 @@ CmdExtToSpice(w, cmd)
esMergeNames = FALSE; esMergeNames = FALSE;
break; break;
case EXTTOSPC_LVS:
/* Apply default command settings for LVS */
/* hierarchy = on */
/* format = ngspice */
/* cthresh = infinite */
/* rthresh = infinite */
/* renumber = off */
/* scale = off */
/* blackbox = on */
/* subcircuit top = auto */
esDoHierarchy = TRUE;
esFormat = NGSPICE;
LocCapThreshold = (EFCapValue)INFINITE_THRESHOLD_F;
LocResistThreshold = INFINITE_THRESHOLD;
esDoRenumber = FALSE;
esScale = 0.0;
esDoBlackBox = TRUE;
esDoSubckt = 2;
break;
case EXTTOSPC_SUBCIRCUITS: case EXTTOSPC_SUBCIRCUITS:
if (cmd->tx_argc == 2) if (cmd->tx_argc == 2)
{ {
@ -489,7 +512,7 @@ CmdExtToSpice(w, cmd)
if (idx < 0) if (idx < 0)
{ {
Tcl_SetResult(magicinterp, "Bad format type. Formats are:" Tcl_SetResult(magicinterp, "Bad format type. Formats are:"
"spice2, spice3, and hspice.", NULL); "spice2, spice3, hspice, and ngspice.", NULL);
return; return;
} }
else else

View File

@ -262,11 +262,17 @@ extBasic(def, outFile)
if (!SigInterruptPending) if (!SigInterruptPending)
ExtLabelRegions(def, ExtCurStyle->exts_nodeConn, &nodeList, &TiPlaneRect); ExtLabelRegions(def, ExtCurStyle->exts_nodeConn, &nodeList, &TiPlaneRect);
/* Check for "LEFview", for which special output handling */
/* can be specified in ext2spice. */
DBPropGet(def, "LEFview", &isabstract);
/* /*
* Make sure all geometry with the same label is part of the * Make sure all geometry with the same label is part of the
* same electrical node. * same electrical node. However: Unconnected labels are allowed
* on abstract views.
*/ */
if (!SigInterruptPending && (ExtDoWarn & EXTWARN_DUP)) if (!SigInterruptPending && (ExtDoWarn & EXTWARN_DUP) && !isabstract)
extFindDuplicateLabels(def, nodeList); extFindDuplicateLabels(def, nodeList);
/* /*
@ -306,10 +312,6 @@ extBasic(def, outFile)
} }
} }
/* Check for "LEFview", for which special output handling */
/* can be specified in ext2spice. */
DBPropGet(def, "LEFview", &isabstract);
if (isabstract) fprintf(outFile, "abstract\n"); if (isabstract) fprintf(outFile, "abstract\n");
/* Output each node, along with its resistance and capacitance to substrate */ /* Output each node, along with its resistance and capacitance to substrate */

View File

@ -85,8 +85,14 @@ extUniqueCell(def, option)
Label *lab; Label *lab;
char *text; char *text;
int nwarn; int nwarn;
bool isabstract;
nwarn = 0; nwarn = 0;
/* Check for "LEFview", as we do not care about unique names in abstract views */
DBPropGet(def, "LEFview", &isabstract);
if (isabstract) return nwarn;
HashInit(&labelHash, 32, HT_STRINGKEYS); HashInit(&labelHash, 32, HT_STRINGKEYS);
TxPrintf("Processing %s\n", def->cd_name); TxPrintf("Processing %s\n", def->cd_name);
TxFlush(); TxFlush();