Krzysztof Herman
09/28/2023, 2:03 PMWarning from checkvalid: vector y_2_1 is not available or has zero length.
Error: RHS "1/(2*pi*frequency*imag(1/y_2_1))" invalid
Warning from checkvalid: vector y_2_1 is not available or has zero length.
Error: RHS "-real(1/y_2_1)" invalid
binary raw file "sp_mim_cap.raw"
it can be fixed by eliminating the .SAVE I(V1) and .SAVE I(V2) lines in the following code, but I was wondering if there is some switch to prevent generating this commands.
** SP_MIM_CAP flat netlist
1 R1 IN GND 1MEG M=1
2 V1 IN GND DC 0 AC 1 PORTNUM 1 Z0 50
3 .SAVE I(V1)
4 R2 OUT GND 1MEG M=1
5 V2 OUT GND DC 0 AC 0 PORTNUM 2 Z0 50
6 .SAVE I(V2)
7 *--------BEGIN_XC1->CAP_CMIM
8 XC1 OUT IN CAP_CMIM W=1.0E-6 L=1.0E-6 MF=1
9 *--------END___XC1->CAP_CMIM
10 **** BEGIN USER ARCHITECTURE CODE
Stefan Schippers
09/28/2023, 2:13 PMwrite
command with remzerovec
, so in your ngspice commands:
...
remzerovec
write sp_mim_cap.raw
...
Krzysztof Herman
09/28/2023, 2:31 PMStefan Schippers
09/28/2023, 6:15 PMStefan Schippers
09/28/2023, 6:42 PMRseries
and Cseries
.control
save all
sp lin 500 1e8 10e9 0
let Cseries = 1 / (2 * PI * frequency * imag(1/Y_2_1))
let Rseries = -real(1/Y_2_1)
write test_sp_analysis.raw
.endc
Stefan Schippers
09/28/2023, 6:58 PMKrzysztof Herman
09/28/2023, 6:59 PM