Commit Graph

106 Commits

Author SHA1 Message Date
Stefan Frederik 0070498eb4 avoid printing "**** end_element" in spice netlist if current instance is skipped (no format or spice_ignore set); spice_probe_vdiff.sym will print .save v(n1) v(n2) instead of .save v(n1,n2) since this is how ngspice saves nodes (no differential voltage is saved) 2021-10-21 00:00:54 +02:00
Stefan Frederik 18e78a754c token prefix for LCC embedded schematics changed from $ to %. LCC schematics saved with embedded symbols should need to be edited (replace $ with %) 2021-10-17 22:31:07 +02:00
Stefan Frederik 95c0ad1572 better identify commented pieces of code 2021-10-17 22:05:55 +02:00
Stefan Frederik 6210f60232 fix erroneous removal of get_tok_size initialization to 0 in get_tok_value() (thanks to Joanne Low) 2021-09-23 21:06:14 +02:00
Stefan Frederik 08b5a3c87a fix tcleval(...) evaluation in spice netlist. it was disabled 2021-09-22 09:49:59 +02:00
Stefan Frederik f9ef05eabe execute tcleval(...) wrapped attributes in global tcl context, fix a bug (chopped newlines) in tclpropeval2 tcl proc 2021-09-20 12:08:24 +02:00
Stefan Frederik 46f5f9356a fix print_spice_element() for correct netlisting when tcleval(...) is used in some component attributes 2021-09-20 02:36:25 +02:00
Stefan Frederik 434e0f012b Any attribute embedded in a tcleval(....) construct will be passed by get_tok_value() down to tcl for evaluation. This generalizes what was done for the "schematic" attribute in 20210617 2021-09-20 00:55:33 +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 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 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 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 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 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 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 b63d3bec09 finalizing "select nets up to junctions" 2021-01-03 01:26:54 +01:00
Stefan Frederik 94cd0d0c7d hash_hi() made faster by caching sch_path_hash[] 2021-01-02 01:55:01 +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 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 a837682731 caching "lab" and "highlight" attributes for speed 2020-12-19 03:22:38 +01:00
Stefan Frederik 821ebf06f2 optimizations in instance (connected to wires/net labels) highlights 2020-12-18 19:22:08 +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 780b994aeb use short data type for small integer data: rot, flip, dash, bus etc... 2020-12-05 03:16:01 +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 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 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 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 d47a569f9f bussed nets/pins in hierTEDAx netlists 2020-11-28 16:41:35 +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 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 7a67663330 fold long lines 2020-11-17 01:29:47 +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 f3c9160cc5 keep frequently allocated memory chunks cached in get_tok_value() for better performance 2020-11-11 19:01:22 +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 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 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