Merge branch 'master' into magic-8.2
This commit is contained in:
commit
6152fb01c6
|
|
@ -623,6 +623,8 @@ CIFReadTechLine(sectionName, argc, argv)
|
||||||
{
|
{
|
||||||
if (!strncmp(argv[argc - 1], "nanom", 5))
|
if (!strncmp(argv[argc - 1], "nanom", 5))
|
||||||
cifCurReadStyle->crs_multiplier = 10;
|
cifCurReadStyle->crs_multiplier = 10;
|
||||||
|
else if (!strncmp(argv[argc - 1], "angstr", 6))
|
||||||
|
cifCurReadStyle->crs_multiplier = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cifCurReadStyle->crs_scaleFactor <= 0)
|
if (cifCurReadStyle->crs_scaleFactor <= 0)
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ CmdLabel(w, cmd)
|
||||||
* Implement the "load" command.
|
* Implement the "load" command.
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* load [name [scaled n [d]]] [-force]
|
* load [name [scaled n [d]]] [-force] [-nowindow]
|
||||||
*
|
*
|
||||||
* If name is supplied, then the window containing the point tool is
|
* If name is supplied, then the window containing the point tool is
|
||||||
* remapped so as to edit the cell with the given name.
|
* remapped so as to edit the cell with the given name.
|
||||||
|
|
@ -364,15 +364,16 @@ CmdLoad(w, cmd)
|
||||||
locargc--;
|
locargc--;
|
||||||
ignoreTech = TRUE;
|
ignoreTech = TRUE;
|
||||||
}
|
}
|
||||||
if (locargc >= 4 && !strncmp(cmd->tx_argv[2], "scale", 5) &&
|
if ((locargc >= 4) && !strncmp(cmd->tx_argv[2], "scale", 5) &&
|
||||||
StrIsInt(cmd->tx_argv[3]))
|
StrIsInt(cmd->tx_argv[3]))
|
||||||
{
|
{
|
||||||
n = atoi(cmd->tx_argv[3]);
|
n = atoi(cmd->tx_argv[3]);
|
||||||
if (cmd->tx_argc == 5 && StrIsInt(cmd->tx_argv[4]))
|
if ((locargc == 5) && StrIsInt(cmd->tx_argv[4]))
|
||||||
d = atoi(cmd->tx_argv[4]);
|
d = atoi(cmd->tx_argv[4]);
|
||||||
else if (locargc != 4)
|
else if (locargc != 4)
|
||||||
{
|
{
|
||||||
TxError("Usage: %s name scaled n [d]\n", cmd->tx_argv[0]);
|
TxError("Usage: %s name scaled n [d] [-force] [-nowindow]\n",
|
||||||
|
cmd->tx_argv[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DBLambda[0] *= d;
|
DBLambda[0] *= d;
|
||||||
|
|
@ -381,7 +382,8 @@ CmdLoad(w, cmd)
|
||||||
}
|
}
|
||||||
else if (!ignoreTech && !noWindow)
|
else if (!ignoreTech && !noWindow)
|
||||||
{
|
{
|
||||||
TxError("Usage: %s [name [scaled n [d]]]\n", cmd->tx_argv[0]);
|
TxError("Usage: %s name [scaled n [d]] [-force] [-nowindow]\n",
|
||||||
|
cmd->tx_argv[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1656,7 +1656,7 @@ esMakePorts(hc, cdata)
|
||||||
// In particular, this keeps parasitics out of the netlist for
|
// In particular, this keeps parasitics out of the netlist for
|
||||||
// LVS purposes if "cthresh" is set to "infinite".
|
// LVS purposes if "cthresh" is set to "infinite".
|
||||||
|
|
||||||
if (fabs((double)conn->conn_cap) < EFCapThreshold) continue;
|
if (fabs((double)conn->conn_cap / 1000) < EFCapThreshold) continue;
|
||||||
|
|
||||||
portname = name;
|
portname = name;
|
||||||
updef = def;
|
updef = def;
|
||||||
|
|
@ -1883,6 +1883,9 @@ esHierVisit(hc, cdata)
|
||||||
EFHierVisitNodes(hcf, spcnodeHierVisit, (ClientData) NULL);
|
EFHierVisitNodes(hcf, spcnodeHierVisit, (ClientData) NULL);
|
||||||
freeMagic(resstr);
|
freeMagic(resstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset device merge index for next cell */
|
||||||
|
if (esMergeDevsA || esMergeDevsC) esFMIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((def != topdef) || (def->def_flags & DEF_SUBCIRCUIT) || (locDoSubckt == TRUE))
|
if ((def != topdef) || (def->def_flags & DEF_SUBCIRCUIT) || (locDoSubckt == TRUE))
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,8 @@ CmdExtToSpice(w, cmd)
|
||||||
"extresist [on|off] incorporate information from extresist",
|
"extresist [on|off] incorporate information from extresist",
|
||||||
"resistor tee [on|off] model resistor capacitance as a T-network",
|
"resistor tee [on|off] model resistor capacitance as a T-network",
|
||||||
"scale [on|off] use .option card for scaling",
|
"scale [on|off] use .option card for scaling",
|
||||||
"subcircuits [on|off] standard cells become subcircuit calls",
|
"subcircuits [top|descend] [on|off|auto]\n"
|
||||||
|
" standard cells become subcircuit calls",
|
||||||
"hierarchy [on|off] output hierarchical spice for LVS",
|
"hierarchy [on|off] output hierarchical spice for LVS",
|
||||||
"blackbox [on|off] output abstract views as black-box entries",
|
"blackbox [on|off] output abstract views as black-box entries",
|
||||||
"renumber [on|off] on = number instances X1, X2, etc.\n"
|
"renumber [on|off] on = number instances X1, X2, etc.\n"
|
||||||
|
|
@ -2095,6 +2096,56 @@ esOutputResistor(dev, hierName, scale, term1, term2, has_model, l, w, dscale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Report if device at index n has been deleted due to merging */
|
||||||
|
|
||||||
|
bool
|
||||||
|
devIsKilled(n)
|
||||||
|
int n;
|
||||||
|
{
|
||||||
|
return (esFMult[(n)] <= (float)0.0) ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add a dev's multiplier to the table and grow it if necessary */
|
||||||
|
|
||||||
|
void
|
||||||
|
addDevMult(f)
|
||||||
|
float f;
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float *op;
|
||||||
|
|
||||||
|
if (esFMult == NULL) {
|
||||||
|
esFMult = (float *) mallocMagic((unsigned) (esFMSize*sizeof(float)));
|
||||||
|
}
|
||||||
|
else if (esFMIndex >= esFMSize)
|
||||||
|
{
|
||||||
|
op = esFMult;
|
||||||
|
esFMSize *= 2;
|
||||||
|
esFMult = (float *)mallocMagic((unsigned)(esFMSize * sizeof(float)));
|
||||||
|
for (i = 0; i < esFMSize / 2; i++) esFMult[i] = op[i];
|
||||||
|
if (op) freeMagic(op);
|
||||||
|
}
|
||||||
|
esFMult[esFMIndex++] = f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the multiplier value f of device at index i */
|
||||||
|
|
||||||
|
void
|
||||||
|
setDevMult(i, f)
|
||||||
|
int i;
|
||||||
|
float f;
|
||||||
|
{
|
||||||
|
esFMult[i] = f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the multiplier value of the device at the current index esFMIndex */
|
||||||
|
|
||||||
|
float
|
||||||
|
getCurDevMult()
|
||||||
|
{
|
||||||
|
return (esFMult && (esFMIndex > 0)) ? esFMult[esFMIndex-1] : (float)1.0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ extern char *nodeSpiceHierName();
|
||||||
extern devMerge *mkDevMerge();
|
extern devMerge *mkDevMerge();
|
||||||
extern bool extHierSDAttr();
|
extern bool extHierSDAttr();
|
||||||
|
|
||||||
|
extern bool devIsKilled();
|
||||||
|
extern float getCurDevMult();
|
||||||
|
extern void addDevMult();
|
||||||
|
extern void setDevMult();
|
||||||
|
|
||||||
/* Options specific to ext2spice */
|
/* Options specific to ext2spice */
|
||||||
extern bool esDoExtResis;
|
extern bool esDoExtResis;
|
||||||
extern bool esDoPorts;
|
extern bool esDoPorts;
|
||||||
|
|
@ -166,7 +171,7 @@ typedef struct {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*---------------------------------------------------------
|
*---------------------------------------------------------
|
||||||
* Variables & macros used for merging parallel devs
|
* Variables used for merging parallel devs
|
||||||
* The merging of devs is based on the fact that spcdevVisit
|
* The merging of devs is based on the fact that spcdevVisit
|
||||||
* visits the devs in the same order all the time so the
|
* visits the devs in the same order all the time so the
|
||||||
* value of esFMult[i] keeps the multiplier for the ith dev
|
* value of esFMult[i] keeps the multiplier for the ith dev
|
||||||
|
|
@ -174,31 +179,8 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
#define DEV_KILLED ((float) -1.0)
|
#define DEV_KILLED ((float) -1.0)
|
||||||
#define FMULT_SIZE (1<<10)
|
#define FMULT_SIZE (1<<10)
|
||||||
|
|
||||||
#define devIsKilled(n) ( esFMult[(n)] <=(float)0.0 )
|
|
||||||
|
|
||||||
#define DEV_KILLED ((float) -1.0)
|
#define DEV_KILLED ((float) -1.0)
|
||||||
|
|
||||||
|
|
||||||
/* macro to add a dev's multiplier to the table and grow it if necessary */
|
|
||||||
#define addDevMult(f) \
|
|
||||||
{ \
|
|
||||||
if ( esFMult == NULL ) { \
|
|
||||||
esFMult = (float *) mallocMagic((unsigned) (esFMSize*sizeof(float))); \
|
|
||||||
} else if ( esFMIndex >= esFMSize ) { \
|
|
||||||
int i; \
|
|
||||||
float *op = esFMult ; \
|
|
||||||
esFMult = (float *) mallocMagic((unsigned) ((esFMSize = esFMSize*2)*sizeof(float))); \
|
|
||||||
for ( i = 0 ; i < esFMSize/2 ; i++ ) esFMult[i] = op[i]; \
|
|
||||||
if (op) freeMagic(op); \
|
|
||||||
} \
|
|
||||||
esFMult[esFMIndex++] = (float)(f); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define setDevMult(i,f) { esFMult[(i)] = (float)(f); }
|
|
||||||
|
|
||||||
#define getCurDevMult() ((esFMult && (esFMIndex > 0)) ? esFMult[esFMIndex-1] : (float)1.0)
|
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
#ifdef MAGIC_WRAPPER
|
||||||
#define atoCap(s) ((EFCapValue)atof(s))
|
#define atoCap(s) ((EFCapValue)atof(s))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1018,14 +1018,23 @@ efFlatSingleCap(hc, name1, name2, conn)
|
||||||
EFNode *n1, *n2;
|
EFNode *n1, *n2;
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
EFCoupleKey ck;
|
EFCoupleKey ck;
|
||||||
|
static char msg0[] = "cap(1)";
|
||||||
|
static char msg1[] = "cap(2)";
|
||||||
|
char *msg;
|
||||||
|
|
||||||
if ((he = EFHNLook(hc->hc_hierName, name1, "cap(1)")) == NULL)
|
/* Connections that are below threshold (ext2spice hierarchy only) */
|
||||||
|
/* will be missing. Do not generate errors for these. */
|
||||||
|
|
||||||
|
msg = (fabs((double)conn->conn_cap / 1000) < EFCapThreshold) ? NULL : msg0;
|
||||||
|
|
||||||
|
if ((he = EFHNLook(hc->hc_hierName, name1, msg)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
n1 = ((EFNodeName *) HashGetValue(he))->efnn_node;
|
n1 = ((EFNodeName *) HashGetValue(he))->efnn_node;
|
||||||
if (n1->efnode_flags & EF_KILLED)
|
if (n1->efnode_flags & EF_KILLED)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((he = EFHNLook(hc->hc_hierName, name2, "cap(2)")) == NULL)
|
if (msg) msg = msg1;
|
||||||
|
if ((he = EFHNLook(hc->hc_hierName, name2, msg)) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
n2 = ((EFNodeName *) HashGetValue(he))->efnn_node;
|
n2 = ((EFNodeName *) HashGetValue(he))->efnn_node;
|
||||||
if (n2->efnode_flags & EF_KILLED)
|
if (n2->efnode_flags & EF_KILLED)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue