Commit Graph

493 Commits

Author SHA1 Message Date
Stefan Frederik 2a3e9ddea4 graph UI improved (unlock xaxis flag) 2022-01-02 04:42:15 +01:00
Stefan Frederik 81a7041c9f faster graph drawing by direct graph->screen transformation, avoiding double graph->xschem->screen scaling. File entry box is also a glob-search pattern in file open dialog 2022-01-01 15:46:03 +01:00
Stefan Frederik 06e84deb96 fix setting pdfmarks with directories in hierarchical pdf exports 2021-12-31 11:58:28 +01:00
Stefan Frederik 7600985557 fix various graph event handling issues 2021-12-30 23:22:13 +01:00
Stefan Frederik 9beda72ebb fix various graph event handling issues 2021-12-30 20:52:15 +01:00
Stefan Frederik c0ab0f1a61 hierarchy pdf prints have links to pdf pages of sub blocks 2021-12-30 20:11:41 +01:00
Stefan Frederik 5707b18aba wave view: added cursors for delay/time measurements 2021-12-30 15:45:38 +01:00
Stefan Frederik d6c197d108 fix BadDrawable regression in free_rawfile(): after deleting data a draw() was called, but since this function is called also in exit handler all windows are already closed. Added digital waveforms and bussed signal display 2021-12-29 05:11:39 +01:00
Stefan Frederik 5dd3f5c15d digital wave graphs, handle multiple sweep dc simulations 2021-12-27 18:42:56 +01:00
Stefan Frederik e111b2b9d6 even with multiple selected graphs apply y axis pan/zoom only on master graph. Better checks/cleanups for load/unload raw file 2021-12-27 14:12:55 +01:00
Stefan Frederik 547097f176 graph UI refinement and various fixes. Zoom in/out keeps value under mouse fixed 2021-12-27 05:22:19 +01:00
Stefan Frederik 7a286e5466 graph UI improvements (no require shift + mouse for global x-axis sliding) 2021-12-26 15:13:57 +01:00
Stefan Frederik 214070bb1c graph UI improvements (x-axis slider, do not force mouse motion to be inside graph after starting operation) 2021-12-26 14:57:12 +01:00
Stefan Frederik eff02f5f02 graph UI improvements (global x slider), various fixes 2021-12-26 14:35:13 +01:00
Stefan Frederik 30ce222b68 graph UI improvements (global x slider), various fixes 2021-12-26 14:33:54 +01:00
Stefan Frederik 37575e9404 allow button1 in addition to button2 for panning / zooming waveforms, add menu commands to insert graph, display/hide empty graphs, load raw file 2021-12-26 04:09:55 +01:00
Stefan Frederik f5a737159d axis zoom: updated examples 2021-12-25 14:43:26 +01:00
Stefan Frederik 842bcb0b93 implement zoom/move/full on y axis graphs 2021-12-25 13:44:14 +01:00
Stefan Frederik 1f44a960cb implement zoom/move/full on y axis graphs 2021-12-25 13:37:49 +01:00
Stefan Frederik 0d6a6c488b handle spice simulation files with multiple datasets 2021-12-25 05:15:52 +01:00
Stefan Frederik d423545ccc fix: missing graph borders 2021-12-24 21:17:52 +01:00
Stefan Frederik 70adb61410 Better axis label placement, smooth waves move/zoom with mouse, compile option to store sim data as floats instead of doubles, option for axis scaling (p,n,u,m,k,M,G), load waveforms command is a toggle (load / free) 2021-12-24 12:17:00 +01:00
Stefan Frederik c30ff852a2 fix missing check for loaded data when user tries a "full" zoom in a graph window (segfault) 2021-12-23 13:01:18 +01:00
Stefan Frederik 62e71a8bbe draw_graphs(): add flag to avoid copying secondary buffer areas to screen if called from main draw(). This makes things faster and removes an annoying "tearing" effect when moving around 2021-12-23 11:59:39 +01:00
Stefan Frederik b11955a3aa [experimental] better wave labels positioning in graphs 2021-12-23 03:43:34 +01:00
Stefan Frederik 8a0fc1c1df mouse actions (move, zoom) on waveforms 2021-12-22 18:25:15 +01:00
Stefan Frederik 673eb243e7 update test schematic 2021-12-22 14:15:43 +01:00
Stefan Frederik 76b537a587 [experimental] add waveform display of ngspice simulation data directly in xschem drawing area 2021-12-22 04:39:23 +01:00
Stefan Frederik 0c9eff16d9 my_round() function instead of ROUND() macro 2021-12-17 15:40:19 +01:00
Stefan Frederik 993c3a24c2 rename xschem_simulator/ n.sym and p.sym to ntrans.sym and ptrans.sym to avoid confusion with symbols in rom8k/; place tk_messageBox above right xschem window when using multiple (single process) windows. 2021-12-17 03:29:53 +01:00
Stefan Frederik 989388e14b allow panning schematic even if dialog box displayes or xschem simulation ongoing; update example simulate_ff.sch 2021-12-07 14:07:36 +01:00
Stefan Frederik e449543805 tclvareval() wrapper 2021-12-05 12:39:05 +01:00
Stefan Frederik 629917cfcd new find_inst_to_be_redrawn() implementation to recalculate area to be redrawn with/without show net names on symbol pins, simplified new_window() call in callback `x` command, code formatting in globals.c, added xschem get [xy]origin commands 2021-12-03 19:15:07 +01:00
Stefan Frederik d98c855135 remove calls to ngspice::resetdata in C code, done in ngspice annotator when reading a new file and in xinit.c when exiting the program. Some File menu item reordering 2021-12-01 00:35:52 +01:00
Stefan Frederik 0ebe36bc8f avoid quitting the program for some serious but non fatal errors, add some error reporting, some documentation updates (faq.html) 2021-11-29 17:29:09 +01:00
Stefan Frederik 887c546d00 more consistent naming for some xschem subcommands, added and updated "xschem help" command (still wip) 2021-11-29 14:37:39 +01:00
Stefan Frederik fe549c0f5c readable function pointer call syntax 2021-11-29 11:52:32 +01:00
Stefan Frederik 2442a3dfc0 runtime menu option to set undo stack on disk or in memory 2021-11-29 02:47:37 +01:00
Stefan Frederik 03f973e203 use undo function pointers 2021-11-28 14:35:55 +01:00
Stefan Frederik e77b72df9c old_winpath[] removed from globals, put as static string into callback(), fix ngspice::annotate netlist_dir fetching. 2021-11-23 23:20:10 +01:00
Stefan Frederik fddd3f84fb avoid force-saving changed schematic before doing netlist (use push/pop undo instead of load_schematic() to restore circuit after traversing hierarchy) 2021-11-21 23:04:48 +01:00
Stefan Frederik d1a922643d Bunch of function static variables moved into xctx struct for safety 2021-11-18 01:55:01 +01:00
Stefan Frederik eecc81437c flat_netlist and only_probes moved into xctx struct 2021-11-17 23:12:17 +01:00
Stefan Frederik 937261807b fix setting snap and grid values in statusbar 2021-11-17 01:30:37 +01:00
Stefan Frederik bd626427fd fix status bar info correctly swicthing when focusing multiple xschem child windows; multiple schematic window handling within one xschem instance is now working 2021-11-17 01:12:55 +01:00
Stefan Frederik ad05513838 some parameter checks in xschem commands, global var removal in simulation help window - No use for production yet 2021-11-16 22:28:10 +01:00
Stefan Frederik 59198f2dda removed a whole bunch of global UI-related variables and tcl/C redundancies 2021-11-10 13:43:08 +01:00
Stefan Frederik c3c1b39cb5 (2) full widget creation for xschem new windows, code cleanup, removed old stuff 2021-11-09 19:05:56 +01:00
Stefan Frederik c6a6d1b1dc Motion and Enter events regain focus even it toolbar is displayed and user pressed "Tab" to focus a button; toolbar button focus ordering matches display ordering 2021-11-08 16:27:07 +01:00
Stefan Frederik b62f8b57f7 removed useless assignments xctx->m[xy]_save = m[xy] in contexts where its unnecessary 2021-11-06 03:34:14 +01:00
Stefan Frederik 7985e8d22c fix some positioning glithes in UI when placing text via bindkey or menu or context menu 2021-11-06 03:24:45 +01:00
Stefan Frederik 7efc446dae Escape key (instead of Simulation menu entry, now removed) stops ongoing xschem internal simulator engine if running 2021-11-04 23:52:24 +01:00
Stefan Frederik 8281c67aed fix some UI glitches (place text/symbol and aborting operation during move will now delete placed objects) 2021-11-04 15:08:54 +01:00
Stefan Frederik 7490c80a9c fix UI bug when placing text and immediately deleting it (did not delete) 2021-11-04 13:30:50 +01:00
Stefan Frederik 966ebdc26e fix deletion of ctxmenu if user keeps right button pressed and exits window, icons in ctxmenu 2021-11-04 12:57:41 +01:00
Stefan Frederik f5f6b681e2 removed rarely used toolbar buttons, added Abort context menu command 2021-11-04 02:07:41 +01:00
Stefan Frederik b720423eb3 comment typos 2021-11-04 01:23:40 +01:00
Stefan Frederik e85559efec context menu added in drawing area (right mouse button) 2021-11-04 01:13:44 +01:00
Stefan Frederik 04e670b3cf fine tuning of previous commit 2021-10-26 00:04:13 +02:00
Stefan Frederik b81325ea00 code cleanup, comments, more globals in Xctx context structure 2021-10-25 17:05:43 +02:00
Stefan Frederik 4f8120cd2d add "update" after binding creation in xinit.c, to avoid incomplete initialization of event binding if xschem called with non-existent file 2021-10-09 10:25:24 +02:00
Stefan Frederik 205bda387a Add File menu commands to open empty schematic or symbol in new window 2021-10-09 00:41:39 +02:00
Stefan Frederik 090cc5052e added xschem X-probe to bespice (from Analog flavor) waveform viewer. Works with eval version too. 2021-09-19 00:21:20 +02:00
Stefan Frederik 00311e7ff1 update license info 2021-07-27 16:42:54 +02:00
Stefan Frederik 5880e23f94 added hierarchical ps/pdf export (File menu) 2021-06-13 23:55:17 +02:00
Stefan Frederik ddaa431144 make_sym_lcc.awk: declare "value" as local variable inside process_box_line() to avoid clashes with global "value" 2021-06-05 08:58:38 +02:00
Stefan Frederik ac99227365 fix a bug when pasting / ctrl-v into an empty schematic (instances not selected for moving) 2021-01-22 01:03:16 +01:00
Stefan Frederik e332008fa8 removed/updated obsolete keybinding descriptions, removed status check on Delete key events 2021-01-13 13:44:57 +01:00
Stefan Frederik 50028baa9f added Hi-Z in logic values 2021-01-11 19:31:47 +01:00
Stefan Frederik 2063b42613 fixed a hypotetical integer overflow issue, do increment and modulo of hilight_color , remove some spaghetti code (use propagate_hilights() ) 2021-01-08 21:25:11 +01:00
Stefan Frederik ef1f297290 more flexibility in constrained move operations (draw wires, lines, copy/move), pressing h/v again toggles constrained / unsonstrained move 2021-01-05 01:24:45 +01:00
Stefan Frederik 8eb2147b18 removed obsoleted commands (shift/ctrl Del) 2021-01-04 18:21:29 +01:00
Stefan Frederik b272080637 bind select "connected wires" to alt/ctrl-right button click 2021-01-03 12:37:15 +01:00
Stefan Frederik b63d3bec09 finalizing "select nets up to junctions" 2021-01-03 01:26:54 +01:00
Stefan Frederik cf5813970c prepare for delete connection implementation 2021-01-02 23:42:22 +01:00
Stefan Frederik cc993bfe44 added in the menu the (undocumented) "propagate-highlight" function (propagate through conductive elements) 2021-01-02 20:33:34 +01:00
Stefan Frederik d6b9740c4b specify state==0 (no modifiers) for Delete keypress events 2021-01-02 19:15:59 +01:00
Stefan Frederik 3528634124 Add Shift-Delete command that selects all nets/labels/probes physically attached to current selected wire segment/label/pin/probe 2021-01-02 18:56:42 +01:00
Stefan Frederik 46e986cc62 added "auto join/trim wires" menu option since now the trim operation is doing fast even on big designs 2021-01-02 03:24:26 +01:00
Stefan Frederik 14ead18ea4 "propagate_to" attribute for pins renamed to "goto" 2020-12-30 21:26:58 +01:00
Stefan Frederik ebaa2d932b redraw wire/line/rect/arc/poly rubbers after changing zoom/panning; do not wait for Motion events 2020-12-29 03:45:12 +01:00
Stefan Frederik 17d8db59ff num parameter to logic_set() to perform "num" toggling operations 2020-12-28 20:20:45 +01:00
Stefan Frederik 5917cd9717 added flip-flop simulation capabilities. added examples: merry xmas greeter and 7 segment display driver and counter. 2020-12-27 19:20:24 +01:00
Stefan Frederik b71199c5b8 added "xschem_simulator" sample example directory for trying logic propagation of probed nets 2020-12-26 19:26:33 +01:00
Stefan Frederik 3f452beb8e Fix: search() "unselect" function was not updating drawing 2020-12-25 15:14:41 +01:00
Stefan Frederik 582863f825 added menu option to load most recent file: ctrl-shift-o, fix menu entry "unhilight selected nets" (did unhilight all); removed a wire[].node clear in hash_wire() that caused broken connectivity. this data is cleared in delete_netlist_structs when needed. 2020-12-25 04:37:53 +01:00
Stefan Frederik 779c789100 better "xschem print" command accepting viewport and image dimensions, better zoom_full (with margin), good for embedding in script and do automatic export generation 2020-12-22 00:13:25 +01:00
Stefan Frederik 4ddc9654e8 add xschem commands for specifying image size for png and pdf: xschem print svg file.svg 800 600; svg background color taken from svg_colors variable so it can be changed like any other color 2020-12-21 04:38:57 +01:00
Stefan Frederik dfa58a0a08 spaghetti code removal, more reused code 2020-12-20 15:56:29 +01:00
Stefan Frederik a837682731 caching "lab" and "highlight" attributes for speed 2020-12-19 03:22:38 +01:00
Stefan Frederik 17124c761c each schematic windows has its own "current later" (rectcolor) 2020-12-06 16:40:08 +01:00
Stefan Frederik 4d26ce66a8 more state variables into xctx: move / create new objects 2020-12-06 16:10:22 +01:00
Stefan Frederik e7e5ad190b more schematic context in xctx: cairo surfaces and context, save buffer graphic context (GC), hilight hash tables and data, node name hash tables. Refactoring of resetwin , resetcairo routines (also used in xinit to avoid code duplication), switching schematics seems almost complete now 2020-12-06 02:10:53 +01:00
Stefan Frederik f9f9de3371 added "PWD" button in file load/place component dialog box that brings back to the directory containing current schematic. Selecting a component before doing "place component" will make the file load dialog start from the directory containing the selected component 2020-12-05 05:18:35 +01:00
Stefan Frederik 2b7e31e0d6 add utility functions to create new schematic window 2020-12-03 23:17:13 +01:00
Stefan Frederik 9588a859da cleanup in preview code 2020-12-03 11:42:06 +01:00
Stefan Frederik a64d69ed7a some code refactoring, more globals in xctx context, fixed unnoticed shift-reduce conflict in expandlabel 2020-12-03 04:20:05 +01:00
Stefan Frederik e279262f00 more globals into xctx context struct 2020-12-02 15:10:47 +01:00
Stefan Frederik d47a569f9f bussed nets/pins in hierTEDAx netlists 2020-11-28 16:41:35 +01:00
Stefan Frederik d93826f61c wrap long lines in source code, set default direction of pins to "B"(idirectional) if not specified in spice netlist (no *.PININFO information) 2020-11-22 00:51:24 +01:00
Stefan Schippers f6e85bc90c replaced select_connected_nets() with faster select_hilight_net(), net_name() used only for displaying net names will not trigger erc messages 2020-11-16 15:44:51 +01:00
Stefan Schippers 2d01eee04b trim_wires() made 2 O.O.M. faster on big wire meshes; rects, lines, polys, arcs on hidden layers (View -> Visible Layers) not selectable by area or by mouse click 2020-11-16 01:28:19 +01:00
Stefan Schippers 957b9888d1 Removed all static/global name conflicts, avoided global conflicts with flex/bison generated code so xschem (as a test bench) can be compiled as a single big file that includes all other sources 2020-11-03 12:10:55 +01:00
Stefan Schippers 679348b7f8 "Delete files" menu command added 2020-10-24 23:46:19 +02:00
Stefan Schippers 367810f6dc add some hideen commands in menu: "place net label(2)", "highlight net/pin name mismatches of selected instances", "Flip", "Rotate" 2020-10-24 23:00:41 +02:00
Stefan Schippers 6d4c8881f2 regression fix: unselect all when placing a component, to avoid dragging selected stuff with the new object 2020-10-24 20:06:42 +02:00
Stefan Schippers 7e845db5df exampels/poweramp.sch and examples/cmos_example.sch show how to use dynamuc ngspice simulation data backannotation, optimized fix of previous bbox bug 2020-10-20 19:48:59 +02:00
Stefan Schippers c90f188703 do not call calc_drawing_bbox() on monster schematics as it takes more time than just drawing the viewport 2020-10-18 13:53:58 +02:00
Stefan Schippers 55723e9429 line width is related to the schematic, so it is moved under xctx; removed all integer versions (lw, bus_width) that needed to be kept in sync, created two macros to get the integer values from xctx->lw. main window save_pixmap is preserved when doing a schematic preview in file open dialog, so no need to regenerate its content (with a draw() call) after preview. 2020-10-17 00:53:19 +02:00
Stefan Schippers e7928727d6 all xctx context is now a dynamically allocated structure; no observable performace impact 2020-10-15 17:39:21 +02:00
Stefan Schippers c87f44a441 added "xchem load_symbol" command to load a symbol without binding to any instance, text edit attribute "Load" button will start in "$current_dirname" 2020-10-15 15:37:06 +02:00
Stefan Schippers e82f270f61 replaced @ character with ? for spice netlist node multiplicity tags, so translate() will not try to expand them, do not print erc warnings for "non electrical" symbols (architecture, package, port_attributes, use, etc), print_spice_element() result string will be forwarded to translate() if enclosed within tcleval(...), so all @vars will be expanded. translate() in turn will forward to tcl_hook() if necessary. 2020-10-14 23:15:05 +02:00
Stefan Schippers 64c0abc58e code refactoring (global context in Xschem_ctx), "New Schematic" or "New Symbol" will set netlist_type to "spice" or "symbol" respectively 2020-10-12 13:13:31 +02:00
Stefan Schippers 32f85ac4f4 do not force a full hash_wires() on every net insertion; code formatting 2020-10-11 13:08:32 +02:00
Stefan Schippers 4d0a3d8f7c allow probing to gaw current in voltage sources in addition to ammeters 2020-10-09 22:19:54 +02:00
Stefan Schippers 0f61e0fe0f JL fix regression for path resolution on windows, Esc resets manhattan_lines setting 2020-10-07 16:12:33 +02:00
Stefan Schippers 82051a33e5 simplify / break down complex expressions for code readability 2020-10-05 03:00:40 +02:00
Stefan Schippers 3060217aec simplified complex logical expressions on symbol type by using macros 2020-10-04 19:53:09 +02:00
Stefan Schippers 39cd1a77ed fix a regression in delete(): instance hash was not updated. removed some redundant drawing in copy operations 2020-10-03 04:33:52 +02:00
Stefan Schippers 5b72e307df fix erroneous slotted instance recognition (confuse U2[3:0] with U3:2) in translate(), breaking in some cases the "net name on instance pin" feature 2020-10-03 01:13:35 +02:00
Stefan Schippers 6805335a09 regression fix: correctly hash new wires when inserted 2020-10-02 16:12:08 +02:00
Stefan Schippers 8807c7250d various graphic rendering fixes for the new "view instance pin net names" function. Fixed some errors in merge schematic in callback.c and paste.c 2020-10-02 03:21:22 +02:00
Stefan Schippers d706e45987 set max width of .c files <=130 chars; Fix netlist regression: if no "lab=value" is given in instance attributes get lab from symbol "template=" string. This was commented out recently and now reverted back. "View->Enable show net names on symbol pins" global menu added: if unset no symbol pin net names will be shown regardless of instance/symbol "net_name=true" and pin @#n:net_name attributes. 2020-09-30 23:55:07 +02:00
Stefan Schippers 91e74fadcb "@#n:net_name" attribute (n = pin name or number) in symbols translates to net name attached to pin. "lab_show.sym" component that shows (does not assign) net name. "highlight=true" attribute can be given on instances in addition to symbols 2020-09-30 00:30:48 +02:00
Stefan Schippers ebdd4e827c read_line() function improvements, "]" tag recognized also if there is garbage following it 2020-09-28 08:35:00 +02:00
Stefan Schippers 5e85a87545 Alt-b command toggles bounding box view: 0: view all, 1: bbox view for subcircuits, 2: bbox view for all symbols. 2020-09-25 00:23:34 +02:00
Stefan Schippers 5186d3b92c avoid var declarations after statements (C89 warning) 2020-09-22 21:12:09 +02:00
Stefan Schippers 5e98241df1 NumLock and CapsLock check for windows 2020-09-22 21:02:51 +02:00
Stefan Schippers 4a38af8535 better capslock and numlock status detect and report in statusbar 2020-09-22 15:47:53 +02:00
Stefan Schippers 5b9d1091b2 print red message in status bar if caps lock set 2020-09-22 14:22:59 +02:00
Stefan Schippers 82451fd50e "xschem hilight_netname" command to hilight a specific net name, "xschem search exact ..." finds specific instances of vector instances, "probe_net" procedure descends into the right bussed instance and hilights the correct net bit, added "xschem display_hilights" to return all hilighted nets in the hierarchy, added "gaw_cmd" procedure to send socket commands to gaw (like "gaw_cmd reload_all") (recently added command to gaw ttg) 2020-09-22 13:35:55 +02:00
Stefan Schippers c08613608d better instance selection min-distance calculation 2020-09-17 09:05:08 +02:00
Stefan Schippers b51ce34b1c make "ctrl-[0-9]" commands work again (change layer) 2020-09-16 00:50:15 +02:00
Stefan Schippers f3bedb39a4 eliminated any differences between SYMBOL and SCHEMATIC files. There is no "current_type" variable any more. Symbols who used to have netlisting rules defined in schvhdlprop have now these attributes in schsymbolprop. Old symbol files with schvhdlprop will be saved with netlisting rules in schsymbolprop. 2020-09-14 10:27:45 +02:00
Stefan Schippers 020c61bc3d fix "saveas SYMBOL" changing current_type to SYMBOL even if user canceled the action; allow "@" in node names as this is used in some backannotated CDL netlists 2020-09-10 10:12:51 +02:00
Stefan Schippers 30335ce30a make Alt-KeyPress (hopefully) work on windows by manually building the Mask values 2020-09-07 09:34:41 +02:00
Stefan Schippers 8626a8a11b added command <Alt-b> (menu Symbol->Show only instance Bounding boxes) to toggle displaying instance detals / only bounding box. 2020-09-05 00:58:56 +02:00
Stefan Schippers fa9bdd44bc avoid redundant rebuild_selected_array() on Motion events, better auto-highlight fature 2020-09-01 10:50:08 +02:00
schippes 2aed232e04 allow adding (with shift-q) other elements while edit property dialog open 2020-08-16 09:41:39 +02:00
schippes 9570439e16 made edit_symbol_property and tcl edit_prop procedure much simpler when user clicks another instance while edit_prop dialog still open 2020-08-16 03:34:45 +02:00
schippes 199b408efb removed test mode 2020-08-11 00:31:10 +02:00
schippes 8383bb0e39 removed some dead code, remove_symbol() can remove i-th symbol, not only last one 2020-08-10 09:16:11 +02:00
Stefan SChippers 5e8df730a0 populating xschem git repo 2020-08-08 15:47:34 +02:00