Commit Graph

754 Commits

Author SHA1 Message Date
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 969f4ec1c7 removed some dead code (what & START) in draw.c, paste/merge of lines/polygons/arcs/lines did not correctly restore dash attributes. Boiler plate code for draw waves 2021-12-20 00:01:10 +01:00
Stefan Frederik 61e9c0e4e3 add flags member field in xRect struct for future additions 2021-12-19 20:53:52 +01:00
Stefan Frederik 382cba1fda added missing quotes on return value in abs_sym_path 2021-12-19 10:11:54 +01:00
Stefan Frederik 86ac93c369 some "box" vars changed to "rect" for consistency 2021-12-19 01:28:39 +01:00
Stefan Frederik b0af12d529 better layout of load_file_dialog widget; better handling of (strange) pathnames in abs_sym_path 2021-12-19 00:20:20 +01:00
Stefan Frederik ead63f5c39 Fix regression: in load_file_dialog make "Current file dir" button work again 2021-12-18 13:11:21 +01:00
Stefan Frederik a397d936dc if a schematic references a symbol name as "./xxx.sym" (instead of just "xxx.sym")force searching in directory of current schematic first, then in XSCHEM_LIBRARY_PATH directories. 2021-12-18 12:29:17 +01:00
Stefan Frederik e2db38c881 statement reordering for faster execution in my_round() 2021-12-17 23:56:25 +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 72f365f995 fix regression in tclgetvar() not returning NULL for non existent variables (place text dialog box did not show text size) 2021-12-16 23:09:23 +01:00
Stefan Frederik fd5e6caf13 preserve line ordering regardless of awk hash implementation in tedax netlists as done for vhdl and verilog; include a couple of tedax netlist checks in xschemtest 2021-12-16 00:39:09 +01:00
Stefan Frederik ba15e21b24 preserve ordering in verilog/VHDL signal/wire/reg declarations for consistent netlist hashing/checking 2021-12-15 15:17:45 +01:00
Stefan Frederik 95ea920faf do not hash the comments containing absolute paths in xschemtest netlist check, since these vary on different systems 2021-12-14 12:40:32 +01:00
Stefan Frederik b7af31d38c fix regression in tcl execute procedure ("execute 0 prog" blocking if prog closes stdout/stderr file descriptors) 2021-12-13 01:52:18 +01:00
Stefan Frederik 875581a4fb avoid "rb" fopen in hash_file() on windows, who cares, code handles \r (or missing \r) to have consistent results 2021-12-10 15:19:24 +01:00
Stefan Frederik 5a3ea573cd more modularized xschemtest, use stdlib file functions for hash_file() 2021-12-10 13:17:21 +01:00
Stefan Frederik 5270d41d8d better hash_file function (more precise cr/lf scanning) 2021-12-10 03:05:53 +01:00
Stefan Frederik deec11851b C 32 bit hash_file accessible from tcl for faster hash calculatons 2021-12-10 01:08:31 +01:00
Stefan Frederik 9e2f3816fd xschem paste command: allow set x and y on cmdline to avoid interactive placement 2021-12-09 20:31:06 +01:00
Stefan Frederik d44c733fae find_inst_to_be_redrawn(): avoid unneeded call to int_hash_free() if no show net name option active; inst_hash_lookup(): store only pointers to instnames, avoiding strdups 2021-12-09 18:01:54 +01:00
Stefan Frederik 5b01b0c4f1 xctx->inst[].instname set (whenever changing it) directly in new_prop_string() 2021-12-09 17:25:27 +01:00
Stefan Frederik b0010322ec remove redundant assignment 2021-12-09 14:07:26 +01:00
Stefan Frederik 8eaada23f0 static function rename 2021-12-09 13:43:00 +01:00
Stefan Frederik 6458fdc5bd unsigned char cast in hash functions 2021-12-09 00:34:43 +01:00
Stefan Frederik e45e3caa84 avoid allocating 0 byte objects in hash_iterator.c, some fixes in xschem subcommands ("clear", "get lastsel", "align", "wire") 2021-12-08 02:38:56 +01:00
Stefan Frederik fa25edabec fix 3 potential (small) memory leaks 2021-12-08 00:38:19 +01:00
Stefan Frederik 9f99a31fac hash_inst_pin(): avoid reporting erc messages if for_netlist==0 2021-12-07 20:40:33 +01:00
Stefan Frederik 5a91aec3ff translate() refactoring/cleanup 2021-12-07 20:33:11 +01:00
Stefan Frederik 5503786979 translate(): recognize @@ and @# token patterns to avoid useless get_tok_value() calls 2021-12-07 19:43:57 +01:00
Stefan Frederik 1e2983483f comment out a couple of dbg lines in inner loops for performance 2021-12-07 19:15:37 +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 0636b04d0e better find_inst_to_be_redrawn() usage in copy/move/delete operations 2021-12-07 12:53:13 +01:00
Stefan Frederik e3077c6f90 fix copy/move operation with flips/rotations: correctly restore object bboxes for correct drawing deletions (move) and restoration of originally selected component bboxes (copy) 2021-12-07 12:00:54 +01:00
Stefan Frederik 19f0fd3c6e optimizations in calc_drawing_bbox() (less get_tok_value() calls), optimizations in bus_hilight_hash_lookup() (less expandlabel() calls) 2021-12-07 02:18:23 +01:00
Stefan Frederik 4cd8642362 handle error conditions in tclget*var() functions 2021-12-06 02:00:58 +01:00
Stefan Frederik 31ff86557e single global array var `execute` instead of multiple execute_* arrays for `execute` process handling 2021-12-06 00:58:06 +01:00
Stefan Frederik 506d9683d5 no newline print on exit 2021-12-05 22:32:56 +01:00
Stefan Frederik de1db1e87a main.c do not spawn a child closing std file descriptors if -b option is given, just start xschem without interactive tcl shell, handle error condition in setup_tcp_gaw 2021-12-05 15:31:26 +01:00
Stefan Frederik e449543805 tclvareval() wrapper 2021-12-05 12:39:05 +01:00
Stefan Frederik 05f176045b remove propagate_hilights() from prepare_netlist_structs() (call explicitly when needed). Fix hilight_parent_pins()/propagate_hilights() in go_back() (some UNhilighted pins did not propagate to parent) 2021-12-05 01:34:19 +01:00
Stefan Frederik 9afce9efee report compile options in `xschem globals` command, more precisely calculate deleted object bboxes (recalculate at current zoom level due to text size roudings) to avoid some small leftover graphics after deletion 2021-12-04 11:23:38 +01:00
Stefan Frederik 8832830d91 implement option `-b` for `x` hot key (to open a new xschem`s process) on Windows. (Joannne) 2021-12-04 01:50:05 +01:00
Stefan Frederik e3ab569f35 fix: xctx->inst_redraw_table can not be static, must be dinamically allocated. 2021-12-04 01:45:26 +01:00
Stefan Frederik a7277acfda some more brace protected filenames in C tcl calls 2021-12-03 23:59:46 +01:00
Stefan Frederik 954979e200 brace filenames (to protect spaces) in Tcl_VarEval() calls from C as per Joanne findings. 2021-12-03 19:37:59 +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 02173373cb some little optimizations, redundant code removed, better formatting in globals.c 2021-12-02 13:28:40 +01:00
Stefan Frederik cb8ffce9cf fix save() function usage, in case user cancels save 2021-12-01 17:00:01 +01:00
Stefan Frederik f466ce5ad4 better menu text 2021-12-01 12:42:40 +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 6cf6c58841 add menu command to restore all colors to default, deleting "colors" config file 2021-11-30 00:38:02 +01:00
Stefan Frederik e2197844ca fix infowindow (wrong window path) 2021-11-29 19:14:24 +01:00
Stefan Frederik 40803e47c5 Add Dismiss button to infowindow 2021-11-29 18:41:13 +01:00
Stefan Frederik 053d06c0f6 use tclgetvar for XSCHEM_TMP_DIR 2021-11-29 18:26:52 +01:00
Stefan Frederik 1c18211894 use tclgetvar for XSCHEM_TMP_DIR 2021-11-29 18:26:20 +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 d4fb14a0bb store server socket descriptors so they can be closed at will 2021-11-29 14:56:34 +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 d3ef2038ed "xschem change_colors" to "xschem build_colors" in tcl command language for consistency 2021-11-29 11:27:11 +01:00
Stefan Frederik 1963669c3f xschemrc update (undo_type) 2021-11-29 04:14:35 +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 88b00fd546 add undo function pointers 2021-11-28 13:29:13 +01:00
Stefan Frederik 01b3401e43 in memory undo now saves / restores all symbol definitions, so no re-link to instances operation is needed 2021-11-28 13:16:01 +01:00
Stefan Frederik 1cbfc16cd9 better simconf help text 2021-11-27 03:49:39 +01:00
Stefan Frederik 965d2f3ec1 Restore default (delete simrc file) button in simulation configuration dialog 2021-11-27 03:37:36 +01:00
Stefan Frederik 551bbcec0c Windows does not recognize XPending, fix typo for verilog_format`s port name: g instead of f 2021-11-26 13:16:52 +01:00
Stefan Frederik f9b6389942 cosmetic changes ([xschem get version] print format) 2021-11-25 19:26:43 +01:00
Stefan Frederik 39a27e856e fix pcb_current_protection_embed.sch with up to date embedded symbols (previous had very old symbols with errors), fix pmos.sym (make pin names and verilog_format string consistent). All other schematics with embedded symbols updated with current library symbol. Some code in place for saving/restoring symbols in in-memory undo. This code is not compiled so does not affect xschem operation at all. 2021-11-25 04:00:01 +01:00
Stefan Frederik f67ec47f82 added some comments, commented out xctx->prep_* = 0 in save_schematic() 2021-11-24 13:52:59 +01:00
Stefan Frederik 9d38cb3823 removed debug messages 2021-11-24 04:19:32 +01:00
Stefan Frederik e7aa7b9d04 fix netlisting errors on schematics with embedded symbols. When purging unused symbols schematic was re-linked with library symbols instead of embedded symbols, leading to errors if the symbols differ. Fixed popping schematic from undo stack instead of calling link_symbols_to_instances() 2021-11-24 03:47:04 +01:00
Stefan Frederik 364c2f1f3a moved functions containing X calls: now only callback.c, xinit.c and draw.c contain xorg-specific function calls. 2021-11-24 01:07:33 +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 9f33230f44 removed unneeded tcl global "simulate_bg" 2021-11-23 17:16:21 +01:00
Stefan Frederik 78934d363f removed duplicate netlist_dir global var in C code, use tcl netlist_dir variable, some widgets now display on top of current schematic window instead of xschem`s master window (use [xschem get topwindow] instead of ".") 2021-11-23 17:02:36 +01:00
Stefan Frederik d03147dce1 more consistent naming convention for hash table functions 2021-11-23 15:03:51 +01:00
Stefan Frederik d6d3ab502c some comments in the code, avoid potential memory leak in netlisting code 2021-11-23 01:14:49 +01:00
Stefan Frederik 88d64136a6 fix remove_symbols() not first deleting instance .node[] fields on instances 2021-11-22 21:47:13 +01:00
Stefan Frederik 14e94eb615 remove_symbols() and remove_symbol(): some symbol fields were not correctly cleared when removing all symbols. Ensure inst[].name and sym[].name are not strdup`ed as NULLs 2021-11-22 12:42:33 +01:00
Stefan Frederik 4c17e2251e undriven net warning has higher priority over open net 2021-11-22 01:32:49 +01:00
Stefan Frederik 9bca5b3f5b fix descend_symbol regression due to previous commit 2021-11-22 00:42:53 +01:00
Stefan Frederik 1c37e7eeee when descending from a modified schematic with highlight nets and not saving schematic before descending, clear highlights to avoid inconsistent state when returning back. save() and save_schematic() have more decent return values 2021-11-22 00:26:49 +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 7f9ee9fc2a add "xschem check_symbols" and "xschem reload_symbols" for future checking of symbols that are newer wrt to schematic. set mtime of newly created schematic (that does not exist on disk) to current time. Add verilog attributes to devices/pmos4.sym 2021-11-21 12:28:36 +01:00
Stefan Frederik 608912078f fix "untitled" window title setting 2021-11-21 02:08:27 +01:00
Stefan Frederik 4b228737f4 fix long standing typo in file selector right listbox (-selectmode browse) 2021-11-21 01:56:54 +01:00
Stefan Frederik 10114ec838 add missing braces in update recent file submenu, fix file selector improperly setting main window title, added logic/test_mos_verilog.sch depletion mode verilog example 2021-11-20 23:44:19 +01:00
Stefan Frederik e4f4c75e9a fix stat missing arg 2021-11-20 13:47:25 +01:00
Stefan Frederik a495ada2ed When saving a schematic issue a warning if disk file has been changed since opening 2021-11-20 13:33:40 +01:00
Stefan Frederik 9ceb25716e auditing of static in-function variables, remove unnecessary, add notes for allowed ones 2021-11-20 02:37:56 +01:00
Stefan Frederik 83746efbe9 some other static data eliminated from functions (edit symbol_property), in_memory undo structure moved into schematic context 2021-11-19 23:22:54 +01:00
Stefan Frederik 4cb0a12d64 resolve a race condition between Configure event delivery, window creation, and wm hints setting for icon 2021-11-18 03:06:22 +01:00
Stefan Frederik bbba3b9c02 check for max number of subwindows, better way to set icons for windows 2021-11-18 03:01:28 +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 daf90b0645 fix icon pixmap on child schematic windows 2021-11-17 22:15:36 +01:00