Commit Graph

754 Commits

Author SHA1 Message Date
Stefan Frederik 5abe48f24e fix compiler warnings about unitialized variables (they arent, but ...) 2021-08-19 09:08:43 +02:00
Stefan Frederik c22039105f update license info (2) 2021-07-27 16:53:08 +02:00
Stefan Frederik 00311e7ff1 update license info 2021-07-27 16:42:54 +02:00
Stefan Frederik 25d7d323a4 force ERC info window showing in case of critical errors during netlist (unconnected nodes, shorted nodes, pin mismatch between sch and sym and similar) 2021-07-14 23:32:59 +02:00
Stefan Frederik e5208e2d99 refactoring: "plotfile[]" global moved into xctx struct 2021-07-14 01:43:29 +02:00
Stefan Frederik df0fc572f3 Talk To Gaw (ttg) improvement: use "sel" instead of "p0" for panel selection, meaning "selected panel (or 1st panel if no selected)" for waveform display 2021-07-03 08:34:38 +02:00
Stefan Frederik 03a97df404 correctly redraw schematic at end of hierarchical pdf export (full zoom and draw) 2021-06-21 19:11:36 +02:00
Stefan Frederik 9cdfad3abb do a tcl evaluation of the "schematic" attribute of a symbol if the attribute is within a tcleval(...) expression. This way tcl variables/expressions can be used to determine the schematic to descend into when traversing/netlisting. example: schematic=tcleval(poweramp_${::mode}.sch). 2021-06-17 00:25:39 +02:00
Stefan Frederik 242523cb9f typo fix 2021-06-16 07:15:31 +02:00
Stefan Frederik 36bc95ef7f add sample of to_pdf definition in xschemrc with -dAutoRotatePages=/None option to ps2pdf 2021-06-15 09:42:33 +02:00
Stefan Frederik 04d72db05f add description of xschem_libs and noprint_libs in xschemrc 2021-06-15 08:05:43 +02:00
Stefan Frederik b9f4c7aed8 remove debug message 2021-06-15 01:23:17 +02:00
Stefan Frederik e16e54d851 new list variable "noprint_libs" to specify patterns of cells NOT to print in hierarchical export. "xschem_libs" does the same thing for netlisting. 2021-06-15 01:15:32 +02:00
Stefan Frederik 6bc66fe0e7 netlist/print export: items contained in xschem_libs are matched as regular expression patterns 2021-06-14 08:42:19 +02:00
Stefan Frederik f251918a0e fix usage of "xschem_libs", list of libraries/schematics NOT to netlist / export 2021-06-14 00:35:20 +02:00
Stefan Frederik 5880e23f94 added hierarchical ps/pdf export (File menu) 2021-06-13 23:55:17 +02:00
Stefan Frederik dfef332fb5 Replace *.ipin/*.opin/*.iopin info lines with *.PININFO.... if LVS netlist is selected. Use absolute path of symbols in check_lib function. Make PNG export work if destination path contains spaces. 2021-06-12 00:54:09 +02:00
Stefan Frederik 88456ca382 add draw() at end of make_schematic_symbol_from_sel() to update schematic with generated lcc symbol 2021-06-07 00:15:00 +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 c1909334cb fix typos in debug messages 2021-05-31 07:39:23 +02:00
Stefan Frederik a1077329d8 -m declare local "a" variable in make_sym_lcc.awk/endfile() 2021-05-29 09:46:59 +02:00
Stefan Frederik bda3d9d426 Added new feature "Make schematic and symbol from selected components" with command "xschem make_sch_from_sel" and function make_schematic(..)
added proc make_symbol_lcc and make_symbol_lcc.awk
sch and sym components to specially process dash in prop_ptr.
2021-05-29 00:45:01 +02:00
Stefan Frederik 6929cc896e use "-b" option when spawning new xschem windows, instead of redirecting i/o to /dev/null 2021-05-21 10:36:50 +02:00
Stefan Frederik fd6e5a6015 if bussed symbol ports are unconnected generate array of unconnected nets to match port multiplicity 2021-05-11 11:16:13 +02:00
Stefan Frederik ce5d9e40a6 pdf and png export: handle filenames with spaces in output filters 2021-04-16 16:27:32 +02:00
Stefan Frederik 99b0ab2ee2 if an XSCHEM_LIBRARY_PATH item contains "../" somewhere in the directory path apply [file normalize ... ] to resolve the ../../path/ path to an absolute location. 2021-04-16 13:31:20 +02:00
Stefan Frederik 7d4c208027 Save file dialog: added delete file/dir button 2021-03-18 17:16:46 +01:00
Stefan Frederik 447fca1b66 Save file dialog: added delete file/dir button 2021-03-18 17:13:36 +01:00
Stefan Frederik c5adb8a312 export images: seed text box with filename taking current schematic name; mkdir option in file / save dialog box; search dialog box: if token not found just repeat 2021-03-18 16:28:09 +01:00
Stefan Frederik ba31530e87 fix wrong displayed menu accelerator in Properties->View 2021-03-17 00:52:33 +01:00
Stefan Frederik 500feade8d Joanne fixes for potential crash in align_sch_pins_with_sym() if there is a sym/sch pin number mismatch. Moved box declaration to beginning of scope block for C89 compatibility 2021-03-07 00:15:16 +01:00
Stefan Frederik 0d3ebf7da9 add simulation menu option to create simulation/ dir under current schematic dir (local_netlist_dir) 2021-02-14 23:18:25 +01:00
Stefan Frederik df4aa83b01 fix "load most recent file" if file contains spaces. better handling of missing editor 2021-02-14 15:04:14 +01:00
Stefan Frederik 9825349f0d report error if editor not found while opening/editing with editor (netlist, stimuli file attributes) (xschemrc editor variable) 2021-02-14 13:05:11 +01:00
Stefan Frederik 9828c132ad better xschem.help formatting 2021-02-12 18:03:30 +01:00
Stefan Frederik fd561a9101 add as comments in netlist absolute paths for .sch and .sym of all expanded subcircuits 2021-02-09 23:04:26 +01:00
Stefan Frederik 238c9f592d fix -N option for output netlist filename 2021-02-09 17:19:37 +01:00
Stefan Frederik b7686bfe5c ngspice annotator: avoid adding "x" to node path names if not in spice netlist mode 2021-02-08 02:15:15 +01:00
Stefan Frederik 3d5e859766 ngspice_annotator: implicitly add "x" to subcircuit instance names that do not begin with "x" or "X" 2021-02-08 01:57:37 +01:00
Stefan Frederik 906dc4212e windows png/pdf export 2021-01-28 23:09:37 +01:00
Stefan Frederik 7bdc33d8c1 dont break .write in addition to .include lines 2021-01-24 04:23:06 +01:00
Stefan Frederik 1c19976ff5 dont break .inc in addition to .include lines 2021-01-24 04:19:52 +01: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 4fd65005a1 new_wire(): update connecting bubbles when inserting new wires and no one is highlighted 2021-01-19 13:32:45 +01:00
Stefan Frederik e25f8c308a debug messages 2021-01-17 18:06:02 +01:00
Stefan Frederik 34a664e62f Fix: set_replace_key_binding was not working due to missing global array declaration. 2021-01-17 18:01:19 +01:00
Stefan Frederik 934e16ab87 uniquify __UNCONNECTED_NODE__ by appending a unique number to avoid shorting multiple missing connecting nodes 2021-01-14 18:12:02 +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 afef3e059f better handle simulation interruption 2021-01-12 22:07:27 +01:00
Stefan Frederik 6bb6553ea6 add simulation driver in switch_level_sim.sch 2021-01-12 18:35:19 +01:00
Stefan Frederik 7efc069117 fix regression in merge_polygon() after adding fscanf validity checks 2021-01-12 16:14:43 +01:00
Stefan Frederik f1b3a2d3b1 sample schematic updates 2021-01-12 03:07:20 +01:00
Stefan Frederik dddaae5099 removed redundant update_conn_cues() in some graphic operations; lower priority mux operator for logic sim, Dont change logic value added ("U"), ability to simulate bidirectional switches and simple logic MOS transistor networks. added sample circuits. 2021-01-12 00:47:56 +01:00
Stefan Frederik 50028baa9f added Hi-Z in logic values 2021-01-11 19:31:47 +01:00
Stefan Frederik 990647f4fa check all fscanf return codes, for better broken file handling and to eliminate utterly-smart-compiler warnings ons some platforms 2021-01-10 16:11:34 +01:00
Stefan Frederik cea1069656 add "mux", "tristate" functions to logic expressions 2021-01-10 12:53:10 +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 d9bfbff26f move_objects(): clear lab_show.sym symbols if nets get unhilight after wire deletion 2021-01-08 05:39:43 +01:00
Stefan Frederik db4b372719 delete(): clear lab_show.sym symbols if nets get unhilight after wire deletion 2021-01-08 05:26:37 +01:00
Stefan Frederik a7831ce972 some fixes regarding restore of areas when hilights are present, move_objects and copy_objects(): ELEMENT move/copy out of cadlayer loop. 2021-01-08 03:09:29 +01:00
Stefan Frederik c806289bee almost eliminated draw_hilight_net(1); draw() takes care of it faster 2021-01-07 18:46:39 +01:00
Stefan Frederik acb1c28921 find_inst_to_be_redrawn() fix speed issue when auto-net name showing is enabled: evaluate out of any operation loop, using hash table of changed nodes 2021-01-07 16:35:57 +01:00
Stefan Frederik 5cc1f04588 move.c: removed redundant drawing, now all areas are restored from pixmap by draw(). Postscript print: addition of (limited) unicode characters (0xC2 and 0xC3 2-byte sets are recoded to fit into the 256 slot postscript core font dictionaries). When editing multiple text objects with "preserve unchanged attrs" set do not change individual text dimensions. 2021-01-07 04:33:19 +01:00
Stefan Frederik f0256fce90 added draw() im move.c 2021-01-06 13:50:31 +01:00
Stefan Frederik c2b1edd2ab typo 2021-01-06 13:48:34 +01:00
Stefan Frederik 78b348c206 typo 2021-01-06 13:32:05 +01:00
Stefan Frederik fa2c55ba16 correctly unhilight instances after changing net labels 2021-01-06 13:29:14 +01:00
Stefan Frederik 7fc5b4cf1a various fixes for corner cases where changing labels of hilight nets (update inst[].color), update symbol bboxes when toggling show_pin_net_names 2021-01-06 05:47:05 +01:00
Stefan Frederik b25bd1d06d saving to file made 4x faster, this implies less latency due to undo buffer savings on freaking big schematics. 2021-01-06 03:01:14 +01:00
Stefan Frederik d64c8abb40 add -pg also in LDFLAGS if --profile is requested; add little more margin in ps page exports 2021-01-06 00:12:04 +01:00
Stefan Frederik 63f266c905 add sample file for custom menu additions 2021-01-05 15:55:12 +01:00
Stefan Frederik 229241c4a4 fix uncommented line (xschem start window) in xschemrc and link in doc main html page 2021-01-05 03:53:55 +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 ce7f1d7dbf added rotate operator in logic function description 2021-01-04 17:24:57 +01:00
Stefan Frederik 2e0aa85408 more comments in sample xschemrc 2021-01-04 15:42:38 +01:00
Stefan Frederik 6cac6f2291 cleanups in sample xschemrc comments 2021-01-04 15:19:08 +01:00
Stefan Frederik 89f32313c3 doc updates; only hilight connected instances (when doing a net highlight) if symbol (or instance) has highlight=true attribute set. 2021-01-03 17:34:08 +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 65fc659129 prepare(3) for delete connection implementation 2021-01-03 00:08:43 +01:00
Stefan Frederik 61fcefa987 prepare for delete connection implementation 2021-01-03 00:06:41 +01:00
Stefan Frederik cf5813970c prepare for delete connection implementation 2021-01-02 23:42:22 +01:00
Stefan Frederik 044892a7b3 documentation updates 2021-01-02 22:18:46 +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 1fe6508704 ngspice_probe type set from "probe" to "ngprobe" to avoid clashes 2021-01-02 19:44:01 +01:00
Stefan Frederik b76dcb0d95 moved couple of selection functions from hilight.c to select.c 2021-01-02 19:28:51 +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 6c98d34c65 make in_memory_undo work again (some variable changes missing after code refactoring) 2021-01-02 02:05:13 +01:00
Stefan Frederik 94cd0d0c7d hash_hi() made faster by caching sch_path_hash[] 2021-01-02 01:55:01 +01:00
Stefan Frederik a3d2b0c162 optimized bus_hilight_lookup() in case of non bussed nets (avoid expandlabel) 2021-01-01 21:43:08 +01:00
Stefan Frederik 304f7eee08 removed code duplication in logic_set() 2021-01-01 21:08:02 +01:00
Stefan Frederik 5f48a0ffe9 some comments in hilight routines 2021-01-01 16:32:50 +01:00
Stefan Frederik ec8eb99388 code cleanups, eliminated dead code 2021-01-01 15:43:27 +01:00
Stefan Frederik 8cd8542299 code cleanups, eliminated dead code 2021-01-01 15:25:30 +01:00
Stefan Frederik b6b6bb4f27 Fix: add symbol to space-hash in place_symbol() must be done before invoking symbol_bbox(); optimized eval_logic_expr() 2021-01-01 01:10:43 +01:00
Stefan Frederik a5c4bf8aae adjust comments 2020-12-31 18:06:54 +01:00
Stefan Frederik f18125a943 fix debug message potentially causing a crash in copy operations 2020-12-31 04:46:59 +01:00
Stefan Frederik 14d6cdc548 debug message on unconnected output in sims 2020-12-31 04:19:08 +01:00
Stefan Frederik c57b8f41ac unused data removed 2020-12-31 03:19:09 +01:00
Stefan Frederik a9d7d93e40 caching simulation data into "simdata" struct for performance 2020-12-31 03:08:24 +01:00
Stefan Frederik 14ead18ea4 "propagate_to" attribute for pins renamed to "goto" 2020-12-30 21:26:58 +01:00
Stefan Frederik c6bb28332e small perf. optimization in propagate_logic() 2020-12-30 02:21:46 +01:00
Stefan Frederik 92ba91042f fixes and comments in annotation schematic examples 2020-12-29 23:17:00 +01:00
Stefan Frederik 8cb3172f42 remove dbg msg 2020-12-29 15:42:45 +01:00
Stefan Frederik abce6ac29c fix make_sym.awk duplicating name= attribute in generated symbol 2020-12-29 15:41:15 +01:00
Stefan Frederik 7ba3001066 fix make_sym.awk duplicating name= attribute in generated symbol 2020-12-29 14:14:32 +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 921885d654 make lookup of logic attributes faster in symbol examples 2020-12-29 00:14:23 +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 78da56aec5 added oldvalue in hilight hash table to track differences 2020-12-28 15:50:00 +01:00
Stefan Frederik 1773a2e8d2 Some more global state into Xctx 2020-12-28 14:01:03 +01:00
Stefan Frederik bcf8986314 Some more global state into Xctx 2020-12-28 13:44:10 +01:00
Stefan Frederik 4687133b5f fix unfreed pointer in get_logic_value() 2020-12-28 12:29:57 +01:00
Stefan Frederik 47ed76374e fix value for "non hilight condition" on instance .color field as small negatives are used for simulation 2020-12-28 04:47:26 +01:00
Stefan Frederik 41d9e17527 option for transparent background in svg export; added ngspice backannotation tutorial 2020-12-28 02:52:44 +01:00
Stefan Frederik 9e9cac0516 remember last directory in export png/svg/pdf/ps, added missing symbols 2020-12-27 22:59:15 +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 625b378bdd comments in the code 2020-12-27 02:04:42 +01:00
Stefan Frederik 5295a6281c fix a regression in sort_labels.awk after moving tmpfile to /tmp; added oldvalue (for simulation) in hilight hash table 2020-12-26 23:53:26 +01:00
Stefan Frederik 40eaefbb82 removed logicx() obsoleted function 2020-12-26 23:05:07 +01:00
Stefan Frederik 9b4534d6b0 A change_linewidth(-1.0) is added after resetwin() creates a new pixmap (example: after a window resize) . This sets colors, backgrounds fill styles for the new pixmap. 2020-12-26 22:29:45 +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 9604b8cc82 removed redundant code in calc_drawing_bbox(),removed trim_wires, push & pop undo in print export routines, exported images should be wysiwyg 2020-12-25 21:31:15 +01:00
Stefan Frederik 10e47b980b folding long lines 2020-12-25 15:37:26 +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 6e8486bbf2 add mising parameter in text_bbox() needed if compiling without cairo, tedax_netlist updated to be in line with other backends. 2020-12-24 12:23:48 +01:00
Stefan Frederik fe42f65ec0 some adjustments to make xschem work without warnings if compiled with 18 years old tcl-tk 8.4, check for unconfigured simulators/viewers (example: running a simulation on tedax netlist), various fixes for the drill_hilight() function 2020-12-24 05:18:50 +01:00
Stefan Frederik 5bd6d565d1 propagate_hilights does a prepare_netlist_structs() to ensure consistent connectivity and avoid crashes when returning from lower level symbols; specialized there_are_hilights() function that tells if there still are hilights in the hash table. Checking hilights in current level of hierarchy only is an error since there might be hilights in other hierarchies. 2020-12-24 01:13:37 +01:00
Stefan Frederik b7b9d666a9 fix: avoid doing any erc checking/highlights if a schematic is explicitly loaded without linking components to symbols. This is done for instances with (spice|verilog)_stop=true attributes set to prevent unwanted symbol expansion 2020-12-23 18:16:53 +01:00
Stefan Frederik 02f0a416cc -a -m check for unbound instances (Joanne fix) 2020-12-23 15:57:28 +01:00
Stefan Frederik 5f39beab1d code formatting 2020-12-23 12:06:04 +01:00
Stefan Frederik 69b465805a eliminated unused var 2020-12-23 05:09:14 +01:00
Stefan Frederik d0fb5f94e0 eliminated some global vars 2020-12-23 05:07:39 +01:00
Stefan Frederik 11a054946b better gsave/grestore in ps/pdf export 2020-12-23 02:59:44 +01:00
Stefan Frederik c58645b8e6 fix connection bubbles not updated when adding "2 segment manhattan lines" , svg export draws highlighed nets if any 2020-12-23 02:14:27 +01:00
Stefan Frederik 26b5b67262 code formatting 2020-12-22 22:37:39 +01:00
Stefan Frederik 1cfea4d1d3 svg_draw(): do not print unused layer stylesheets, error check when opening file for printing 2020-12-22 18:31:08 +01:00
Stefan Frederik 0783ff7002 fix error in link_symbols_to_instances(): potential call of symbol_bbox() -> translate() -> prepare_netlist_structs() before completing xctx->inst[i].lab assignments 2020-12-22 16:10:27 +01:00
Stefan Frederik 9b262299ba typo in svgdraw.c 2020-12-22 14:05:51 +01:00
Stefan Frederik 5e0ba4766b use Sans-Serif for svg default font instead of SansSerif that is unrecognized on some browsers 2020-12-22 13:08:11 +01:00
Stefan Frederik ae11f27db0 make svg/ps font naming consistent between tcl/c. Filter out some code if X not available (command mode) 2020-12-22 11:35:42 +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 d46abbeec1 use SansSerif default font instead of Helvetica: more general and better matching with browser display 2020-12-20 22:28:10 +01:00
Stefan Frederik 0970555869 removed obsolete --a3page command option 2020-12-20 20:42:07 +01:00
Stefan Frederik 35efb0228a speed up draw selection for big datasets, make "drill_hilight" work again after hilight infrastructure changes, fix hilight elements with errors after netlisting, after hilight changes 2020-12-20 19:48:37 +01:00
Stefan Frederik dfa58a0a08 spaghetti code removal, more reused code 2020-12-20 15:56:29 +01:00
Stefan Frederik 43f6dc03a4 fixed typo in spice.awk 2020-12-20 12:46:00 +01:00
Stefan Frederik 63a6a8767e resolved a slow path introduced in commit db6bee26 / r1406 ( rebuild xctx-<inst[].color after undo/load ) 2020-12-20 02:09:38 +01:00
Stefan Frederik a737e53be4 after a paste schematic / ctrl-v leave ui_state to SELECTION so objects can be deleted without having to re-select them 2020-12-19 23:21:47 +01:00
Stefan Frederik db6bee268a Fix: paste/ctrl-v was not leaving elements selected; select highlighted elements was not setting ui_state to SELECTION making delete not functional. After an undo rebuild xctx-<inst[].color field of labels/pins from bus_hash_lookup info. 2020-12-19 23:11:26 +01:00
Stefan Frederik f3a3c2d10d clean up of search() function (removed spaghetti drawing code, use available functions) 2020-12-19 19:58:30 +01:00
Stefan Frederik bcedaa6bc5 various drawing optimizations to speed up full zoom views 2020-12-19 17:12:46 +01:00
Stefan Frederik 1184312527 various fixes around the highlight speed improvements 2020-12-19 05:06:57 +01:00
Stefan Frederik a837682731 caching "lab" and "highlight" attributes for speed 2020-12-19 03:22:38 +01:00
Stefan Frederik 41c46bd84b fix hilights when descending / going back 2020-12-18 19:43:45 +01:00
Stefan Frederik 821ebf06f2 optimizations in instance (connected to wires/net labels) highlights 2020-12-18 19:22:08 +01:00
Stefan Frederik 3611b95444 fix debug message causing a crash when doing a net highlight if design contains cells with no pins (filler, taps, etc) and highlight=true attr is set on symbols 2020-12-18 12:38:09 +01:00
Stefan Frederik 2e18119645 remove "m=1" in xyce spice netlists as xyce does not handle m param. Translate spice_probe ".save" to xyce ".print tran", handle different hierarchical expansion of voltage/current nodes in xyce for hierarchical ammeter/spice_probe probes 2020-12-17 18:26:46 +01:00
Stefan Frederik e46033f0bb fix regression due to r1395, updated Changelog, fix set initial window size when doing ps/pdf export from cli 2020-12-17 03:48:34 +01:00
Stefan Frederik 2e20b2c6d6 escape parenthesis in postscript texts 2020-12-17 02:49:37 +01:00
Stefan Frederik c13ca9218d fix correct version syntax when saving in file 2020-12-17 02:01:38 +01:00
Stefan Frederik a438d436bf xschem page aspect ratio decides if postscript or landscape for ps/pdf 2020-12-16 23:16:43 +01:00
Stefan Frederik 887280d8a2 better postscript page align 2020-12-16 18:56:38 +01:00
Stefan Frederik 5b4d6ab640 postscript fonts in ps/pdf export 2020-12-16 18:30:33 +01:00
Stefan Frederik 1bb59cf41a cleanup in postscript print 2020-12-16 10:48:15 +01:00
Stefan Frederik f22f7a26f5 allow to specify fixed, user defined line width (does not change on zoom) and allow specify if grid points should be same size as line width 2020-12-14 19:11:24 +01:00
Stefan Frederik ce5adbffdb added flatten_savenodes.awk for flattening in-subcircuit .save instructions 2020-12-14 16:31:20 +01:00
Stefan Frederik 5af6a38d2e allow ! in net names, it got deleted after the parselabel rework. 2020-12-13 20:26:39 +01:00
Stefan Frederik e89f0e4505 code formatting; xschem(): check for command not found 2020-12-13 00:00:48 +01:00
Stefan Frederik 03c42d3ecd code formatting 2020-12-12 22:48:25 +01:00
Stefan Frederik fc5b1a9616 code formatting 2020-12-12 20:50:06 +01:00
Stefan Frederik a3e1564c48 option for variable-width grid points for better visibility on hyper-resolution monitors 2020-12-12 13:36:39 +01:00
Stefan Frederik a642d6e05e if cadlayers set in xschemrc reduce / pad color lists accordingly; handle the case of insufficient number of layers set. Sorted "xschem" command "get" substrings for later lookup optimizations 2020-12-08 12:35:21 +01:00
Stefan Frederik 0ca9464f8f "Edit Attr" combobox in edit symbol attributes and edit global attributes was adding unnecessary quotes around the attribute 2020-12-07 21:08:13 +01:00
Stefan Frederik 89da7d9ffd use #if HAS_CAIRO!=1 indtead of HAS_CAIRO==0 2020-12-07 20:12:52 +01:00
Stefan Frederik bb64297b6e better #if/#endif configuration of various xrender/xcb/cairo combinations 2020-12-07 20:04:57 +01:00
Stefan Frederik e80896dbf9 added render_format assignment that got deleted after xinit code refactoring 2020-12-07 18:51:15 +01:00
Stefan Frederik c5c729fc89 tcl code indentation fixes, cleanup, some global vars removed 2020-12-07 15:46:20 +01:00
Stefan Frederik 4d56fcc72d indentation cleanups 2020-12-06 22:07:33 +01:00
Stefan Frederik c3ba3112e0 remove some redundant warnings in memory allocations, since all alloc calls have an ID and wrapper issues warnings in case of failures. Use some Tk wrapper functions to get X11 related data since all windows are already opened by tcl-tk. 2020-12-06 20:52:35 +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 fe1f7c57a7 "lazy man" (good enough for schematics) aproximated polygon clipping using the underlying xorg 16 bit integer poly clipping engine, by projecting outer vertices to the 16 bit signed coordinate system edges 2020-12-05 13:58:44 +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 f138db5aba fix linewidth when done with preview, also avoid to destroy & create main pixmap since it was saved 2020-12-05 04:12:56 +01:00
Stefan Frederik 780b994aeb use short data type for small integer data: rot, flip, dash, bus etc... 2020-12-05 03:16:01 +01:00
Stefan Frederik 4e08f347da Tcl_SetResult() used in place of Tcl_AppendResult() in xschem() whenever possible 2020-12-05 01:20:35 +01:00
Stefan Frederik e6d522bf69 xschem() tcl extension function (scheduler.c) command lookup made much faster by ordering command strings 2020-12-05 00:01:09 +01:00
Stefan Frederik c3aad2fbfc remove dbg messages 2020-12-04 13:02:19 +01:00
Stefan Frederik e5205cfd1e Split mode netlisting in different formats got bitrotten due to a regression. Fixed. 2020-12-04 12:45:50 +01:00
Stefan Frederik 29d8b0c3a8 resetwin(1,1,1) instead of resetwin(1,1,0) in preview_window so save_pixmap is reset to correct size when switching back to main window 2020-12-04 02:27:35 +01:00
Stefan Frederik 1268a6faae removed redundant XSetTile in preview_window() 2020-12-04 01:38:48 +01:00
Stefan Frederik 76ef664757 undo data structures into xctx context 2020-12-04 00:30:13 +01:00
Stefan Frederik 2b7e31e0d6 add utility functions to create new schematic window 2020-12-03 23:17:13 +01:00
Stefan Frederik 2f3025cf3f rm debug msgs 2020-12-03 19:48:15 +01:00
Stefan Frederik 70cf1e8dfb fixed big performance issue when bulk-changing attributes on a big schematic and show_pin_net_names is enabled 2020-12-03 19:47:25 +01:00
Stefan Frederik ead42c17fa raise_dialog above main window 2020-12-03 18:43:48 +01:00
Stefan Frederik 3732bd8d01 put cairo save surface and context into xctx, faster and smoother preview (avoid unload/load if no filename change) 2020-12-03 18:21:23 +01:00
Stefan Frederik 66a73e4e99 cleanup in preview code 2020-12-03 11:49:29 +01:00
Stefan Frederik 4322101f9b cleanup in preview code 2020-12-03 11:46:00 +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 8902f3b56b more state in xctx context 2020-12-02 19:35:42 +01:00
Stefan Frederik fe46725c0c in case of vector instance names and spiceprefix attr set apply spiceprefix to all members, not only on first one 2020-12-02 17:33:01 +01:00
Stefan Frederik e279262f00 more globals into xctx context struct 2020-12-02 15:10:47 +01:00
Stefan Frederik 2dc28726d3 turn off dbg messages 2020-12-02 12:50:08 +01:00
Stefan Frederik aef66d6ff6 clear debug msg 2020-12-01 14:39:02 +01:00
Stefan Frederik 83ae1c01b6 ERC checks: do sch/sym node equivalence check on expandlabel()'ed nodes, avoid flagging DATA[5,3,1] != DATA[5:1:2] != DATA[5],DATA[3],DATA[1] 2020-12-01 13:43:15 +01:00
Stefan Frederik 08e179e588 better cmdline filename path parsing 2020-12-01 13:25:00 +01:00
Stefan Frederik 2bd8a93889 preserve backslashes in instance name after doing an editprop(). get_tok_value() fix: do not eat "\" if called with with_quotes=1 2020-12-01 12:00:18 +01:00
Stefan Frederik 1055fdbf36 bounding box fix while copying objects done in r1224 was not correct. Object rotation fixed now 2020-12-01 00:03:29 +01:00
Stefan Frederik 7da61bc054 draw wide lines (bus=true attribute) in svg export 2020-11-30 23:20:06 +01:00
Stefan Frederik c8dc48f916 fix: load_wire() was using storeobject() for storing data, causing unwanted modify=1 flag (this has various side effects including changing window title) 2020-11-30 22:48:08 +01:00
Stefan Frederik 3f6a9ab1f8 allow new lines in net names (!) 2020-11-30 22:12:31 +01:00
Stefan Frederik 4ea2dde800 add ":" allowed char in instance names , this disappeared during the parselabel.l rewrite 2020-11-30 21:07:42 +01:00
Stefan Frederik db8186c213 fix mapping issue in hiertEDAx code. Thanks to Hannu for pointing it out. Allow newlines in (quoted) long vector labels, like: "AAA,BBB,\nCCC,DDD,EEE" 2020-11-30 21:01:33 +01:00
Stefan Frederik b726eb27a6 more verbose ERC message about missing attrs on pins while netlisting 2020-11-30 17:33:15 +01:00
Stefan Frederik b910d74d56 expandlabel.y: allow meaningless syntax without botching. Let the user rule 2020-11-30 14:04:38 +01:00
Stefan Frederik 7548e7a21b added some more allowed characters in node naming (parselabel.l) 2020-11-30 12:15:05 +01:00
Stefan Frederik 5533ca87a4 updated parselabel.l to allow more generic node names and/or spaces: these are now valid "a a,bb[3 : 0] , ccc", "1,2,3" and various other improvemenst and "ugly" code removals 2020-11-30 01:36:28 +01:00
Stefan Frederik eda64b7ee1 removed event_reporting feature 2020-11-29 03:27:45 +01:00
Stefan Frederik eb2d143e77 more consistent get_tok_value() regarding escaping 2020-11-29 01:59:17 +01:00
Stefan Frederik b1a1442012 allow spaces in bussed nodes (A B,CC,D\ C, A B[3:0]), dont dump double quoted net names in netlists 2020-11-29 00:00:55 +01:00
Stefan Frederik d95eb0f871 fix repeated character in RE, fix changed syntax in verilog example 2020-11-28 20:08:40 +01:00
Stefan Frederik 9a03923b4e switch LC_ALL to "C" locale 2020-11-28 16:54:15 +01:00
Stefan Frederik d47a569f9f bussed nets/pins in hierTEDAx netlists 2020-11-28 16:41:35 +01:00
Stefan Frederik 0e35d65cac "xschem replace_symbol instance instname" --> "xschem replace_symbol instname", "xschem inst_pin_coord" made slot-aware, added comments in query functions 2020-11-26 13:31:42 +01:00
Stefan Frederik ad3059dd83 added some comments 2020-11-26 04:01:11 +01:00
Stefan Frederik 7a7868318b Added various procedures to select flat / hierarchical instances and re-route a terminal to a different net. reroute_inst -> change a pin connection, reroute_net -> change net updating all connected components. "xschem instances_to_net", "xschem instance_nodemap", "xschem instance_pin_coord" new query commands added. "xschem get expandlabel node" renamed to "xschem expandlabel node". 2020-11-26 03:46:55 +01:00
Stefan Frederik 01077ea162 Tell user to check ~/gaw/gawrc setting if tcp send waves to gaw fails 2020-11-25 01:46:26 +01:00
Stefan Frederik 8fe0553f96 fix crashing netlister crashing bug if required schematic files are missing (null hier path). fix hierEDAx when netlisting empty blocks 2020-11-24 17:37:27 +01:00
Stefan Frederik d7b0c27775 hiertEDAx: don\t split on escaped white space. test schematic with weird instance/net names 2020-11-24 15:25:37 +01:00
Stefan Frederik a9a3538a71 FIX: error after recursive expansion leading to wrong netlist 2020-11-24 13:30:42 +01:00
Stefan Frederik e1110a2c98 comment hashes in column 1 for hiertEDAx according to syntax rules 2020-11-24 11:57:57 +01:00
Stefan Frederik 9c5739b0f2 allow tEDAx (flattened) netlisting of hierarchical schematics; added pcb/hierarchical_tedax example 2020-11-24 02:54:45 +01:00
Stefan Frederik 7d2875649f fix $tok_list --> [list $tok_list] in text_line proc, so weird input does not cause issues in token parsing 2020-11-23 02:15:34 +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 Frederik 427bce91e7 use get_tok_size instead of returned value from get_tok_value() to decide if token was existing or not in attribute string 2020-11-21 01:23:00 +01:00
Stefan Frederik 84134e0d97 fix: make a copy of returned string to avoid overwrites 2020-11-20 22:02:43 +01:00
Stefan Frederik 0d59d01170 allow to pass down to tcl evaluation (via tcleval( ....) wrap) instance parameters: example of a mos transistor : name=m1 w=2 l=0.13 model=net ad="tcleval([expr @W * 0.29])" --> in netlist: m1 d g s b nfet w=2 l=0.13 ... ad=0.58 2020-11-20 18:46:27 +01:00
Stefan Schippers 759c44078e optimization: avoid calling get_tok_value in storeobject() if no attributes are given 2020-11-19 16:48:44 +01:00
Stefan Schippers 71fd1bcb68 comments about color handling in source code, set_cairo_color() function 2020-11-19 15:08:40 +01:00
Stefan Schippers 25cc006ffe removed a stray "closepath" for open polygons in postscript output 2020-11-19 11:28:04 +01:00
Stefan Schippers 20afce9ab6 code cleanups and small fixes in the svg export code 2020-11-19 01:17:22 +01:00
Stefan Schippers 070ec71800 reduce svg size by avoiding redundant attributes in elements, fix a regression in scheduler.c (missing else clause) 2020-11-18 23:20:50 +01:00
Stefan Schippers 4f53cd8dbd remove noop code after cleanups 2020-11-18 18:54:41 +01:00
Stefan Schippers bf183f0d20 Option (default now) to export svg images using the svg <text> element. This makes generated SVGs much smaller and in most cases faster to render. 2020-11-18 18:29:14 +01:00
Stefan Schippers 3c86f4ec64 more consistent function parameter names in svgdraw.c and draw.c 2020-11-18 12:46:57 +01:00
Stefan Schippers 78a82a9bc0 fix regression: ps and svg exports were broken due to enable_layer[] used for enabling selections 2020-11-17 02:17:34 +01:00
Stefan Schippers 7a67663330 fold long lines 2020-11-17 01:29:47 +01:00
Stefan Schippers 1634414b11 code comments 2020-11-16 16:59:55 +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 fac9cfe26b folded long lines 2020-11-16 12:33:06 +01:00
Stefan Schippers 90f6d7ee90 cleanup debug messages 2020-11-16 02:25:43 +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 d22b4c9ea0 guard against extended ascii characters in nocairo/svgdraw/psprint function 2020-11-13 12:54:07 +01:00
Stefan Schippers f3c9160cc5 keep frequently allocated memory chunks cached in get_tok_value() for better performance 2020-11-11 19:01:22 +01:00
Stefan Schippers 7f771d6329 added variable "S" containing full schematic path in "Simulations->Configure simulators and tools". This can be used to add search paths to simulators. 2020-11-10 17:59:33 +01:00
Stefan Schippers 9b5bd75ec8 allow tcl commands ( [..cmds..] ) in Simulation->configure simulators and tools (useful to retrieve needed information about current dir etc.). 2020-11-10 17:48:26 +01:00
Stefan Schippers 61dd4e99b0 better xschem icon: added shapemask for "transparent" background 2020-11-10 13:17:25 +01:00
Stefan Schippers f837353429 simpler glob expressions in xschem.tcl 2020-11-09 11:49:24 +01:00
Stefan Schippers e6808f844a better syntax for timeout cancel in gaw_cmd 2020-11-08 18:06:55 +01:00
Stefan Schippers ec6ad39acc synchronize command sending to gaw with gaw replies so at the end the tcp channel is closed gracefully (avoid port in use error messages). Timeout whatchdog is set to prevent forever waits/deadlocks. 2020-11-07 21:07:16 +01:00
Stefan Schippers 3f76397522 better synchronization of gaw_cmd so multiple commands are sent to gaw. However tcp file descriptor remains active for subsequent commands. Next improvement: count replies from gaw client and close file descriptor when last reply read. 2020-11-07 14:40:49 +01:00
Stefan Schippers 24dd02b713 Fixed Windows Xschem running from VS2019 without installing Xschem to find (Root)/xschem_library/devices as XSCHEM_LIBRARY_PATH, so that viewing schematics through VS2019 will find all symbols in xschem_library/devices. Moved doc and xschem_library XML files to its own *.wxs. Cleaned up Product.wxs by taking out doc and xschem_library files; fixed spacings in License.rtf; added condition that proper version of Active TCL is required to install 2020-11-07 10:52:50 +01:00
Stefan Schippers 191b4d8ed3 added m parameter to npn.sym and pnp.sym, text attribute edit dialog box renamed from .t to .dialog so it will be always raised on top of xschem window 2020-11-06 19:29:09 +01:00
Stefan Schippers 2a5e5a80cc put braces around "expr" tcl statements as this boosts speed 2020-11-05 00:57:16 +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 34a1cb8950 execute_fileevent: do not reset pipe to blocking mode before closing if no status is requested: this avoids close blocking if executed process closes its stdout / stderr file descriptors before ending 2020-10-31 01:45:59 +01:00
Stefan Schippers 01ed63275b do not set dircolor(...) default item colors if dircolor array defined in xschemrc 2020-10-30 01:22:25 +01:00
Stefan Schippers 73bab32aa9 __unix__: do simple tilde subst ( ~/ --> /home/user) just in case this was not done by the shell 2020-10-27 22:56:53 +01:00
Stefan Schippers 5706b12ad9 do not execute tcl proc "build_windows" in xinit.c if no X or -x option given 2020-10-27 12:00:34 +01:00
Stefan Schippers b24c9ed763 fix an issue if "xschem ./sch_file.sch" is given on commandline, in this case load_file() will set current_dirname to /some/path/., this confuses abs_sym_path, so remove trailing /. in this case. 2020-10-26 02:31:47 +01:00
Stefan Schippers 24370cb752 updated "xplot" file syntax according to recent ngspice changes 2020-10-26 01:50:45 +01:00
Stefan Schippers 460ebe561d sqwsource.sym: better labels, various fixes, comments and more debug messages in tcleval() stuff, some fixes (error checks) in "device_model" related model_name() function 2020-10-25 03:03:23 +01:00
Stefan Schippers 679348b7f8 "Delete files" menu command added 2020-10-24 23:46:19 +02:00
Stefan Schippers 8602fa7bb6 added Shift-I bindkey as an alternative to Insert key (missing on Apple machines) to insert a component 2020-10-24 23:07:45 +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 41e5d02edb error check for strrchr() NULL return value in print_spice_element() 2020-10-24 03:15:08 +02:00
Stefan Schippers 032bbf6f24 fixed error in tripping off "eval(...)" wrapper from string in print_spice_element 2020-10-24 03:11:37 +02:00
Stefan Schippers 27d1a9e477 get_tok_value: even if called with "with_quotes=2" do not skip unescaped backslashes that are outside "quotes". Added dynamic netlisting test circuit in examples 2020-10-23 23:17:55 +02:00
Stefan Schippers 2ffb4f792e according to answer from ngspice guys ngspice does not accept continuation lines for .title, .include and .lib statements, so break.awk will avoid breaking those lines. reversed default for tcl dim_background variable, so toggle colorscheme will work. 2020-10-23 01:19:03 +02:00
Stefan Schippers ca9786ce86 some "tcl_version > 8.4" conditions in xschem.tcl to ensure proper working on old (tcl/tk8.4) machines. 2020-10-22 04:16:48 +02:00
Stefan Schippers 1536e77b62 spice netlist postprocessing will not break ".include " lines as ngspice does not like these. make_sch_from_spice.awk adapted to import sky130 standard cells, spice netlister will print extra nodes (inherited connections or pins-by-attribute) in the order specified by the format string, instead of dumping the "extra" attribute after all "real" pins, this allows to mix attribute pins with the other pins. 2020-10-21 18:18:53 +02:00
Stefan Schippers 65b7e318a9 yet amoother typo in comment 2020-10-21 00:14:31 +02:00
Stefan Schippers 3bb92f1e0d better comment in resetwin() 2020-10-21 00:11:03 +02:00
Stefan Schippers 1ec0745b54 add another condition in resetwin() to ensure the saved pixmap is reassigned to main window when returning from preview 2020-10-21 00:04:10 +02:00
Stefan Schippers 40a628dc34 resetwin(): force creation of new save_pixmap even if no resize *if* preview_window==1, since we *want* a different pixmap for preview 2020-10-20 23:45:30 +02:00
Stefan Schippers b4681b22af aligned linux code to windows: check if preview pixmap != main pixmap before destroying. probably not needed but good practice 2020-10-20 23:34:40 +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 3bbba8601f added ngspiec_probe.sym and ngspice_get_value.sym that use a pull method to fetch values from ngspice .raw datafile, fixed a long standing bug that changed bounding boxes of symbols that were selected for a copy if they were copied and copy operation involved rotations of flips. 2020-10-20 12:44:10 +02:00
Stefan Schippers 72e45216c2 spice_probe_dynamic.sym added to devices, retrieves node voltages with a pull method, so always updated, "@@pin" syntax in translate(), same as in format string for netlisting,print hilight nodes (ctrl-alt-j) will print .save instructions if netlist mode set to spice 2020-10-20 01:05:40 +02:00
Stefan Schippers c84d71b859 xschem setprop made way faster if "fast" argument is provided. Example "clear probes" launcher object in mos_power_ampli.sch. 2020-10-19 02:07:17 +02:00