allow probing to gaw current in voltage sources in addition to ammeters

This commit is contained in:
Stefan Schippers 2020-10-09 22:19:54 +02:00
parent 19753992f4
commit 4d0a3d8f7c
4 changed files with 39 additions and 8 deletions

View File

@ -1382,15 +1382,15 @@ int callback(int event, int mx, int my, KeySym key,
draw(); draw();
break; break;
} }
if(key=='~' && (state & ControlMask)) /* testmode */ if(0 && key=='~' && (state & ControlMask)) { /* testmode */
{
dbg(0, "test mode\n");
prepared_hilight_structs = 0;
prepared_hash_wires=0;
prepare_netlist_structs(0);
break; break;
} }
if(0 && (key=='|') && !(state&ControlMask)) /* testmode */ if(0 && key=='|' && !(state & ControlMask)) { /* testmode */
break;
}
if(0 && key=='|' && (state & ControlMask)) /* testmode */
{ {
double w, x1, y1, x2, y2; double w, x1, y1, x2, y2;
int i; int i;

View File

@ -816,7 +816,7 @@ void hilight_net(int to_waveform)
hilight_nets=1; hilight_nets=1;
inst_ptr[n].flags |= 4; inst_ptr[n].flags |= 4;
} }
if(type && !strcmp(type, "current_probe") ) { if(type && (!strcmp(type, "current_probe") || !strcmp(type, "vsource")) ) {
if(to_waveform == GAW) send_current_to_gaw(sim_is_xyce, inst_ptr[n].instname); if(to_waveform == GAW) send_current_to_gaw(sim_is_xyce, inst_ptr[n].instname);
} }
break; break;

View File

@ -549,6 +549,22 @@ void save_xschem_data(int what)
xc.max_polygons = max_polygons; xc.max_polygons = max_polygons;
xc.max_arcs = max_arcs; xc.max_arcs = max_arcs;
xc.max_lines = max_lines; xc.max_lines = max_lines;
xc.schprop = schprop;
xc.schtedaxprop = schtedaxprop;
xc.schvhdlprop = schvhdlprop;
xc.schsymbolprop = schsymbolprop;
xc.schverilogprop = schverilogprop;
xc.xschem_version_string = xschem_version_string;
schprop = NULL;
schtedaxprop = NULL;
schvhdlprop = NULL;
schsymbolprop = NULL;
schverilogprop = NULL;
xschem_version_string = NULL;
/*non malloc'd storage */ /*non malloc'd storage */
xc.max_texts = max_texts; xc.max_texts = max_texts;
xc.max_wires = max_wires; xc.max_wires = max_wires;
@ -578,6 +594,15 @@ void save_xschem_data(int what)
max_polygons = xc.max_polygons; max_polygons = xc.max_polygons;
max_arcs = xc.max_arcs; max_arcs = xc.max_arcs;
max_lines = xc.max_lines; max_lines = xc.max_lines;
schprop = xc.schprop;
schtedaxprop = xc.schtedaxprop;
schvhdlprop = xc.schvhdlprop;
schsymbolprop = xc.schsymbolprop;
schverilogprop = xc.schverilogprop;
xschem_version_string = xc.xschem_version_string;
/*non malloc'd storage */ /*non malloc'd storage */
max_texts = xc.max_texts; max_texts = xc.max_texts;
max_wires = xc.max_wires; max_wires = xc.max_wires;

View File

@ -460,6 +460,12 @@ typedef struct {
int max_wires; int max_wires;
int max_instances; int max_instances;
int max_symbols; int max_symbols;
char *schprop;
char *schtedaxprop;
char *schvhdlprop;
char *schsymbolprop;
char *schverilogprop;
char *xschem_version_string;
} Xschem_ctx; } Xschem_ctx;
struct Lcc { /* used for symbols containing schematics as instances (LCC, Local Custom Cell) */ struct Lcc { /* used for symbols containing schematics as instances (LCC, Local Custom Cell) */