acsp symbol added.

This commit is contained in:
Árpád Bűrmen 2026-04-07 09:58:04 +02:00
parent ad6bdfe61f
commit 68359d9ceb
4 changed files with 90 additions and 3 deletions

View File

@ -38,6 +38,7 @@ The following analyses are supported
|ac.sym |small signal ac |ac |ac |
|acxf.sym |small signal ac transfer function |acxf |- |
|acstb.sym |small signal ac stability |acstb |- |
|acsp.sym |small signal ac S-parameters |acsp |- |
|noise.sym |small signal noise |noise |noise |
|tran.sym |transient |tran |tran |
|hb.sym |harmonc balance |hb |- |

View File

@ -0,0 +1,53 @@
v {xschem version=3.4.8RC file_version=1.3
*
* Analyses library for visual circuit analysis setup.
* Copyright (C) 2025 Arpad Buermen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
}
G {}
K {type=netlist_command_analysis_acsp
template="name=acsp1
only_toplevel=false
order=\\"\\"
sweep=\\"\\"
ports=\\"[\\\\\\"v1\\\\\\",\\\\\\"r1\\\\\\"]\\"
from="10"
to="100k"
step=\\"\\"
mode=\\"\\\\\\"dec\\\\\\"\\"
points=\\"10\\"
values=\\"\\"
nodeset=\\"\\"
store=\\"\\"
write=\\"\\"
writeop=\\"\\"
"}
V {}
S {}
F {}
E {}
L 4 0 -30 140 -30 {}
L 4 0 -30 0 30 {}
L 4 140 -30 140 30 {}
L 4 0 30 140 30 {}
L 4 10 40 150 40 {}
L 4 150 -10 150 40 {}
L 4 10 30 10 40 {}
L 4 140 -10 150 -10 {}
T {@name} 5 -50 0 0 0.3 0.3 {}
T {AC SP} 5 -20 0 0 0.3 0.3 {}
T {tcleval([ ::analyses::display_acsp @name ])} 5 50 0 0 0.3 0.3 {}
T {tcleval([ ::analyses::display_order @name ])} 5 0 0 0 0.3 0.3 {}

View File

@ -160,7 +160,7 @@ writeop=""
}
C {noise.sym} 1190 1120 0 0 {name=noise1
only_toplevel=false
order="10"
order="11"
sweep=""
outp="\\"out\\""
outn=""
@ -179,7 +179,7 @@ writeop=""
}
C {hb.sym} 1190 1370 0 0 {name=hb1
only_toplevel=false
order="11"
order="12"
sweep=""
freq=[100k]
nharm=10
@ -196,7 +196,7 @@ write=""
}
C {postproc.sym} 1190 1560 0 0 {name=postproc1
only_toplevel=false
order="12"
order="20"
tool="PYTHON"
file="\\"script.py\\""
}
@ -227,3 +227,19 @@ store=""
write=""
writeop=""
}
C {acsp.sym} 960 1530 0 0 {name=acsp1
only_toplevel=false
order="10"
sweep=""
ports="[\\"v1\\", \\"r1\\"]"
from=10
to=100k
step=""
mode="\\"dec\\""
points="10"
values=""
nodeset=""
store=""
write=""
writeop=""
}

View File

@ -169,6 +169,12 @@ proc display_acstb {symname} {
return [format_props $symname $names]
}
# Display ACSP analysis
proc display_acsp {symname} {
set names [list sweep N ports N from N to N step N mode N points N values N nodeset SG store N write N writeop N]
return [format_props $symname $names]
}
# Display NOISE analysis
proc display_noise {symname} {
set names [list sweep N outp N outn N in N from N to N step N mode N points N values N ptssum N nodeset SG store N write N writeop N]
@ -398,6 +404,13 @@ proc format_analysis_acstb_spectre {name} {
return [list "analysis $name acstb [parenthesize $args]" ""]
}
proc format_analysis_acsp_spectre {name} {
set args "[format_args $name [list ports N]] "
append args "[format_sweep_spectre_range $name] "
append args [format_args $name [list nodeset N store N write N writeop N]]
return [list "analysis $name acsp [parenthesize $args]" ""]
}
proc format_analysis_noise_spectre {name} {
set args "out=[format_signal_output_spectre $name] "
append args "[format_args $name [list in N]] "
@ -602,6 +615,10 @@ proc format_analysis_acstb_spice {name} {
error "acstb is not supported by Ngspice"
}
proc format_analysis_acsp_spice {name} {
error "acsp is not supported by Ngspice"
}
proc format_analysis_noise_spice {name} {
set output "[format_signal_output_spice $name]"
set swp "[format_sweep_spice_range true $name]"