fixed a bug in analyses library
This commit is contained in:
parent
369fac66a9
commit
bccade18a6
|
|
@ -4,6 +4,7 @@ This library makes it possible to set up simulations in a way similar to that in
|
||||||
|
|
||||||
Each block displays only those attributes that are specified (i.e. the string length is>0). Netlisting is triggered by the `command_block.sym` block. In order for the netlister to generate the control block you have to place it in the schematic exactly once. In order for netlisting and symbol rendering to work you have to source the `analyses.init.tcl` script at Xschem startup by adding the following line to xschemrc.
|
Each block displays only those attributes that are specified (i.e. the string length is>0). Netlisting is triggered by the `command_block.sym` block. In order for the netlister to generate the control block you have to place it in the schematic exactly once. In order for netlisting and symbol rendering to work you have to source the `analyses.init.tcl` script at Xschem startup by adding the following line to xschemrc.
|
||||||
```
|
```
|
||||||
|
append XSCHEM_LIBRARY_PATH :/usr/local/share/doc/xschem/analyses
|
||||||
append postinit_commands {
|
append postinit_commands {
|
||||||
foreach i $pathlist {
|
foreach i $pathlist {
|
||||||
if {![catch {source $i/lib_init.tcl} retval]} {
|
if {![catch {source $i/lib_init.tcl} retval]} {
|
||||||
|
|
|
||||||
|
|
@ -226,12 +226,10 @@ proc netlister {netlist_type} {
|
||||||
try {
|
try {
|
||||||
# Format analysis and post analysis script
|
# Format analysis and post analysis script
|
||||||
set retval [$func $name]
|
set retval [$func $name]
|
||||||
if {[llength $retval] == 2} {
|
# retval has 2 members:
|
||||||
lassign $retval cmd postcmd
|
# - command and
|
||||||
} else {
|
# - post-command (for writing results in ngpice, empty string for spectre)
|
||||||
set cmd $retval
|
lassign $retval cmd postcmd
|
||||||
set postcmd ""
|
|
||||||
}
|
|
||||||
# Format sweep and add it to analysis
|
# Format sweep and add it to analysis
|
||||||
set swcmd [format_sweep_chain_$netlist_type $name $cmd types]
|
set swcmd [format_sweep_chain_$netlist_type $name $cmd types]
|
||||||
# Wrap (swept) analysis and post analysis script in a block
|
# Wrap (swept) analysis and post analysis script in a block
|
||||||
|
|
@ -335,12 +333,12 @@ proc format_verbatim_spectre {name} {
|
||||||
if { !$dump } {
|
if { !$dump } {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return [format_args $name [list verbatim NV]]
|
return [list [format_args $name [list verbatim NV]] ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_op_spectre {name} {
|
proc format_analysis_op_spectre {name} {
|
||||||
set args [format_args $name [list nodeset N store N write N]]
|
set args [format_args $name [list nodeset N store N write N]]
|
||||||
return "analysis $name op [parenthesize $args]"
|
return [list "analysis $name op [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_dc1d_spectre {name} {
|
proc format_analysis_dc1d_spectre {name} {
|
||||||
|
|
@ -349,12 +347,12 @@ proc format_analysis_dc1d_spectre {name} {
|
||||||
set anstr "analysis $name op [parenthesize $args]"
|
set anstr "analysis $name op [parenthesize $args]"
|
||||||
# 1D sweep formatting
|
# 1D sweep formatting
|
||||||
set swp [format_single_sweep_spectre $name]
|
set swp [format_single_sweep_spectre $name]
|
||||||
return "$swp\n $anstr"
|
return [list "$swp\n $anstr" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_dcinc_spectre {name} {
|
proc format_analysis_dcinc_spectre {name} {
|
||||||
set args [format_args $name [list nodeset N store N write N writeop N]]
|
set args [format_args $name [list nodeset N store N write N writeop N]]
|
||||||
return "analysis $name dcinc [parenthesize $args]"
|
return [list "analysis $name dcinc [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_signal_output_spectre {name} {
|
proc format_signal_output_spectre {name} {
|
||||||
|
|
@ -371,20 +369,20 @@ proc format_signal_output_spectre {name} {
|
||||||
proc format_analysis_dcxf_spectre {name} {
|
proc format_analysis_dcxf_spectre {name} {
|
||||||
set args "out=[format_signal_output_spectre $name] "
|
set args "out=[format_signal_output_spectre $name] "
|
||||||
append args [format_args $name [list nodeset N store N write N writeop N]]
|
append args [format_args $name [list nodeset N store N write N writeop N]]
|
||||||
return "analysis $name dcxf [parenthesize $args]"
|
return [list "analysis $name dcxf [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_ac_spectre {name} {
|
proc format_analysis_ac_spectre {name} {
|
||||||
set args "[format_sweep_spectre_range $name] "
|
set args "[format_sweep_spectre_range $name] "
|
||||||
append args [format_args $name [list nodeset N store N write N writeop N]]
|
append args [format_args $name [list nodeset N store N write N writeop N]]
|
||||||
return "analysis $name ac [parenthesize $args]"
|
return [list "analysis $name ac [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_acxf_spectre {name} {
|
proc format_analysis_acxf_spectre {name} {
|
||||||
set args "out=[format_signal_output_spectre $name] "
|
set args "out=[format_signal_output_spectre $name] "
|
||||||
append args "[format_sweep_spectre_range $name] "
|
append args "[format_sweep_spectre_range $name] "
|
||||||
append args [format_args $name [list nodeset N store N write N writeop N]]
|
append args [format_args $name [list nodeset N store N write N writeop N]]
|
||||||
return "analysis $name acxf [parenthesize $args]"
|
return [list "analysis $name acxf [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_noise_spectre {name} {
|
proc format_analysis_noise_spectre {name} {
|
||||||
|
|
@ -392,17 +390,17 @@ proc format_analysis_noise_spectre {name} {
|
||||||
append args "[format_args $name [list in N]] "
|
append args "[format_args $name [list in N]] "
|
||||||
append args "[format_sweep_spectre_range $name] "
|
append args "[format_sweep_spectre_range $name] "
|
||||||
append args [format_args $name [list nodeset N store N write N writeop N]]
|
append args [format_args $name [list nodeset N store N write N writeop N]]
|
||||||
return "analysis $name noise [parenthesize $args]"
|
return [list "analysis $name noise [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_tran_spectre {name} {
|
proc format_analysis_tran_spectre {name} {
|
||||||
set args [format_args $name [list step N stop N start N maxstep N icmode N nodeset N ic N store N write N]]
|
set args [format_args $name [list step N stop N start N maxstep N icmode N nodeset N ic N store N write N]]
|
||||||
return "analysis $name tran [parenthesize $args]"
|
return [list "analysis $name tran [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_analysis_hb_spectre {name} {
|
proc format_analysis_hb_spectre {name} {
|
||||||
set args [format_args $name [list freq N nharm N immax N truncate N samplefac N nper N sample N harmonic N imorder N nodeset N store N write N]]
|
set args [format_args $name [list freq N nharm N immax N truncate N samplefac N nper N sample N harmonic N imorder N nodeset N store N write N]]
|
||||||
return "analysis $name hb [parenthesize $args]"
|
return [list "analysis $name hb [parenthesize $args]" ""]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc format_postprocess_spectre {name} {
|
proc format_postprocess_spectre {name} {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue