Commit Graph

346 Commits

Author SHA1 Message Date
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 a9a3538a71 FIX: error after recursive expansion leading to wrong netlist 2020-11-24 13:30:42 +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 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 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 d22b4c9ea0 guard against extended ascii characters in nocairo/svgdraw/psprint function 2020-11-13 12:54:07 +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 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 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 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 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 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 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 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 632dbd8931 allow dim background color in "View -> Dim oclors" 2020-10-17 03:47:32 +02:00
Stefan Schippers a0661be86c "proc is_xschem_file" reports SYMBOL if file contains <=2 instances of symbols. Need to figure out a different, simple and reliable way to recognize symbols that contain a title and/or a "architecture" symbol. For the time being reverted to previous state. Thanks to JL for pointing out the issue 2020-10-16 22:47:27 +02:00
Stefan Schippers 35c2d0fa93 better node multiplicity detection in spice and verilog awk netlist post-processors (\?-?[0-9]+) 2020-10-16 00:13:39 +02:00
Stefan Schippers b88c4bab9e -m better relative path recognition in abs_sym_path 2020-10-15 18:42:08 +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 4362c44a8d fix various regressions: escape the ? pattern in awk, be more selective in ? node multiplicity tag recognition in spice.awk, yet some more fixes in abs_sym_path thanks to JL 2020-10-15 13:38:27 +02:00
Stefan Schippers 8e5bfe2a13 remove instname and symname parameters to tclpropeval2 as they are no more necessary 2020-10-14 23:44:53 +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 8bb6b0e3f7 pass name and symname to tcl_hook, add @symname_ext in print_spice_element 2020-10-14 21:04:45 +02:00
Stefan Schippers d92bd6590d restructure abs_sym_path 2020-10-14 14:59:55 +02:00
Stefan Schippers d696924615 fix: better handle relative paths 2020-10-14 12:59:55 +02:00
Stefan Schippers abb698ea63 fix regression: correctly resolve ../../some/path/to/file in abs_sym_path 2020-10-14 11:14:15 +02:00
Stefan Schippers f4e5f70de1 fix bug in ALLOC() macro, tcl_hook() function 2020-10-14 04:12:34 +02:00
Stefan Schippers 5d26115bd2 refactored token.c, differentiate between windows and unix in absolute filename construction in xinit.c 2020-10-14 01:38:51 +02:00
Stefan Schippers 1c2bbc609f added "xschem samefile" command to verify if 2 files are the same entity by comparing inodes, pwd_dir set in xinit.c to $env(PWD) if PWD var is defined as it does not dereference symlinks 2020-10-13 17:51:14 +02:00
Stefan Schippers 8ea275013e updated print_spice_subckt() to reflect updates done in print_spice_element(); abs_sym_path recognize ././././, ./., other strange paths., use $env(PWD) for current_dirname on startup instead of getcwd() if possible, to avoid dereferencing symlinks 2020-10-13 16:23:48 +02:00
Stefan Schippers 26fdaae83d if strings passed to translate() are encloded in tcleval(...) the translated string is passed to tcl for evaluation. This allows to display formula results for symbols, for example capacitance values based on W and L: tcleval(C=[ expr @ca * @L * @W ]) --> tcl will substitute the calculated value: C=1.234e-14 2020-10-12 17:25:57 +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 077fde9350 removed redundant command in xschem() command parser 2020-10-11 11:26:22 +02:00
Stefan Schippers b006c82bad slight resize in pin text size for better look. top frame in insert text dialog does not extend vertically. 2020-10-11 01:38:28 +02:00
Stefan Schippers 617d708009 verilog_preprocessor and verilog_timescale now use verilog_format instead of format (which is for spice), corrected verilog_netlist.c; better backslash and quote (") escaping and unescaping when using attribute select combobox; for unquoting use "xschem get_tok tok 2" instead of "xschem get_tok tok 0" + regsub ....(remove backslashes)... 2020-10-10 23:21:23 +02:00
Stefan Schippers 19753992f4 "Option->Show info win" moved to "View->Show ERC info window" 2020-10-09 17:36:22 +02:00
Stefan Schippers f419381361 added support for probing waveforms into gaw if raw file written by Xyce; Xyce uses uppercase, does not wrap voltage nodes into V(...). uses ":" instead of "." as hierarchy separator and other quirks. 2020-10-09 01:21:27 +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 a10cb2c429 added warnings (Options -> Show info window) if components are missing a name=... attribute / if symbols are missing a type=... attribute; eliminated usage of tcl "file normalize..." statements to avoid symlink dereferencing (if using symlinked libraries), aligned version/file_version tags in support awk scripts 2020-10-06 16:19:52 +02:00
Christian Svensson ac398820d9 make reload dialog text a bit clearer 2020-10-04 00:09:57 +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 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 da74e5ad36 Fixed some flaws in execute/execute_wait/simulate procedures (Simulate button was not cleared after a foreground simulation) 2020-09-24 02:20:09 +02:00
Stefan Schippers b7d724dcab apply visible layers (View->Symbol visible layers) to any object (lines. arcs, text etc),better bounding box calculation for slant text 2020-09-23 22:13:39 +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 2a556552c6 remove dbg info 2020-09-22 13:43:10 +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 bd06456bd6 fix Browse button in edit symbol prop dialog 2020-09-15 14:15:43 +02:00
Stefan Schippers 9561204c77 When loading/descending in a symbol set netlist_type to CAD_SYMBOL_ATTRS, set back to previous value when done. Tcl procedure "load_file_dialog" is now used also for saving files (so list of defined xschem libs is available as well as preview window). 2020-09-15 11:19:57 +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 4a332ade11 Bring open dialogs always on top of xschem main window if user clicks title bar on gnome/metacity DMs 2020-09-11 11:55:00 +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 e1751d5f58 remove experimental ::ttk namespaced widget usage 2020-09-09 00:33:00 +02:00
Stefan Schippers 6e5fe40c4a fix bind instructions for Windows Alt-*-KeyPress combinations, doc updates for fill attributes in shapes. 2020-09-09 00:21:40 +02:00
Stefan Schippers fce8ab8d1e remove dbg message 2020-09-07 09:40:07 +02:00
Stefan Schippers 2ee47d6884 typo 2020-09-07 09:37:30 +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 aad01a42f1 fix unitialized .dash field for rectangles (in the added pins in LCC schematics) 2020-09-04 09:42:18 +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
Stefan Schippers 1f73fb825c updated Xschem "About" links 2020-09-01 09:31:34 +02:00
Stefan Schippers 61df74b50b fix svg export if colorscheme changed via menu; allow monochrome svg export via menu Options -> Color Postscript/SVG 2020-08-31 23:11:20 +02:00
Stefan Schippers 08bf7cb962 defer tk windows/menu/widgets creation and Xevent binding setup after xinit.c completes X initialization. This avoids theoretical race condidions if a ConfigureNotify or Expose event is delivered before all Xlib initialization completed. 2020-08-31 13:54:37 +02:00
Stefan Schippers 4e48908902 svg and pdf exports use custom layer colors as set in ~/.xschem/colors file if any. 2020-08-30 12:01:48 +02:00
Stefan Schippers a419b6aa63 aligned pdf hardcopy colors to xschem light colorscheme, pdf and svg exports use the enable_layer[] array to display/hide layers as does draw(). 2020-08-30 10:38:29 +02:00
Stefan Schippers d879967fa8 less padding space around menu entries & buttons 2020-08-27 12:57:49 +02:00
Stefan Schippers ec29c2677a enable "preserve unchanged props" checkbutton in text edit prop dialog box 2020-08-24 16:21:50 +02:00
Stefan Schippers 4d6279e152 deleted obsolete code left after last commit 2020-08-24 08:56:48 +02:00
Stefan Schippers 1fa99bd840 added hcenter and vcenter fields and function parameters for centered text (still to be implemented though); When using edit property combobox token selector multiple times update all changed token values in attribute string (instead of only last changed token value), thanks to Joanne Low for pointing out the issue 2020-08-24 08:36:47 +02:00
Stefan Schippers b842e020bc snap and grid entries will not annoyingly receive keyboard focus with TAB key 2020-08-19 15:08:35 +02:00
schippes f4f90b87d2 fix for edit_prop dialog positioning as per Joanne Low feedback on windows, complete rewrite of subst_token() function as it was so intricated and full of malfunctioning corner cases that i decided to do a ground zero rewrite 2020-08-18 01:39:44 +02:00
schippes c5440c2b0f make get_tok_value() and subst_tok() work well also with strings containing tokens with no value. 2020-08-17 01:08:13 +02:00
schippes 574900e1df combobox is editable so new attributes can be directly typed in 2020-08-16 15:08:17 +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 58a43ccc4d code cleanups, preparing for editprop combobox token selector 2020-08-15 10:48:26 +02:00
schippes ff9e2e7872 when copying a symbol with edit_property dialog ("q" key) and enabling "Copy cell" if a relative path name is supplied for new symbol it will inherit the same path prefix as the original symbol. 2020-08-13 12:56:20 +02:00
schippes aeb6b12d73 fix rel_sym_path proc 2020-08-13 02:46:49 +02:00
schippes ea4513f9c5 changed tcl procs abs_sym_path and rel_sym_path, now the real symbol filename is obtained by prepending one of the XSCHEM_LIBRARY_PATH paths until the symbol is found. This allows more than one directory levels in symbol references. 2020-08-13 02:19:08 +02:00
Stefan SChippers 5e8df730a0 populating xschem git repo 2020-08-08 15:47:34 +02:00