When adding 'set soacheck' to spinit or .spiceinit,

a line '.param SWSOA=1' is added near the top of the netlist,
if not set, '.param SWSOA=0' is added.
'set soacheck' must be given in spinit or .spiceinit. Setting
it in a .control section is too late, as parameters are already
evaluated. Using the command 'option' would be too late as well.
This commit is contained in:
Holger Vogt 2025-07-22 15:42:10 +02:00
parent def0cf8092
commit 3e37603abb
1 changed files with 5 additions and 0 deletions

View File

@ -1880,6 +1880,11 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name
comfile = TRUE;
if (call_depth == 0 && !comfile) {
if (cp_getvar("soacheck", CP_BOOL, NULL, 0))
insert_new_line(cc, copy(".param SWSOA=1"), 1, 0, "internal");
else
insert_new_line(cc, copy(".param SWSOA=0"), 1, 0, "internal");
if (!cp_getvar("no_auto_gnd", CP_BOOL, NULL, 0))
insert_new_line(cc, copy(".global gnd"), 1, 0, "internal");
else