Commit Graph

216 Commits

Author SHA1 Message Date
schippes 0d2738254a added verilogprefix symbol attribute: will be prefixed to symbol name references in verilog netlists 2022-11-22 16:30:59 +01:00
Stefan Frederik 3d49ca63c9 avoid tcleval() of strings returned by translate2(), show currents of resistors and diodes when annotating. 2022-11-04 13:35:06 +01:00
Stefan Frederik 4bb321af68 add @path attribute for spice/verilog/vhdl/tedax backends 2022-11-02 00:47:59 +01:00
Stefan Frederik fe0dc46c81 remove debug msgs 2022-11-01 12:57:29 +01:00
Stefan Frederik b0a88325e7 "@path" will be expanded in symbols with the hierarchy path, so a fully qualified instance name is obtained with @path@name 2022-11-01 12:54:43 +01: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 a6dc3d47c3 cache embed attribute of instances for faster lookup 2022-10-21 11:04:20 +02:00
Stefan Frederik e34211368f translate2() fix recursive param substitution 2022-10-20 23:31:02 +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 f6207070d0 translate() --> @spice_get_current(): find last hier.separator occurrentce with strrchr() 2022-10-16 23:57:07 +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 3adb192936 @spice_get_voltage(net) error checking 2022-10-15 10:52:07 +02:00
Stefan Frederik 56b63df2fc added @spice_get_voltage(net) recognize in translate() for voltage value update inside LCC schematics 2022-10-15 10:08:58 +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 a820cc2e3f removed (now) duplicated inst_hash_lookup: use int_hash_lookup. Search function does not highlight nets if searching for something that is not "lab" 2022-10-12 13:14:48 +02:00
Stefan Frederik 7a1fbb4809 better check_unique_names() and hash_all_names() implementation (do not skip label instances or instances with no format attr). Button click focuses main drawing window even if autofocus_mainwindow is set to 0, to avoid losing keyboard focus forever if TAB is pressed. 2022-10-12 11:56:02 +02:00
Stefan Frederik 7d016eab28 small netlist syntax fix in token.c (correctly skip VHDL time attributes), tedax backend: avoid printing mapping comments for duplicated pins 2022-10-12 09:32:37 +02:00
Stefan Frederik 3f627123b2 persists highlights on instances: remove highlighted instance from hash if user selects and presses ctrl-k as it is done for nets. Avoid instance highlight to also highlight net with identical name (example instance x1 and net x1). Verilog and Vhdl netlists handle duplicated (pass-through) pins 2022-10-11 13:12:17 +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 c5e91f209e allow to use @pinlist in format string even for symbols with duplicated ports. Duplicated entries will be skipped. Add component_browser_on_top tcl variable in xschemrc (default setting: enabled (1) to enable or disable component browser window always on top 2022-10-05 16:47:34 +02:00
Stefan Frederik 5fe2f1586b refactor str_hash_* and int_hash_* functions 2022-10-05 01:18:45 +02:00
Stefan Frederik 06fc742e60 doc updates about {verilog,vhdl,spice}_sym_def, fix regression (possible crash) in verilog_block_netlist (thanks to Joanne), fix regression (wrong verilog test netlist) in print_verilog_primitive() (thanks to Joanne) 2022-10-04 00:37:09 +02:00
Stefan Frederik 64d947a9dd fix extra and verilog_extra handling in instance lines (verilog netlists) 2022-10-03 09:10:58 +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 db94f9fb25 @pinlist will be comma separated in verilog netlists 2022-10-01 09:46:58 +02:00
Stefan Frederik b7c7c336dd added vhdl_sym_def, spice_sym_def, verilog_sym_def attributes for symbols. If defined and not empty the corresponding netlister will insert the content of the attribute instead of the subcircuit schematic implementation. Typically used to include a definition file. Updated documentation 2022-09-29 11:59:43 +02:00
Stefan Frederik ae4b74f2d8 graph axes in engineering notation (20u, 10p, 3k), fix an issue in graph panning with button1 mouse; ngspice:: get_current, get_voltage, get_diff_voltage, get_node embedded into xschem.tcl, to_eng tcl procedure to convert number to engineering form. 2022-09-28 19:14:31 +02:00
Stefan Frederik 9dc1fde024 remove dbg messages 2022-09-22 17:40:36 +02:00
Stefan Frederik e61ef2eabf fixed a potential parse error in edit_prop if list_tokens returns a non list due to malformed input. Added @spice_get_diff_voltage to get a voltage difference between 2 nodes. 2022-09-22 17:35:14 +02:00
Stefan Frederik 9c89a08111 better backannotation info placement in net labels, fixes in translate() for @spice_get_voltage and @spice_get_current, fixes in ngspice_backannotate routines. 2022-09-21 17:24:16 +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 8169196b35 bypass tcl for voltage and current backannotation in schematic from cursor b positon in graph 2022-09-20 03:12:46 +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 e2846daca5 inst_hash_lookup() will insert and lookup only instance basename (x1[3:0] --> x1) so better and stronger uniquenes of instance names is ensured. ngspice_backannotate accepts a filename (if not given assume as before <circuit_name>.raw) 2022-09-12 12:01:26 +02:00
Stefan Frederik f78fc5494d set_text_custom_font xctx->cairo_ctx can be NULL when netlisting without X with 0_examples_top.sch; net_name(..) doesnt work on duplicate pin for test_doublepin.sch so added back the condition in rev 2243; added HAS_CAIRO directive to compile on Windows that dont have CAIRO turned on.
remove some old unused variables
2022-09-08 20:58:12 +02:00
Stefan Frederik ae1bed65f4 added [t]rack bindkey in graph to display the wave closest to mouse in multiple dataset plots 2022-09-02 17:11:50 +02:00
Stefan Frederik e7c4111f8e simplified print_tedax_subckt, some optimizations in netlisting code (avoid some strdups) 2022-09-01 17:25:25 +02:00
Stefan Frederik 77d76e1a8f add commands "xschem set format ..." and "xschem get format" to change format attribute used for netlisting, overriding defaults 2022-08-31 10:47:16 +02:00
Stefan Frederik adc4eb96c8 fix net_name() crashing if inst[i].node==NULL. This may happen when pasting a component that contains a @@xxx token, that needs to be expanded to attached netname, however since we are moving the component no net name is defined --> .node==NULL. 2022-08-30 02:44:28 +02:00
Stefan Frederik 5100803673 translate() optimization 2022-08-26 09:20:30 +02:00
Stefan Frederik dffc266e0d improve test_backannotated_subckt.sch example, remove dbg messages 2022-08-23 10:44:00 +02:00
Stefan Frederik 0f5881cd61 print_spice_subckt(): check for tcl_hook2() errors, check for NULL in strtoupper/strtolower, fix unitialized local variable 2022-08-23 10:01:32 +02:00
Stefan Frederik 20d1080171 improve uniqueness name checking (do not consider non netlist elements, like pins, title, etc) 2022-08-21 11:55:34 +02:00
Stefan Frederik ef2e059c59 instance names (refdes) are hashed as uppercase, so collision check will be case insensitive, if enabled 2022-08-21 10:22:56 +02:00
Stefan Frederik 2502208671 if a subcircuit has spiceprefix set in template string do not consider it as an attribute to dump in netlist as a subckt parameter (.subckt xxxx A B C spiceprefix=X) 2022-08-20 11:23:18 +02:00
Stefan Frederik c1d229b917 better str_replace() implementation 2022-08-18 10:21:14 +02:00