Merge branch 'master' into netgen-1.5
This commit is contained in:
commit
ad05d059c7
|
|
@ -5841,21 +5841,20 @@ int ResolveAutomorphsByProperty()
|
|||
/*
|
||||
*-------------------------------------------------------------------------
|
||||
*
|
||||
* ResolveAutormorphisms --
|
||||
* ResolveElementAutomorphisms --
|
||||
*
|
||||
* Arbitrarily equivalence one pair of elements within an automorphic class
|
||||
* Apply arbitrary symmetry breaking to symmetric element lists, then
|
||||
* iterate exhaustively to resolve all automorphisms.
|
||||
*
|
||||
* Return value is the same as VerifyMatching()
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int ResolveAutomorphisms()
|
||||
int ResolveElementAutomorphisms()
|
||||
{
|
||||
struct ElementClass *EC;
|
||||
struct NodeClass *NC;
|
||||
struct Element *E;
|
||||
struct Node *N;
|
||||
int C1, C2;
|
||||
|
||||
for (EC = ElementClasses; EC != NULL; EC = EC->next) {
|
||||
|
|
@ -5882,7 +5881,7 @@ int ResolveAutomorphisms()
|
|||
/* convergence, and repeat. */
|
||||
|
||||
E1 = E2 = EC->elements;
|
||||
while (E1 != NULL) {
|
||||
while (E1 != NULL && E2 != NULL) {
|
||||
while (E1->graph != Circuit1->file) E1 = E1->next;
|
||||
while (E2->graph != Circuit2->file) E2 = E2->next;
|
||||
Magic(newhash);
|
||||
|
|
@ -5891,10 +5890,38 @@ int ResolveAutomorphisms()
|
|||
E1 = E1->next;
|
||||
E2 = E2->next;
|
||||
}
|
||||
goto converge;
|
||||
}
|
||||
}
|
||||
|
||||
FractureElementClass(&ElementClasses);
|
||||
FractureNodeClass(&NodeClasses);
|
||||
ExhaustiveSubdivision = 1;
|
||||
while (!Iterate() && VerifyMatching() != -1);
|
||||
return(VerifyMatching());
|
||||
}
|
||||
|
||||
/*
|
||||
*-------------------------------------------------------------------------
|
||||
*
|
||||
* ResolveNodeAutomorphisms --
|
||||
*
|
||||
* Apply arbitrary symmetry breaking to symmetric node lists, then iterate
|
||||
* exhaustively to resolve all automorphisms. Normally, all automorphisms
|
||||
* should be resolved by ResolveElementAutomorphisms(). It is likely true
|
||||
* that this routine will never run, by definition.
|
||||
*
|
||||
* Return value is the same as VerifyMatching()
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*
|
||||
*/
|
||||
|
||||
int ResolveNodeAutomorphisms()
|
||||
{
|
||||
struct Node *N;
|
||||
struct NodeClass *NC;
|
||||
int C1, C2;
|
||||
|
||||
for (NC = NodeClasses; NC != NULL; NC = NC->next) {
|
||||
struct Node *N1, *N2;
|
||||
C1 = C2 = 0;
|
||||
|
|
@ -5919,7 +5946,7 @@ int ResolveAutomorphisms()
|
|||
/* convergence, and repeat. */
|
||||
|
||||
N1 = N2 = NC->nodes;
|
||||
while (N1 != NULL) {
|
||||
while (N1 != NULL && N2 != NULL) {
|
||||
while (N1->graph != Circuit1->file) N1 = N1->next;
|
||||
while (N2->graph != Circuit2->file) N2 = N2->next;
|
||||
Magic(newhash);
|
||||
|
|
@ -5928,11 +5955,9 @@ int ResolveAutomorphisms()
|
|||
N1 = N1->next;
|
||||
N2 = N2->next;
|
||||
}
|
||||
goto converge;
|
||||
}
|
||||
}
|
||||
|
||||
converge:
|
||||
FractureElementClass(&ElementClasses);
|
||||
FractureNodeClass(&NodeClasses);
|
||||
ExhaustiveSubdivision = 1;
|
||||
|
|
@ -5940,6 +5965,29 @@ int ResolveAutomorphisms()
|
|||
return(VerifyMatching());
|
||||
}
|
||||
|
||||
/*
|
||||
*-------------------------------------------------------------------------
|
||||
*
|
||||
* ResolveAutormorphisms --
|
||||
*
|
||||
* Arbitrarily equivalence one pair of elements within an automorphic class
|
||||
*
|
||||
* Return value is the same as VerifyMatching()
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int ResolveAutomorphisms()
|
||||
{
|
||||
int result;
|
||||
|
||||
result = ResolveElementAutomorphisms();
|
||||
if (result != 0)
|
||||
result = ResolveNodeAutomorphisms();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------*/
|
||||
/* PermuteSetup -- */
|
||||
/* Add an entry to a cell's "permutes" linked list. */
|
||||
|
|
@ -6644,7 +6692,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
struct NodeClass *NC;
|
||||
struct Node *N1, *N2;
|
||||
int i, j, k, m, a, b, swapped, numnodes, numorig;
|
||||
int result = 1, haspins = 0;
|
||||
int result = 1, haspins = 0, notempty = 0;
|
||||
int hasproxy1 = 0, hasproxy2 = 0;
|
||||
int needclean1 = 0, needclean2 = 0;
|
||||
char *ostr;
|
||||
|
|
@ -6809,12 +6857,15 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
/* has been left orphaned after flattening. If */
|
||||
/* disconnected, set its node number to -2. */
|
||||
|
||||
notempty = 0;
|
||||
for (obt = ob1->next; obt; obt = obt->next) {
|
||||
if (obt->type >= FIRSTPIN)
|
||||
if (obt->type >= FIRSTPIN) {
|
||||
notempty = 1;
|
||||
if (obt->node == ob1->node)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (obt == NULL) {
|
||||
if ((obt == NULL) && (notempty == 1)) {
|
||||
ob1->node = -2; // Will run this through cleanuppins
|
||||
needclean1 = 1;
|
||||
}
|
||||
|
|
@ -6913,7 +6964,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
/* Find the end of the pin list in tc1, for adding proxy pins */
|
||||
|
||||
for (ob1 = tc1->cell; ob1 != NULL; ob1 = ob1->next) {
|
||||
if (ob1 && ob1->next && ob1->next->type != PORT)
|
||||
if (ob1 && ((ob1->next && ob1->next->type != PORT) || ob1->next == NULL))
|
||||
break;
|
||||
}
|
||||
if (ob1 == NULL) ob1 = tc1->cell; /* No ports */
|
||||
|
|
@ -6956,12 +7007,15 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
/* flattening instances has left a port with a */
|
||||
/* net number that doesn't connect to anything */
|
||||
|
||||
notempty = 0;
|
||||
for (obt = ob2->next; obt; obt = obt->next) {
|
||||
if (obt->type >= FIRSTPIN)
|
||||
if (obt->type >= FIRSTPIN) {
|
||||
notempty = 1;
|
||||
if (obt->node == ob2->node)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (obt == NULL) {
|
||||
if ((obt == NULL) && (notempty == 1)) {
|
||||
ob2->node = -2; // Will run this through cleanuppins
|
||||
needclean2 = 1;
|
||||
continue;
|
||||
|
|
@ -6999,7 +7053,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
/* Find the end of the pin list in tc2, for adding proxy pins */
|
||||
|
||||
for (ob2 = tc2->cell; ob2 != NULL; ob2 = ob2->next) {
|
||||
if (ob2 && ob2->next && ob2->next->type != PORT)
|
||||
if (ob2 && ((ob2->next && ob2->next->type != PORT) || ob2->next == NULL))
|
||||
break;
|
||||
}
|
||||
if (ob2 == NULL) ob2 = tc2->cell; /* No ports */
|
||||
|
|
@ -7030,7 +7084,8 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
|
|||
if (obn == NULL) ob1->node = -1; /* Make disconnected */
|
||||
}
|
||||
|
||||
if (ob1 == NULL || ob1->type != PORT || ob1->node >= 0) {
|
||||
if (ob1 == NULL || ob1->type != PORT || ob1->node >= 0
|
||||
|| (ob1->node < 0 && tc1->class == CLASS_MODULE)) {
|
||||
|
||||
/* Add a proxy pin to tc2 */
|
||||
obn = (struct objlist *)CALLOC(1, sizeof(struct objlist));
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ static struct hashdict cell_dict;
|
|||
void InitCellHashTable(void)
|
||||
{
|
||||
hashfunc = hash;
|
||||
matchfunc = match;
|
||||
matchfunc = NULL;
|
||||
matchintfunc = matchfile;
|
||||
InitializeHashTable(&cell_dict, CELLHASHSIZE);
|
||||
}
|
||||
|
|
|
|||
17
base/spice.c
17
base/spice.c
|
|
@ -1900,10 +1900,19 @@ char *ReadSpiceTop(char *fname, int *fnum, int blackbox)
|
|||
}
|
||||
}
|
||||
|
||||
/* Make sure all SPICE file reading is case insensitive */
|
||||
matchfunc = matchnocase;
|
||||
matchintfunc = matchfilenocase;
|
||||
hashfunc = hashnocase;
|
||||
/* Make sure all SPICE file reading is case insensitive */
|
||||
/* BUT if a verilog file was read before it, then it will */
|
||||
/* be forced to be case sensitive, caveat end-user. */
|
||||
|
||||
if (matchfunc == match) {
|
||||
Printf("Warning: A case-sensitive file has been read and so the "
|
||||
"SPICE netlist must be treated case-sensitive to match.\n");
|
||||
}
|
||||
else {
|
||||
matchfunc = matchnocase;
|
||||
matchintfunc = matchfilenocase;
|
||||
hashfunc = hashnocase;
|
||||
}
|
||||
|
||||
InitializeHashTable(&spiceparams, OBJHASHSIZE);
|
||||
|
||||
|
|
|
|||
|
|
@ -2094,6 +2094,11 @@ char *ReadVerilogTop(char *fname, int *fnum, int blackbox)
|
|||
Printf("Warning: A case-insensitive file has been read and so the "
|
||||
"verilog file must be treated case-insensitive to match.\n");
|
||||
}
|
||||
else {
|
||||
matchfunc = match;
|
||||
matchintfunc = matchfile;
|
||||
hashfunc = hash;
|
||||
}
|
||||
|
||||
InitializeHashTable(&verilogparams, OBJHASHSIZE);
|
||||
InitializeHashTable(&verilogdefs, OBJHASHSIZE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue