Extended the use of attribute labels to allow gate attributes to
specify additional parameters for a device. Any gate attribute (label ending with "^") that has an "=" in it is considered a parameter, and is output with the device in the .ext file. This gives a way to add specific parameters to a device, which otherwise have no meaning to the layout editor. Note that prior to this extension, the gate attribute was used only to set the device index. If a gate attribute is made for a device index, it cannot have "=" in the name, so it remains backwardly compatible. Only non-parameter attributes are passed on to ext2spice.
This commit is contained in:
parent
2d5c4be6dd
commit
37db9e453b
|
|
@ -1835,6 +1835,8 @@ extOutputDevParams(reg, devptr, outFile, length, width, areavec, perimvec)
|
|||
ParamList *chkParam;
|
||||
HashEntry *he;
|
||||
ResValue resvalue;
|
||||
LabRegion *node; /* Node connected to gate terminal */
|
||||
LabelList *ll; /* Gate's label list */
|
||||
|
||||
for (chkParam = devptr->exts_deviceParams; chkParam
|
||||
!= NULL; chkParam = chkParam->pl_next)
|
||||
|
|
@ -1966,6 +1968,34 @@ extOutputDevParams(reg, devptr, outFile, length, width, areavec, perimvec)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If there are device attribute labels (labels attached to the device
|
||||
* type ending with "^") with "=" in them, then treat them as extra
|
||||
* parameters. Output each one and remove the gate attribute property
|
||||
* from the label.
|
||||
*/
|
||||
|
||||
node = (LabRegion *)ExtGetRegion(reg->treg_tile, reg->treg_dinfo);
|
||||
for (ll = node->lreg_labels; ll; ll = ll->ll_next)
|
||||
{
|
||||
if (ll->ll_attr == LL_GATEATTR)
|
||||
{
|
||||
char cs, *ct, *cp = ll->ll_label->lab_text;
|
||||
if (strchr(cp, '=') != NULL)
|
||||
{
|
||||
/* Since this is an attribute label, it has a special character
|
||||
* at the end, which needs to be stripped off while printing
|
||||
* and then put back again.
|
||||
*/
|
||||
ct = ll->ll_label->lab_text + strlen(ll->ll_label->lab_text) - 1;
|
||||
cs = *ct;
|
||||
*ct = '\0';
|
||||
fprintf(outFile, " %s", ll->ll_label->lab_text);
|
||||
ll->ll_attr = LL_NOATTR;
|
||||
*ct = cs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Structures used by extTermAPFunc() for storing area and perimeter data */
|
||||
|
|
|
|||
Loading…
Reference in New Issue