Resolved the case mentioned in a prior commit where the case of N
devices in parallel with unconnected pins would be confused with N devices in parallel with those pins all tied together. This is treated as a property error.
This commit is contained in:
parent
f92192efd4
commit
792c5e569a
|
|
@ -193,17 +193,19 @@ void flattenCell(char *name, int file)
|
|||
if (Debug) Printf("Renaming %s to %s\n", tmp->name, tmpstr);
|
||||
FreeString(tmp->name);
|
||||
tmp->name = strsave(tmpstr);
|
||||
#if OLDPREFIX
|
||||
sprintf(tmpstr, "%s%s%s", ParentParams->instance.name, SEPARATOR,
|
||||
tmp->instance.name);
|
||||
#else
|
||||
strcpy(tmpstr+prefixlength,tmp->instance.name);
|
||||
#endif
|
||||
FreeString(tmp->instance.name);
|
||||
tmp->instance.name = strsave(tmpstr);
|
||||
HashPtrInstall(tmp->name, tmp, &(ThisCell->objdict));
|
||||
if (tmp->type == FIRSTPIN)
|
||||
HashPtrInstall(tmp->instance.name, tmp, &(ThisCell->instdict));
|
||||
if ((tmp->type != NODE) && (tmp->instance.name != NULL)) {
|
||||
#if OLDPREFIX
|
||||
sprintf(tmpstr, "%s%s%s", ParentParams->instance.name, SEPARATOR,
|
||||
tmp->instance.name);
|
||||
#else
|
||||
strcpy(tmpstr+prefixlength,tmp->instance.name);
|
||||
#endif
|
||||
FreeString(tmp->instance.name);
|
||||
tmp->instance.name = strsave(tmpstr);
|
||||
if (tmp->type == FIRSTPIN)
|
||||
HashPtrInstall(tmp->instance.name, tmp, &(ThisCell->instdict));
|
||||
}
|
||||
}
|
||||
|
||||
/* splice instance out of parent */
|
||||
|
|
@ -470,17 +472,19 @@ int flattenInstancesOf(char *name, int fnum, char *instance)
|
|||
if (Debug) Printf("Renaming %s to %s\n", tmp->name, tmpstr);
|
||||
FreeString(tmp->name);
|
||||
tmp->name = strsave(tmpstr);
|
||||
#if OLDPREFIX
|
||||
sprintf(tmpstr, "%s%s%s", ParentParams->instance.name, SEPARATOR,
|
||||
tmp->instance.name);
|
||||
#else
|
||||
strcpy(tmpstr+prefixlength,tmp->instance.name);
|
||||
#endif
|
||||
FreeString(tmp->instance.name);
|
||||
tmp->instance.name = strsave(tmpstr);
|
||||
HashPtrInstall(tmp->name, tmp, &(ThisCell->objdict));
|
||||
if (tmp->type == FIRSTPIN)
|
||||
HashPtrInstall(tmp->instance.name, tmp, &(ThisCell->instdict));
|
||||
if ((tmp->type != NODE) && (tmp->instance.name != NULL)) {
|
||||
#if OLDPREFIX
|
||||
sprintf(tmpstr, "%s%s%s", ParentParams->instance.name, SEPARATOR,
|
||||
tmp->instance.name);
|
||||
#else
|
||||
strcpy(tmpstr+prefixlength,tmp->instance.name);
|
||||
#endif
|
||||
FreeString(tmp->instance.name);
|
||||
tmp->instance.name = strsave(tmpstr);
|
||||
if (tmp->type == FIRSTPIN)
|
||||
HashPtrInstall(tmp->instance.name, tmp, &(ThisCell->instdict));
|
||||
}
|
||||
}
|
||||
|
||||
/* Do property inheritance */
|
||||
|
|
|
|||
|
|
@ -5360,6 +5360,32 @@ PropertyMatch(struct objlist *ob1, int file1,
|
|||
#endif
|
||||
}
|
||||
|
||||
/* WIP---Check for no-connect pins in merged devices on both sides. */
|
||||
/* Both sides should either have no-connects marked, or neither. */
|
||||
/* (Permutable pins may need to be handled correctly. . . */
|
||||
for (tp1 = ob1, tp2 = ob2; (tp1 != NULL) && tp1->type >= FIRSTPIN &&
|
||||
(tp2 != NULL) && tp2->type >= FIRSTPIN; tp1 = tp1->next, tp2 = tp2->next)
|
||||
{
|
||||
struct objlist *node1, *node2;
|
||||
|
||||
node1 = Circuit1->nodename_cache[tp1->node];
|
||||
node2 = Circuit2->nodename_cache[tp2->node];
|
||||
|
||||
if (node1->instance.flags != node2->instance.flags)
|
||||
{
|
||||
Fprintf(stdout, " Parallelized instances disagree on pin connections.\n");
|
||||
Fprintf(stdout, " Circuit1 instance %s pin %s connections are %s (%d)\n",
|
||||
tp1->instance.name, node1->name,
|
||||
(node1->instance.flags == 0) ? "tied together" : "no connects",
|
||||
node1->instance.flags);
|
||||
Fprintf(stdout, " Circuit2 instance %s pin %s connections are %s (%d)\n",
|
||||
tp2->instance.name, node2->name,
|
||||
(node2->instance.flags == 0) ? "tied together" : "no connects",
|
||||
node2->instance.flags);
|
||||
mismatches++;
|
||||
}
|
||||
}
|
||||
|
||||
// Attempt to organize devices by series and parallel combination
|
||||
if (t1type == PROPERTY && t2type == PROPERTY)
|
||||
PropertySortAndCombine(obn1, tc1, obn2, tc2);
|
||||
|
|
|
|||
|
|
@ -1337,7 +1337,7 @@ void Node(char *name)
|
|||
tp->name = strsave(name);
|
||||
tp->type = NODE; /* internal node type */
|
||||
tp->model.class = NULL;
|
||||
tp->instance.name = NULL;
|
||||
tp->instance.flags = 0;
|
||||
tp->node = -1; /* null node */
|
||||
tp->next = NULL;
|
||||
AddToCurrentCell (tp);
|
||||
|
|
@ -3217,7 +3217,11 @@ int CombineParallel(char *model, int file)
|
|||
|
||||
for (ob2 = ob; ob2 && (ob2->type > FIRSTPIN || ob2 == ob); ob2 = ob2->next) {
|
||||
if ((ob2->node >= 0) && (nodecount[ob2->node] == 1))
|
||||
{
|
||||
nob = (tp->nodename_cache)[ob2->node];
|
||||
nob->instance.flags = NO_CONNECT;
|
||||
strcat(pptr, "_nc");
|
||||
}
|
||||
else
|
||||
sprintf(pptr, "_%d", ob2->node);
|
||||
pptr += strlen(pptr);
|
||||
|
|
|
|||
|
|
@ -975,7 +975,10 @@ struct objlist *CopyObjList(struct objlist *oldlist, unsigned char doforall)
|
|||
newob->model.class = NULL;
|
||||
else
|
||||
newob->model.class = strsave(tmp->model.class);
|
||||
newob->instance.name = (tmp->instance.name) ?
|
||||
if (newob->type == NODE)
|
||||
newob->instance.flags = tmp->instance.flags;
|
||||
else
|
||||
newob->instance.name = (tmp->instance.name) ?
|
||||
strsave(tmp->instance.name) : NULL;
|
||||
}
|
||||
newob->node = tmp->node;
|
||||
|
|
@ -1095,8 +1098,8 @@ void FreeObject(struct objlist *ob)
|
|||
FREE(ob->instance.props);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* All other records */
|
||||
else if (ob->type != NODE) {
|
||||
/* All other records except NODE, which uses this for flags */
|
||||
if (ob->instance.name != NULL) FreeString(ob->instance.name);
|
||||
}
|
||||
if (ob->model.class != NULL) FreeString(ob->model.class);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#define PROXY (0) /* Used in model.port record of ports */
|
||||
|
||||
#define NO_CONNECT 1 /* Use in object list to flag an isolated net */
|
||||
|
||||
/* Lists of device properties. Order is defined at the time of */
|
||||
/* the cell definition; values are sorted at the time instances */
|
||||
/* are read. */
|
||||
|
|
@ -160,6 +162,7 @@ struct objlist {
|
|||
union {
|
||||
char *name; /* unique name for the instance, or */
|
||||
/* (string) value of property for properties */
|
||||
int flags; /* Used by NODE type to flag isolated net */
|
||||
struct valuelist *props; /* Property record */
|
||||
} instance;
|
||||
int node; /* the electrical node number of the port/node/pin */
|
||||
|
|
|
|||
Loading…
Reference in New Issue