From f50a3b15faaee9ffcdbf2f50b61a9fa98588818a Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 18 Dec 2023 23:36:01 +0100 Subject: [PATCH] doc updates (graphs) --- XSchemWin/XSchemWix/heat_xschem_library.wxs | 3900 +++++++++---------- XSchemWin/XSchemWix/xschem_library.wxs | 56 +- XSchemWin/XSchemWix/xschemrc | 36 +- doc/xschem_man/graphs.html | 9 +- src/draw.c | 2 +- src/token.c | 8 +- 6 files changed, 2020 insertions(+), 1991 deletions(-) diff --git a/XSchemWin/XSchemWix/heat_xschem_library.wxs b/XSchemWin/XSchemWix/heat_xschem_library.wxs index 5f512460..2de7196c 100644 --- a/XSchemWin/XSchemWix/heat_xschem_library.wxs +++ b/XSchemWin/XSchemWix/heat_xschem_library.wxs @@ -3,5863 +3,5863 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -7477,13 +7477,13 @@ - - - - - - - + + + + + + + diff --git a/XSchemWin/XSchemWix/xschem_library.wxs b/XSchemWin/XSchemWix/xschem_library.wxs index 9c6f57d9..47686213 100644 --- a/XSchemWin/XSchemWix/xschem_library.wxs +++ b/XSchemWin/XSchemWix/xschem_library.wxs @@ -4843,27 +4843,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -7158,13 +7158,13 @@ - - - - - - - + + + + + + + diff --git a/XSchemWin/XSchemWix/xschemrc b/XSchemWin/XSchemWix/xschemrc index 2d26c3da..7e87433c 100644 --- a/XSchemWin/XSchemWix/xschemrc +++ b/XSchemWin/XSchemWix/xschemrc @@ -100,7 +100,10 @@ # set netlist_dir $env(HOME)/.xschem/simulations #### if this is set to '1' netlists and simulations will go into a simulation/ folder -#### inside the directory containing the top level schematic. Default: not set (0) +#### inside the directory containing the top level schematic. +#### if this is set to '2' netlists and simulations will go into a simulation/[schname]/ folder +#### inside the directory containing the top level schematic. +#### Default: not set (0). # set local_netlist_dir 1 ########################################################################### @@ -150,6 +153,9 @@ #### allow color postscript and svg exports. Default: 1, enable color # set color_ps 1 +#### add a page title in the top left corner of the ps/pdf page. Default: enabled (1) +# set ps_page_title 1 + #### set paper size: name, height, width. Sizes in 1/72 of an inch (typographical points) #### default: {a4 842 595} # set ps_paper_size {a4 842 595} @@ -159,6 +165,9 @@ #### this is the default: # set initial_geometry {900x600} +#### initial geometry of load /save / insert component file selector +# set file_dialog_default_geometry 800x600 + #### if set to 0, when zooming out allow the viewport do drift toward the mouse position, #### allowing to move away by zooming / unzooming with mouse wheel #### default setting: 0 @@ -182,6 +191,11 @@ #### default: not enabled (0) # set unselect_partial_sel_wires 0 +#### if set show selected elements while dragging the selection rectangle. +#### once selected these can not be unselected by retracting the selection rectangle +#### if not set show selected items at end of drag. Default: enabled (1) +# set incremental_select 0 + #### if set to 1 automatically join/trim wires while editing #### this may slow down on rally big designs. Can be disabled via menu #### default: 0 @@ -219,6 +233,9 @@ #### enable to scale grid point size as done with lines at close zoom, default: 0 # set big_grid_points 0 +#### enable drawing grid axes. Default: enabled (1) +# set draw_grid_axes 1 + #### enable grouping contiguous bits of bus slices in net->pin instance #### assignments for verilog netlists. Default: disabled (0) # set verilog_bitblast 0 @@ -356,6 +373,7 @@ set to_pdf {gswin64c -sDEVICE=pdfwrite -o} # set editor {gvim -f -geometry 90x28} # set editor { xterm -geometry 100x40 -e nano } # set editor { xterm -geometry 100x40 -e pico } +# set editor {gedit -w} #### For Windows set editor {notepad.exe} @@ -390,7 +408,9 @@ set editor {notepad.exe} #### BESPICE WAVE SOCKET CONNECTION ########################################################################### #### set bespice wave listening port; default: not enabled -# set bespice_listen_port 2022 +#### set port number to 0 so TCL will automatically and reliably find +#### a free port +# set bespice_listen_port 0 ########################################################################### #### TCL FILES TO LOAD AT STARTUP @@ -474,4 +494,14 @@ set editor {notepad.exe} ########################################################################### #### if you see garbage on screen / graphic artifacts while editing with #### xschem try to set this to 1. Default: not enabled (0) -# set fix_broken_tiled_fill 0 \ No newline at end of file +# set fix_broken_tiled_fill 0 + +########################################################################### +#### FIX SOME REMOTE DESKTOP CONNECTION SOFTWARES NOT CORRECTLY REPORTING +#### MOUSE COORDINATES ON KEYPRESS / KEYRELEASE EVENTS +########################################################################### +#### If you see strange behavior while using keybindings to create graphic +#### objects ('w', 'l', 't', 'r', ...) try to set this to 1. +#### Default: not enabled (0) +# set fix_mouse_coord 0 + diff --git a/doc/xschem_man/graphs.html b/doc/xschem_man/graphs.html index d2e1e6c0..590c8464 100644 --- a/doc/xschem_man/graphs.html +++ b/doc/xschem_man/graphs.html @@ -51,7 +51,7 @@ p{padding: 15px 30px 10px;}

Using XSCHEM's internal graph functions

Xschem can now display waveforms by itself in the drawing area. in the Simulation menu there is an entry to - add a graph: Add waveform graph. When this menu is pressed a box can be placed in the schematic: + add a graph: Graph -> Add waveform graph. When this menu is pressed a box can be placed in the schematic:

@@ -63,15 +63,14 @@ p{padding: 15px 30px 10px;}

The next step is loading the simulation data, This is done by menu - Simulation->Load/Unload ngspice .raw file. This command loads a .raw file produced by a ngspice/Xyce - simulation. The file name is expected to be circuit.raw where - circuit.sch is the name of the schematic opened in the drawing area. + Waves->Op | Ac | Dc | Tran | Tran | Noise | Sp . This command loads the user selected + .raw file produced by a ngspice/Xyce simulation.

Ensure the circuit.raw is saved in binary format (no set filetype=ascii in your testbench)

- The raw file is searched for in the simulation/netlisting directory + The raw file is usually located in the simulation/netlisting directory Simulation ->set netlist dir.
After placing a graph box and loading simulation data a wave can be added. If you place the mouse on the inside of the box, close to the bottom/left/right edges and click the graph will be selected. diff --git a/src/draw.c b/src/draw.c index 65f2604d..7ab3efd9 100644 --- a/src/draw.c +++ b/src/draw.c @@ -417,7 +417,7 @@ void draw_temp_string(GC gctext, int what, const char *str, short rot, short fli void get_sym_text_size(int inst, int text_n, double *xscale, double *yscale) { char attr[50]; - const char *ts; + const char *ts=NULL; double size; int sym_n = xctx->inst[inst].ptr; diff --git a/src/token.c b/src/token.c index 7f749e92..1716be3e 100644 --- a/src/token.c +++ b/src/token.c @@ -1057,7 +1057,7 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 if(!strcmp( get_tok_value(ptr->rect[PINLAYER][i].prop_ptr,"name",0), token+2)) { if(strboolcmp(get_tok_value(ptr->rect[PINLAYER][i].prop_ptr,"vhdl_ignore",0), "true")) { str_ptr = net_name(inst,i, &multip, 0, 1); - my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ")", NULL); + my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ") ", NULL); } break; } @@ -1118,7 +1118,7 @@ static void print_vhdl_primitive(FILE *fd, int inst) /* netlist primitives, 200 si = get_tok_value(prop, "verilog_ignore",0); if(strboolcmp(si, "true")) { str_ptr = net_name(inst,n, &multip, 0, 1); - my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ")", NULL); + my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ") ", NULL); } } my_free(_ALLOC_ID_, &pin_attr); @@ -2874,7 +2874,7 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level char *prop = (xctx->inst[inst].ptr + xctx->sym)->rect[PINLAYER][i].prop_ptr; if(!strcmp( get_tok_value(prop,"name",0), token+2)) { str_ptr = net_name(inst,i, &multip, 0, 1); - my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ")", NULL); + my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ") ", NULL); break; } } @@ -2934,7 +2934,7 @@ static void print_verilog_primitive(FILE *fd, int inst) /* netlist switch level si = get_tok_value(prop, "verilog_ignore",0); if(strboolcmp(si, "true")) { str_ptr = net_name(inst,n, &multip, 0, 1); - my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ")", NULL); + my_mstrcat(_ALLOC_ID_, &result, "----pin(", str_ptr, ") ", NULL); } } my_free(_ALLOC_ID_, &pin_attr);