fix a bug when loading multiple AC sim datasets (wrong nvars calculation, has to be doubled due to Im/Re complex components)

This commit is contained in:
stefan schippers 2022-12-20 01:01:58 +01:00
parent 2cb58c5c5c
commit 9fa05afad9
3 changed files with 6 additions and 4 deletions

View File

@ -398,13 +398,13 @@ static int read_dataset(FILE *fd, const char *type)
n = sscanf(line, "No. Variables: %d", &nvars);
dbg(dbglev, "read_dataset(): nvars=%d\n", nvars);
if(ac) nvars <<= 1;
if(xctx->graph_datasets > 0 && xctx->graph_nvars != nvars && xctx->graph_sim_type) {
dbg(0, "Xschem requires all datasets to be saved with identical and same number of variables\n");
dbg(0, "There is a mismatch, so this and following datasets will not be read\n");
return 1;
}
if(ac) nvars <<= 1;
if(n < 1) {
dbg(0, "read_dataset(): WAARNING: malformed raw file, aborting\n");
free_rawfile(0);

View File

@ -20,7 +20,7 @@ subdivx=8
node="\\"diffout db20()\\""
color=4
unitx=M
unitx=1
divx=10
logx=1

View File

@ -1,9 +1,11 @@
v {xschem version=2.9.9 file_version=1.2 }
v {xschem version=3.1.0 file_version=1.2
}
G {}
K {type=subcircuit
format="@name @pinlist @symname"
template="name=x1"
}
xschematic="tcleval([ hier_conf @symname ])"
schematic=@symname}
V {}
S {}
E {}