fix ngspice_backannotate.tcl: correctly backannotate ammeter currents; correctly handle multipoint Operating point data in graphs
This commit is contained in:
parent
3b0589d2d1
commit
7a0b5f3589
|
|
@ -203,7 +203,7 @@ proc ngspice::annotate {} {
|
|||
}
|
||||
}
|
||||
if { $type eq {current_probe} } {
|
||||
if {[catch {xschem setprop $i instance current [ngspice::get_curr_probe arr $path$name] fast} err]} {
|
||||
if {[catch {xschem setprop instance $i current [ngspice::get_curr_probe arr $path$name] fast} err]} {
|
||||
puts "Warning 2: $err"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,7 +356,8 @@ static int read_dataset(FILE *fd)
|
|||
/* multi-point OP is equivalent to a DC sweep. Change xctx->graph_sim_type */
|
||||
if(xctx->graph_npoints[xctx->graph_datasets] > 1 && xctx->graph_sim_type == 4 ) {
|
||||
xctx->graph_sim_type = 2;
|
||||
}
|
||||
} else if(xctx->graph_sim_type == 4) xctx->graph_sim_type = 0;
|
||||
|
||||
done_points = 1;
|
||||
}
|
||||
else if(!strncmp(line, "No. Variables:", 14)) {
|
||||
|
|
@ -370,7 +371,7 @@ static int read_dataset(FILE *fd)
|
|||
/* multi-point OP is equivalent to a DC sweep. Change xctx->graph_sim_type */
|
||||
if(xctx->graph_npoints[xctx->graph_datasets] > 1 && xctx->graph_sim_type == 4 ) {
|
||||
xctx->graph_sim_type = 2;
|
||||
}
|
||||
} else if(xctx->graph_sim_type == 4) xctx->graph_sim_type = 0;
|
||||
}
|
||||
if(!done_header && variables) {
|
||||
/* get the list of lines with index and node name */
|
||||
|
|
|
|||
|
|
@ -1612,6 +1612,10 @@ proc graph_edit_properties {n} {
|
|||
set graph_schname [xschem get schname]
|
||||
set_ne graph_sel_color 4
|
||||
set_ne graph_sort 0
|
||||
set graph_logx 0
|
||||
if {[xschem getprop rect 2 $n logx] == 1} {set graph_logx 1}
|
||||
set graph_logy 0
|
||||
if {[xschem getprop rect 2 $n logy] == 1} {set graph_logy 1}
|
||||
set graph_digital 0
|
||||
if {[xschem getprop rect 2 $n digital] == 1} {set graph_digital 1}
|
||||
if {[regexp {unlocked} [xschem getprop rect 2 $n flags]]} {
|
||||
|
|
@ -1623,6 +1627,7 @@ proc graph_edit_properties {n} {
|
|||
frame .graphdialog.top
|
||||
# another row of buttons
|
||||
frame .graphdialog.top2
|
||||
frame .graphdialog.top3
|
||||
panedwindow .graphdialog.center -orient horiz
|
||||
frame .graphdialog.bottom
|
||||
frame .graphdialog.center.left
|
||||
|
|
@ -1630,6 +1635,7 @@ proc graph_edit_properties {n} {
|
|||
.graphdialog.center add .graphdialog.center.left .graphdialog.center.right
|
||||
pack .graphdialog.top -side top -fill x
|
||||
pack .graphdialog.top2 -side top -fill x
|
||||
pack .graphdialog.top3 -side top -fill x
|
||||
pack .graphdialog.center -side top -fill both -expand yes
|
||||
pack .graphdialog.bottom -side top -fill x
|
||||
|
||||
|
|
@ -1847,6 +1853,23 @@ proc graph_edit_properties {n} {
|
|||
.graphdialog.top.min insert 0 [xschem getprop rect 2 $graph_selected y1]
|
||||
.graphdialog.top.max insert 0 [xschem getprop rect 2 $graph_selected y2]
|
||||
|
||||
# top3 frame
|
||||
checkbutton .graphdialog.top3.logx -padx 2 -text {Log X scale} -variable graph_logx \
|
||||
-command {
|
||||
if { [xschem get schname] eq $graph_schname } {
|
||||
xschem setprop rect 2 $graph_selected logx $graph_logx fast
|
||||
xschem draw_graph $graph_selected
|
||||
}
|
||||
}
|
||||
|
||||
checkbutton .graphdialog.top3.logy -text {Log Y scale} -variable graph_logy \
|
||||
-command {
|
||||
if { [xschem get schname] eq $graph_schname } {
|
||||
xschem setprop rect 2 $graph_selected logy $graph_logy fast
|
||||
xschem draw_graph $graph_selected
|
||||
}
|
||||
}
|
||||
pack .graphdialog.top3.logx .graphdialog.top3.logy -side left
|
||||
# binding
|
||||
bind .graphdialog.top.search <KeyRelease> {
|
||||
fill_graph_listbox
|
||||
|
|
@ -4548,7 +4571,7 @@ set tctx::global_list {
|
|||
edit_prop_pos edit_prop_size editprop_sympath edit_symbol_prop_new_sel enable_dim_bg enable_stretch
|
||||
en_hilight_conn_inst filetmp
|
||||
flat_netlist fullscreen gaw_fd gaw_tcp_address globfilter
|
||||
graph_bus graph_digital
|
||||
graph_bus graph_digital graph_logx graph_logy
|
||||
graph_sel_color graph_schname graph_selected graph_sel_wave graph_sort
|
||||
graph_unlocked
|
||||
hide_empty_graphs hide_symbols hsize hspice_netlist
|
||||
|
|
@ -5567,6 +5590,8 @@ set_ne to_pdf {ps2pdf}
|
|||
|
||||
# selected graph user is editing attributes with graph GUI
|
||||
set_ne graph_bus 0
|
||||
set_ne graph_logx 0
|
||||
set_ne graph_logy 0
|
||||
set_ne graph_selected {}
|
||||
set_ne graph_schname {}
|
||||
# user clicked this wave
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
v {xschem version=3.0.0 file_version=1.2 }
|
||||
v {xschem version=3.1.0 file_version=1.2 }
|
||||
G {}
|
||||
K {}
|
||||
V {}
|
||||
|
|
@ -61,7 +61,6 @@ N 240 -160 260 -160 {lab=0}
|
|||
N 690 -460 690 -380 { lab=DIFFOUT}
|
||||
N 500 -460 500 -380 { lab=G}
|
||||
N 570 -260 570 -250 { lab=#net1}
|
||||
N 690 -380 690 -320 { lab=DIFFOUT}
|
||||
N 500 -380 500 -320 { lab=G}
|
||||
N 570 -250 570 -190 { lab=#net1}
|
||||
C {lab_pin.sym} 750 -360 0 0 {name=p20 lab=0 net_name=true}
|
||||
|
|
@ -1504,3 +1503,4 @@ AAAAAAAUQAAAAAAAAAAAsNOBK6VIGr83mZmZmZkFQAAAAAAAAAAALEMc6+I2Gj8ulnI1PmwuPwAAAAAA
|
|||
qATYwoHxPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPMYWeXiNho/AAAAAAAAAAAAAAAAAAAAAH/C5o3VGEA/AAAAAAAAAABoaaYTROgVPwAAAAAAAAAAAAAAAAAAAADz
|
||||
CM4WDmYpPwAAAAAAAAAAgcd9hMKB8T4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLuyUYROgVPwAAAAAAAAAAAAAAAAAAAADEUmEID4QTQIWFPStEFwhAgE0obp729D8A
|
||||
AAAAAAAEQK/MmE1vlvc/N5mZmZmZBUAAAAAAAAAAAAAAAAAAABRAAAAAAAAAAADsyD76tEgavw=="}
|
||||
C {ammeter.sym} 690 -350 0 1 {name=Vmeas}
|
||||
|
|
|
|||
Loading…
Reference in New Issue