Commit Graph

377 Commits

Author SHA1 Message Date
stefan schippers 3043989196 fix debug test 2023-01-23 12:17:47 +01:00
stefan schippers fd8f1e6b97 fix a regression in track_memory.awk (did not show leaking source code line) 2023-01-23 12:16:29 +01:00
stefan schippers cffe91146e free paddedData pointer in ascii85_encode() 2023-01-23 11:55:52 +01:00
stefan schippers 9b6b7bc19a Fix some compiler warnings and add a little optimization in ascii85 encoder 2023-01-23 11:49:08 +01:00
rafmag 898f229c61 Merge branch 'master' of https://github.com/rafmag/xschem 2023-01-22 19:44:58 -07:00
rafmag 9c83801d8f Added Ascii85Encoding for better formated & smaller PS files. 2023-01-22 19:35:10 -07:00
stefan schippers 6af6079084 set line buffering when stderr redirected to file 2023-01-20 18:25:43 +01:00
stefan schippers 90bc0fa572 "preserve unchanged props" will be automatically checked when editing attributes on multiple object selection and unchecked on single object selection as this is the 99.9% use case 2023-01-20 00:35:24 +01:00
stefan schippers 6f6bd65035 fflush() all stdio buffers before calling fork(). End child processes with _exit() instead of exit() to avoid double fflushing in parent i/o streams 2023-01-19 02:46:45 +01:00
stefan schippers e06bfe5191 remove some debug changes 2023-01-18 01:17:46 +01:00
stefan schippers 03b2b8652e fixed filter_data routine that was clobbering ps export file, now ps output is correct without the need to add fflush() functions, that are thus removed in psprint.c 2023-01-18 00:24:28 +01:00
stefan schippers af0ddb76f0 cleanups, remove redundant png_reader() definition 2023-01-17 01:23:34 +01:00
stefan schippers 19757ddd8a add menu properties -> Edit header/License text, to allow inserting header or license metadata into the sch/sym file. 2023-01-02 03:04:35 +01:00
stefan schippers 9fa05afad9 fix a bug when loading multiple AC sim datasets (wrong nvars calculation, has to be doubled due to Im/Re complex components) 2022-12-20 01:01:58 +01:00
stefan schippers 2cb58c5c5c added generators/ dir, removed redundant variable in load_schematic() 2022-12-19 23:05:09 +01:00
stefan schippers 1a76f89464 added xschem_library/generators directory for future schematic/symbol generator scripts. Handle empty XSCHEM_LIBRARY_PATH (use [pwd]). 2022-12-18 13:03:38 +01:00
stefan schippers 9c31682517 test and get reading schematics from the web on Windows working 2022-11-18 16:06:06 +01:00
Stefan Frederik e27eea8233 added comments and a fix in descend_symbol() 2022-11-15 15:08:11 +01:00
Stefan Frederik a7066600b4 use tmp subdirectory: better string matching 2022-11-15 13:21:16 +01:00
Stefan Frederik 8f6aaa0ec2 use tmp subdirectory to group web schematics 2022-11-15 12:59:52 +01:00
Stefan Frederik c9380bd8f0 use local name (/tmp/xxx.sch) when displaying schematic name in title, indtead of full url (too long) 2022-11-15 10:25:19 +01:00
Stefan Frederik b2f159706c if loading a new schematic (currsch==0) reset current_dirname 2022-11-15 02:10:18 +01:00
Stefan Frederik 6cd9d76f90 initial implementation of fetch schematics from web 2022-11-15 01:17:33 +01:00
Stefan Frederik ca8ffafe8a code refactoring (update_conn_cues()) 2022-11-07 14:23:57 +01:00
Stefan Frederik 153929806b fill attribute on rectangles to override layer fill style: fill=false will not fill 2022-10-29 23:49:00 +02:00
Stefan Frederik cb652adb5f skip NULL or empty texts in draw_symbol, translate2() skip @@... and @#... tokens (return empty) 2022-10-21 17:48:54 +02:00
Stefan Frederik 4e05fe1bab comment some unneeded dbg messages, update install html page 2022-10-21 12:54:02 +02:00
Stefan Frederik a6dc3d47c3 cache embed attribute of instances for faster lookup 2022-10-21 11:04:20 +02:00
Stefan Frederik 0f25befe31 recursive attribute substitution. use also template attribute of parents if not found in instance prop_ptr 2022-10-20 10:30:48 +02:00
Stefan Frederik 59fb225a36 fix potential string overflow. Thanks JL 2022-10-18 08:38:09 +02:00
Stefan Frederik 33d9afd3a1 avoid hardcoded (relative) paths for label/pins searching, use more general find_file method 2022-10-17 17:20:40 +02:00
Stefan Frederik dad83010f0 perf. improvements in plot_raw_custom_data() / ravg_store() 2022-10-17 15:17:47 +02:00
Stefan Frederik b0359d880a use sim_pinnumber for port ordering in simulation netlists and leave pinnumber for package pin position. These two collide, for example in spice port ordering vs (transistor problem) device package pinnumbers. Dont load graphs in lcc symbols 2022-10-17 12:05:54 +02:00
Stefan Frederik 78ca99e4bf save symbol with ordered pins if pinnumber is present in all pins 2022-10-16 22:26:35 +02:00
Stefan Frederik 407bac461d sort symbol pins: remove useless debug messages 2022-10-16 16:23:00 +02:00
Stefan Frederik fc576f69ac sort symbol pins if key pinnumber is present on all of them 2022-10-16 16:18:38 +02:00
Stefan Frederik e8b2385f24 update xschemtest hashes, uniquify allocation IDs 2022-10-16 14:21:22 +02:00
Stefan Frederik 91ba5fd1d3 annotation of voltage and currents in (nested) LCC instances 2022-10-16 13:08:52 +02:00
Stefan Frederik 0e6c35f598 translate2(): return @spice_get_voltage* strings unchanged; get rid of "@#..." tokens in translate2 (return empty) 2022-10-15 22:50:18 +02:00
Stefan Frederik 93fe5bf414 fix handling empty return value of translate2() in load_sym_def() 2022-10-15 11:16:36 +02:00
Stefan Frederik 3adb192936 @spice_get_voltage(net) error checking 2022-10-15 10:52:07 +02:00
Stefan Frederik adf477fbcc optimization in translate(): @spice_get_voltage will use the "lab" attribute (if existing) to build up the net name to look up in raw file, before reverting to a call to net_name() to get the net from the attached net 2022-10-15 08:55:32 +02:00
Stefan Frederik 7c60f37f54 better atof_spice() suffix checking, set xctx->current_dirname to $PWD when creating an empty new tab (untitled schematic) 2022-10-13 16:45:27 +02:00
Stefan Frederik f7738329a5 my_fgets() 2022-10-13 13:43:01 +02:00
Stefan Frederik 150c2663b9 added netlist_options as list of symbols not to load in schematics-as-symbol instances, load_file_dialog: make remember last dir work again 2022-10-09 23:49:28 +02:00
Stefan Frederik 5fe2f1586b refactor str_hash_* and int_hash_* functions 2022-10-05 01:18:45 +02:00
Stefan Frederik 9c29324c8a allow nets with no label pass thru symbols with duplicated pins. named nets will propagate through duplicated pins 2022-10-04 12:34:09 +02:00
Stefan Frederik 29d6655a01 use limiting mylog()/mylog10() functions in expression calculator 2022-10-03 18:29:36 +02:00
Stefan Frederik 4bbed85d23 faster jump table in plot_raw_custom_data(), added simulation->add waveform reload launcher 2022-10-03 11:15:14 +02:00
Stefan Frederik d174306880 added verilog_extra attribute for list of implicit node connections to symbol in verilog netlists. extra attribute still used in verilog as a list of attributes NOT use as component attributes / symbol parameters. 2022-10-03 01:20:33 +02:00
Stefan Frederik 28c644fba7 doc updates (new graph functions) 2022-10-02 20:52:17 +02:00
Stefan Frederik 9acbf3fb41 added prev(), del() function in graph processing. Extend calculation 1 or 2 point beyond viewport for exact deriv/integ/prev/del calculation at left edge 2022-10-02 11:05:29 +02:00
Stefan Frederik 5a39f7be40 cleanups in plot_raw_custom_data() 2022-10-01 10:38:27 +02:00
Stefan Frederik 6296bbc1c6 compile option for 2nd order 3-point backward derivative calculation formulaes for graph expressions 2022-09-29 18:22:55 +02:00
Stefan Frederik 6d17797d0b add Highlight->Select overlapped instances command 2022-09-27 18:35:42 +02:00
Stefan Frederik 472751dfc0 better file globbing in load_file_dialog 2022-09-27 13:15:04 +02:00
Stefan Frederik 48d1b44220 allow spice multipliers in numbers (20u, 10k, 20p) in graph expressions 2022-09-22 21:12:40 +02:00
Stefan Frederik 2487ee98e2 do not set time_last_modify (set to 0, undefined) when loading a schematic that does not exist (untitled) 2022-09-22 14:46:52 +02:00
Stefan Frederik d473e8b1ab updated docs with additional video on graphs and Xyce sim 2022-09-22 13:45:55 +02:00
Stefan Frederik 931c1520e3 make op backannotation in schematic work also if raw file loaded at hierarchy level > 0 2022-09-21 13:58:01 +02:00
Stefan Frederik e67ff344c8 cleanup/rename some xctx variables and graph-related functions, avoid drawing graphs using data file loaded from from schematics that are unmatched with current schematic or up in the hierarchy levels 2022-09-21 11:25:45 +02:00
Stefan Frederik ea702976ee cleanup/free data in read_dataset() on malformed input file 2022-09-20 23:16:59 +02:00
Stefan Frederik af475e00df xschem raw_read accepts an optional type argument after file name (tran, ac, dc, op, ...) to select type of simulation to load from raw file. New command xschem annotate_op will replace ngspice::annotate tcl procedure. 2022-09-20 16:49:42 +02:00
Stefan Frederik 7abceb3344 fix regression in ngspice::get_current, simplified voltage reporting in net label symbols 2022-09-20 00:12:27 +02:00
Stefan Frederik 7d6b33cda8 limit max size of embedded graph bitmaps in svg export. added deriv0() graph function, does derivative w.r.t. index 0 (sweep) variable, regardless of graph sweep (x axis) variable. 2022-09-16 12:16:26 +02:00
Stefan Frederik f644ce58a6 graphs are now rendered (as detailed png bitmaps) in svg exports 2022-09-15 19:39:16 +02:00
Stefan Frederik e5d60bb92a tuning of is_xschem_file proc to avoid misdetecton of valid files 2022-09-14 11:37:39 +02:00
Stefan Frederik 75db846e58 ask confirmation if pressing "s" for simulate; node lists in graph dialog box are returned as they are with no tcleval() resolution; poweramp.sch now can be simulated unchanged with Xyce 2022-09-13 00:31:20 +02:00
Stefan Frederik cd083c91e8 improve xyce netlist processing hooks (save ammeter currents), cmos_example.sch can now be simulated in ngspice and xyce 2022-09-11 13:21:24 +02:00
Stefan Frederik 9e7930c8e0 fix regression in raw_query list command, store all waveform names in lowercase and with ":" path sep translated to ".", so looking them up is faster (no need to try multiple searches) 2022-09-11 10:52:52 +02:00
Stefan Frederik 193cf397bd more Xyce integration, transform .save in .print tran, transform x1.x2.node to X1:X2:NODE in Xyce lookups, more checks for malformed raw files 2022-09-09 18:57:34 +02:00
Stefan Frederik 3ef32a1eef try more upper/lower case combinations in get_raw_index() function, removed some debugging messages 2022-09-09 02:11:09 +02:00
Stefan Frederik 9e9660c562 no trailing spaces in saved xschem files (there was one in version strings "v {...}" 2022-09-01 15:10:00 +02:00
Stefan Frederik 41acfd91dd some small code refactoring, allow multiple selected (bold) waves, one per graph, store the bold waves into file 2022-08-27 12:56:33 +02:00
Stefan Frederik d279783faa added menu entries to set and conmpare with schematic. 2022-08-25 13:59:36 +02:00
Stefan Frederik a2de3e9c1b Added compare_schematics() function. Empty graphs (no data loaded) are not editable. Set window title if opening a non-existent file. 2022-08-25 00:25:29 +02:00
Stefan Frederik d3cc957fa3 warning and highlight perfectly overlapped symbols 2022-08-19 10:56:26 +02:00
Stefan Frederik 2e37724959 add "Plotname: constants" to the list of recognized ngspice plots in raw file 2022-08-14 14:14:19 +02:00
Stefan Frederik dda7cb40db better recognize Xyce plot headers (Plotname: lines) 2022-08-12 00:06:14 +02:00
Stefan Frederik bd35e177f1 unselect_all() before inserting wire label or text from the menu to avoid moving previously selected objects 2022-08-09 23:08:00 +02:00
Stefan Frederik 89afd902ea get_raw_value(): return plain value, no implicit log calculation if log scale on axis. Zoom full scale X and X axis pan: use 1st sweep X variable, do not assume spice sweep variable (idx==0) 2022-08-08 09:52:33 +02:00
Stefan Frederik edf185616b Y log axis option in graphs 2022-08-08 01:18:42 +02:00
Stefan Frederik 15e367ba73 user selectable log X scale instead of assiming log X for AC analyses only 2022-08-05 00:57:03 +02:00
Stefan Frederik 7a0b5f3589 fix ngspice_backannotate.tcl: correctly backannotate ammeter currents; correctly handle multipoint Operating point data in graphs 2022-08-04 11:39:41 +02:00
Stefan Frederik 3b0589d2d1 store just magnitude and phase of AC vectors instead of dB and phase. Add db20() function to get dB values from magnitude in graph RPN expressions. 2022-08-03 17:44:53 +02:00
Stefan Frederik 56d3d8f5f3 recognize \r\n sequences on windows rawfiles in "Binary:" lines, just in case ngspice developers want to add it someday. Quote ROUT ('ROUT') values for output resistors in ngspice_logic gates 2022-07-28 00:36:09 +02:00
Stefan Frederik 5af2b8eb7a fix read_dataset() for windows 2022-07-27 11:06:54 +02:00
Stefan Frederik d86a422c59 do not segfault if reading ascii raw files. print error message and tell user to generate binary rawfile. 2022-07-26 12:05:28 +02:00
Stefan Frederik cd7eb3ab54 update license info 2022-06-24 00:36:12 +02:00
Stefan Frederik f882918931 more conversion warnings suppressed 2022-04-28 10:12:16 +02:00
Stefan Frederik 97911fe9fc text routines: longest_line made double (from int) for consistency 2022-04-28 00:00:51 +02:00
Stefan Frederik 23102433c2 fixed lot of conversion warnings/ bugs (int/double/size_t) 2022-04-27 13:18:45 +02:00
Stefan Frederik 069017e07c recursively resolve parameter passing throughout hierarchy and show resolved value in leaf cells if possible 2022-03-07 01:42:53 +01:00
Stefan Frederik c1a92ab5dc revert pro floaters. black hole, wrong approach 2022-02-22 12:09:04 +01:00
Stefan Frederik 2a205d298a TEXT_TRANSLATE flag: pro-floaters addition 2022-02-22 01:28:19 +01:00
Stefan Frederik 8be5ae7eb0 hide attribute for text items, not only if embedded in symbols 2022-02-21 10:53:06 +01:00
Stefan Frederik d457565c2d declared more functions static where possible and appropriate 2022-02-19 14:31:55 +01:00
Stefan Frederik 609f216f8d avoid redundant cleanup call (ravg_store()) 2022-02-17 01:37:04 +01:00
Stefan Frederik 798ecd74f3 running average ravg() wave processing operator 2022-02-16 20:24:22 +01:00
Stefan Frederik e3fe1029cd switch statements vs if-else-if in plot_raw_custom_data(); do not try to measure non existing waveforms due to expression syntax errors 2022-02-14 22:32:45 +01:00
Stefan Frederik c08cc359f3 plot_raw_custom_data() returns idx or -1 in case of expr syntax errors to avoid plotting junk 2022-02-14 19:28:24 +01:00
Stefan Frederik 4ebf3ea601 allow wave alias naming, fix off-by-one errors in plot_raw_custom_data() calls 2022-02-14 17:51:18 +01:00
Stefan Frederik a6b4d998d1 better node color tagging in graph edit property dialog 2022-02-13 02:51:14 +01:00
Stefan Frederik fbeae175dd refactor some variable usage in plot_raw_custom_data() 2022-02-12 13:29:18 +01:00
Stefan Frederik c6a7d8f9bb optimize custom data plots and expression evaluation, added avg() 2022-02-12 13:20:24 +01:00
Stefan Frederik c0d2951883 better expression parsing in plot_raw_custom_data() 2022-02-12 11:04:39 +01:00
Stefan Frederik defd2a92a7 rpn expressions in graphs 2022-02-12 04:55:02 +01:00
Stefan Frederik 62766fd618 cleanup test code for custom plots 2022-02-05 02:16:27 +01:00
Stefan Frederik 178d235de6 fix: check for empty xctx->graph_names 2022-02-05 00:38:05 +01:00
Stefan Frederik d6d932e730 fix save simconf (thanks mkk). put template code for custom function plots 2022-02-05 00:28:06 +01:00
Stefan Frederik d7c35a0a3d code comments added 2022-02-04 18:21:25 +01:00
Stefan Frederik d7b45bfbf9 cleanup raw_query sub command, added "values" opcode, speedup some "xschem" subcommands 2022-02-04 17:35:07 +01:00
Stefan Frederik 6fb20b8c5e (only) on fat32 or similar case insensitive FS and if case_insensitive is set to 1 in xschemrc do not consider case in symbol lookup 2022-02-04 02:56:11 +01:00
Stefan Frederik 1cb9645e9f xyce quircks/integration for ac analysis, refuse to stretch unscalable images, more example schematics 2022-02-03 00:40:59 +01:00
Stefan Frederik 008b289e4f ac analysis in graphs (mag + phase, log axis) 2022-02-02 18:33:16 +01:00
Stefan Frederik 5f82f63580 rename variable so tcc wont complain 2022-02-02 03:30:07 +01:00
Stefan Frederik 77b900569b correctly save embedded symbol attributes in embeeded symbols, do not save multiple times the same embedded symbol definition 2022-02-02 02:14:23 +01:00
Stefan Frederik a8e1a6c047 fix regression (tcl context was not saved/restored correctly) 2022-02-02 00:11:46 +01:00
Stefan Frederik 0b0e749801 Graph UI improvements. Persistent bold waves. Graph UI bug fixes 2022-01-28 04:44:07 +01:00
Stefan Frederik 038ef39bb5 UI improvements for graphs, change colors, insert waves etc 2022-01-27 20:47:27 +01:00
Stefan Frederik b978bd90fa images (rotated,flipped as the symbol) in symbols 2022-01-24 22:58:30 +01:00
Stefan Frederik c8ec7a77f2 allow embedding all image formats if a xxx-->png filter shell command is provided as attribute 2022-01-23 04:51:41 +01:00
Stefan Frederik 90f1a00a6f add filter_data() generic file conversion function 2022-01-23 01:21:36 +01:00
Stefan Frederik 320ad6e2aa embedded raw file storage 2022-01-21 19:17:43 +01:00
Stefan Frederik 694bda1250 protect new cairo code with #if HAS_CAIRO==1 2022-01-21 02:51:58 +01:00
Stefan Frederik e66abe36fa fix wave panning if a non graph added, better error reporting in png writer function, better flags option names for special objejcts (image and graphs) 2022-01-21 02:16:51 +01:00
Stefan Frederik a3ccc094f5 handle errors in image data, modified base64 decode to handle white space 2022-01-20 18:28:29 +01:00
Stefan Frederik 6fcdd46022 reordering of some function calls to prevent memory leaks 2022-01-20 01:57:53 +01:00
Stefan Frederik 3958faf1aa optimizations in image display, resolved some false leak report due to untracked mallocs 2022-01-20 00:47:15 +01:00
Stefan Frederik c3af523559 better data struct for embedded image 2022-01-19 23:28:19 +01:00
Stefan Frederik d22245b33a show and store embedded (png) images in schematics 2022-01-19 18:39:23 +01:00
Stefan Frederik 881b32a689 fix selection of merged instances done b4 calculating bbox (uninit. values) 2022-01-19 02:05:05 +01:00
Stefan Frederik 1fb23208bc remove all xrender and all xcb code, remove detection as well. Fix a couple of potentially uninitialized variables 2022-01-19 00:49:46 +01:00
Stefan Frederik 4379a68a19 HILIGHT_CONN macro 2022-01-16 14:49:59 +01:00
Stefan Frederik ecf07e6761 better handling of glob patterns in save/load dialog, recognize floater label tags in files 2022-01-16 12:42:55 +01:00
Stefan Frederik 231660989a fix undo regression on embedded examples due to prev commit 2022-01-14 17:07:17 +01:00
Stefan Frederik 627d122937 correctly skip embedded symbol info in file if not matching instance reference 2022-01-14 16:59:40 +01:00
Stefan Frederik 9f64e87b34 comments in source files 2022-01-14 14:56:13 +01:00
Stefan Frederik 6c85ceaad8 "hide(=true)" attribute to hide specific text items in symbols 2022-01-13 12:46:55 +01:00
Stefan Frederik e0eb450881 drop zero-size elements when opening a file 2022-01-13 03:09:45 +01:00
Stefan Frederik d6b513e1e2 issue warning if opening same circuit in different tabs, if tabbed if is active edit sch/sym in new window will do in a new tab 2022-01-10 18:54:07 +01:00
Stefan Frederik e238f571b0 code added for tabbed window interface 2022-01-09 05:14:25 +01:00
Stefan Frederik a0e057a52d added typedefs on used structs, updated xschemtest with new hashes 2021-12-28 01:33:01 +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 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 86ac93c369 some "box" vars changed to "rect" for consistency 2021-12-19 01:28:39 +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 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 e449543805 tclvareval() wrapper 2021-12-05 12:39:05 +01:00