Merge branch 'master' into netgen-1.5

This commit is contained in:
Tim Edwards 2025-12-09 02:00:02 -05:00
commit 23b4e19204
3 changed files with 20 additions and 7 deletions

View File

@ -1 +1 @@
1.5.311 1.5.312

View File

@ -7544,6 +7544,11 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata)
} }
else { else {
lob = ob; lob = ob;
if (ob == NULL) {
Fprintf(stdout, "Error: Premature end of pin list on "
"instance %s.\n", firstpin->instance.name);
break;
}
ob->type = i++; ob->type = i++;
ob = ob->next; ob = ob->next;
} }

View File

@ -76,7 +76,8 @@ struct hashdict verilogparams;
// Global storage for verilog definitions // Global storage for verilog definitions
struct hashdict verilogdefs; struct hashdict verilogdefs;
// Record file pointer that is associated with the hash tables // Record file pointer that is associated with the hash tables
int hashfile = -1; int hashfilep = -1; /* for parameters */
int hashfiled = -1; /* for definitions */
// Global storage for wire buses // Global storage for wire buses
struct hashdict buses; struct hashdict buses;
@ -2999,18 +3000,25 @@ char *ReadVerilogTop(char *fname, int *fnum, int blackbox)
hashfunc = hashcase; hashfunc = hashcase;
} }
if ((hashfile != -1) && (hashfile != *fnum)) { if ((hashfilep != -1) && (hashfilep != *fnum)) {
/* Started a new file, so remove all the parameters and definitions */ /* Started a new file, so remove all the parameters */
RecurseHashTable(&verilogparams, freeprop); RecurseHashTable(&verilogparams, freeprop);
HashKill(&verilogparams); HashKill(&verilogparams);
hashfilep = -1;
}
if ((hashfiled != -1) && (hashfiled != *fnum)) {
/* Started a new file, so remove all the definitions */
RecurseHashTable(&verilogdefs, freeprop); RecurseHashTable(&verilogdefs, freeprop);
HashKill(&verilogdefs); HashKill(&verilogdefs);
hashfile = -1; hashfiled = -1;
} }
if (hashfile == -1) { if (hashfilep == -1) {
InitializeHashTable(&verilogparams, OBJHASHSIZE); InitializeHashTable(&verilogparams, OBJHASHSIZE);
hashfilep = filenum;
}
if (hashfiled == -1) {
InitializeHashTable(&verilogdefs, OBJHASHSIZE); InitializeHashTable(&verilogdefs, OBJHASHSIZE);
hashfile = *fnum; hashfiled = filenum;
} }
definitions = &verilogdefs; definitions = &verilogdefs;