spectre_netlist: do not print "paramaters ..." line in subcircuit if there are no parameters (parameter keyword with no parameter list is a syntax error)

This commit is contained in:
stefan schippers 2026-03-07 22:43:08 +01:00
parent 0a7cef0c9d
commit 43e50ff031
1 changed files with 4 additions and 1 deletions

View File

@ -575,7 +575,10 @@ int spectre_block_netlist(FILE *fd, int i, int alert)
*/
/* 20081206 new get_sym_template does not return token=value pairs where token listed in extra */
fprintf(fd, "\nparameters %s", get_sym_template(xctx->sym[i].templ, extra));
s = get_sym_template(xctx->sym[i].templ, extra);
if(s && s[0] && strchr(s, '=')) {
fprintf(fd, "\nparameters %s", get_sym_template(xctx->sym[i].templ, extra));
}
my_free(_ALLOC_ID_, &extra);
fprintf(fd, "\n");