mirror of
https://github.com/RTimothyEdwards/netgen.git
synced 2026-08-22 22:17:22 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edb50746cb | ||
|
|
4443826f9e | ||
|
|
f2368ca223 | ||
|
|
a60dac6124 | ||
|
|
ee93d52a26 | ||
|
|
bbe645f0ab | ||
|
|
ba7004fd5b | ||
|
|
4f315d33d6 | ||
|
|
704bfbc871 | ||
|
|
4457248ecd |
+28
-6
@@ -1217,7 +1217,8 @@ SortFanoutLists(nlist1, nlist2)
|
||||
f2 -= 1;
|
||||
matched[f1] = -1;
|
||||
total++;
|
||||
if (f2 != f1) {
|
||||
if ((f2 != f1) && (nlist2->flist[f1].permute != 0) &&
|
||||
(nlist2->flist[f2].permute != 0)) {
|
||||
temp = nlist2->flist[f2];
|
||||
nlist2->flist[f2] = nlist2->flist[f1];
|
||||
nlist2->flist[f1] = temp;
|
||||
@@ -1251,7 +1252,8 @@ SortFanoutLists(nlist1, nlist2)
|
||||
f1 -= 1;
|
||||
matched[f2] = -1;
|
||||
total++;
|
||||
if (f1 != f2) {
|
||||
if ((f1 != f2) && (nlist1->flist[f1].permute != 0) &&
|
||||
(nlist1->flist[f2].permute != 0)) {
|
||||
temp = nlist1->flist[f1];
|
||||
nlist1->flist[f1] = nlist1->flist[f2];
|
||||
nlist1->flist[f2] = temp;
|
||||
@@ -6053,6 +6055,9 @@ PropertyMatch(struct Element *E1, struct Element *E2,
|
||||
#endif
|
||||
}
|
||||
|
||||
obn1 = ob1->next;
|
||||
obn2 = ob2->next;
|
||||
|
||||
/* Find the first property record of each circuit. obn1, obn2 are */
|
||||
/* the last device record before the properties for each device. */
|
||||
for (tp1 = ob1->next; (tp1 != NULL) && tp1->type > FIRSTPIN; tp1 = tp1->next)
|
||||
@@ -7013,10 +7018,21 @@ int Permute()
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* update magic numbers */
|
||||
for (NL = E->nodelist; NL != NULL; NL = NL->next)
|
||||
if (NL->pin_magic == one)
|
||||
NL->pin_magic = two;
|
||||
/* Update magic numbers. To ensure that this works */
|
||||
/* regardless of the pin order of the pins in each */
|
||||
/* netlist, always set both pins to the larger of */
|
||||
/* the two pin_magic values. */
|
||||
|
||||
if (one > two) {
|
||||
for (NL = E->nodelist; NL != NULL; NL = NL->next)
|
||||
if (NL->pin_magic == two)
|
||||
NL->pin_magic = one;
|
||||
}
|
||||
else {
|
||||
for (NL = E->nodelist; NL != NULL; NL = NL->next)
|
||||
if (NL->pin_magic == one)
|
||||
NL->pin_magic = two;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7514,6 +7530,12 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata)
|
||||
else {
|
||||
lob = ob;
|
||||
ob->type = i++;
|
||||
if (ob->model.class == NULL) {
|
||||
ob->model.class = strsave(tc->name);
|
||||
}
|
||||
if (ob->instance.name == NULL) {
|
||||
ob->instance.name = strsave(firstpin->instance.name);
|
||||
}
|
||||
ob = ob->next;
|
||||
}
|
||||
tob = tob->next;
|
||||
|
||||
+14
-3
@@ -599,7 +599,7 @@ void SpiceTokNoNewline(void)
|
||||
{
|
||||
int contline;
|
||||
|
||||
if ((nexttok = strdtok(NULL, WHITESPACE_DELIMITER, NULL)) != NULL) return;
|
||||
if ((nexttok = strdtok0(NULL, WHITESPACE_DELIMITER, NULL, FALSE)) != NULL) return;
|
||||
|
||||
while (nexttok == NULL) {
|
||||
contline = getc(infile);
|
||||
@@ -701,7 +701,7 @@ void SpiceSkipNewLine(void)
|
||||
/* the boundary between two-character and one-character delimiters. */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
char *strdtok(char *pstring, char *delim1, char *delim2)
|
||||
char *strdtok0(char *pstring, char *delim1, char *delim2, char isverilog)
|
||||
{
|
||||
static char *stoken = NULL;
|
||||
static char *sstring = NULL;
|
||||
@@ -746,7 +746,7 @@ char *strdtok(char *pstring, char *delim1, char *delim2)
|
||||
/* should know whether it is parsing SPICE or verilog and handle the syntax */
|
||||
/* accordingly (needs to be done). */
|
||||
|
||||
if (*s == '\\') {
|
||||
if (isverilog && (*s == '\\')) {
|
||||
s++;
|
||||
while (*s != '\0') {
|
||||
if ((*s == ' ') || ((*s == '\\') && (*(s + 1) == '\0'))) {
|
||||
@@ -817,6 +817,17 @@ char *strdtok(char *pstring, char *delim1, char *delim2)
|
||||
return sstring;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* strdtok() is the original string tokenizer. It calls strdtok0() */
|
||||
/* with isverilog=TRUE, so that tokens are parsed as (potentially) */
|
||||
/* verilog names, which includes verilog backslash notation. */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
char *strdtok(char *pstring, char *delim1, char *delim2)
|
||||
{
|
||||
return strdtok0(pstring, delim1, delim2, TRUE);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
void InputParseError(FILE *f)
|
||||
|
||||
@@ -36,6 +36,7 @@ extern struct hashdict *definitions;
|
||||
|
||||
extern char *nexttok;
|
||||
#define SKIPTO(a) do {SkipTok(NULL);} while (!match(nexttok,a))
|
||||
extern char *strdtok0(char *pstring, char *delim1, char *delim2, char isverilog);
|
||||
extern char *strdtok(char *pstring, char *delim1, char *delim2);
|
||||
extern char *GetLineAtTok();
|
||||
extern void SkipTok(char *delimiter);
|
||||
|
||||
+4
-1
@@ -2248,7 +2248,10 @@ int PromoteProperty(struct property *prop, struct valuelist *vl,
|
||||
if (prop == NULL || vl == NULL) return -1;
|
||||
if (prop->type == vl->type) return 1; /* Nothing to do */
|
||||
result = 0;
|
||||
if (prop->type == PROP_EXPRESSION) {
|
||||
/* If vl is an expression but prop is not, then try to reduce
|
||||
* the expression in vl.
|
||||
*/
|
||||
if (vl->type == PROP_EXPRESSION) {
|
||||
ReduceOneExpression(vl, ob, tc, FALSE);
|
||||
}
|
||||
switch (prop->type) {
|
||||
|
||||
Reference in New Issue
Block a user