Commit Graph

251 Commits

Author SHA1 Message Date
stefan schippers 96eea54894 some code refactoring, duplicate code replaced with set_inst_flags(), set_sym_flags(), various fixes/optimizations about floaters 2023-05-14 12:58:25 +02:00
stefan schippers 9fcde30a52 do not perform tcl substitution before displaying netlist_commands text into an editor. Correctly restore xctx->current_dirname after netlisting. get_generator_command(): quote command name (just in case its pathname contains spaces). floater example labels in solar_panel.sch. Various corrections and optimizations in new floater labels code. 2023-05-14 01:13:18 +02:00
stefan schippers ee1979b8b2 low level functions for floaters and floater text caches is implemented 2023-05-13 13:13:35 +02:00
stefan schippers 1e74b21c49 get_trailing_path(): do not confuse generator extension with schematic/symbol extension 2023-05-10 04:08:47 +02:00
stefan schippers d23388ff71 fix cmd memory leak in load_ym_def(), make copy of returned string in some routines to reduce dependencies 2023-05-04 23:23:54 +02:00
stefan schippers 2438d0fa95 translate2(): better handle %xxx tokens in LCC symbols (propagate %xxx to upper level if not assigned to anything in instance) 2023-05-02 23:21:20 +02:00
stefan schippers 7e1f591b18 align TOK_TOKEN state change of translate() and translate2() to all other parsers 2023-05-02 18:54:27 +02:00
stefan schippers 9533b17a20 Allow to pass instance attributes (via translate() ) to symbol generators 2023-05-02 12:42:53 +02:00
stefan schippers a9ffa50ed8 add "ndir" parameter to get_sym_name(), some fixes in sym_vs_sch_pins() 2023-05-01 23:17:57 +02:00
stefan schippers ae8931c788 remove bbox() START/ADD/SET/END from some drawing operations. No observable performance impact and redraw is now more pixel precise, reducing artifacts. 2023-05-01 22:28:56 +02:00
stefan schippers 4c3b4d0321 various tcl_hook2() additions on instance names to handle procedures, fix bbox calculation in xschem replace_symbol command 2023-05-01 14:37:10 +02:00
stefan schippers d9d66c1c90 removed redundant skip_dir(...) (use get_cell(..., 0) ), fix a couple of glitches in postscript export (filled polygons with self-coincident edgs, fix filled arc pies (missing point) 2023-04-26 23:00:20 +02:00
stefan schippers 7a16859702 update tedax netlister with previous enhancements 2023-04-26 10:26:21 +02:00
stefan schippers 10441ef901 allow tcl procedures to generate generator script and parameters, update vhdl and verilog netlisters to handle generator schematic/symbol references 2023-04-26 09:54:35 +02:00
stefan schippers 68cf318134 load_sym_def(): removed embedded parameter, recognize generator names and pipe in data from generator instead of loading from file. No more set flags for generated symbols to EMBEDDED 2023-04-24 23:56:56 +02:00
stefan schippers cd6ef78841 schematic generator netlisting seems to work. renamed is_symgen() -> is_generator() 2023-04-24 13:26:04 +02:00
stefan schippers 94d1865127 fix save_inst resetting all symbols EMBEDDED flags, not only the used symbols in current schematic. Created get_generator_command(), will be used also for schematic generators 2023-04-24 11:36:07 +02:00
stefan schippers 3facbf6428 spice netlisting of schematics with parametrized symbol generators should work 2023-04-23 00:37:31 +02:00
stefan schippers f1ed2bf26f fixed is_symgen() regex, added stup for tutorial_symbol_generators.html 2023-04-22 11:29:44 +02:00
stefan schippers d5aca937ce removed debug messages 2023-04-22 00:55:34 +02:00
stefan schippers 9eb4e9440c handle symbol_ref(param1,param2,...) symbol generator scripts, added some utility functions str_chars_replace(), is_symgen(), fix some quoting/backslash subst issues in get_sym_template() 2023-04-21 11:41:20 +02:00
stefan schippers 631fedb11b enabled escape_chars convenience function, added "embedded" parameter to load_sym_def() to better distinguish loading an embedded symbol from loading a regular symbol with a provided file descriptor 2023-04-20 10:44:31 +02:00
stefan schippers 6c364a74cc revert str_replace @symname in print_spice_subckt_nodes() 2023-04-18 00:49:25 +02:00
stefan schippers a5492be752 print_spice_subckt_nodes(): use (improved to handle escape chars) str_replace() to substitute @symname, added xschem str_replace, improved xschem symbols 2023-04-18 00:20:40 +02:00
stefan schippers 728cfb22fc print_spice_subckt_nodes(): remove closing bracket in case of tcleval(...) failure 2023-04-17 10:33:45 +02:00
stefan schippers 590bf8b6ec add instance based "schematic=..." attribute. This allows multiple instances of the same symbol to have different implementations. 2023-04-12 18:28:19 +02:00
stefan schippers a8e95e220b if a custom format netlist is given (for example lvs_netlist) and lvs_netlist attribute in instance or symbol is existing but empty device will not be netlisted 2023-03-10 18:36:55 +01:00
stefan schippers bf6b20a1ce In source Documentation (scheduler.c) of xschem commands, html docs updated 2023-03-03 18:29:17 +01:00
stefan schippers ebf4fa1f44 Initialize stack2[] to double 0.0 2023-03-01 18:34:07 +01:00
stefan schippers a8aaf996e7 use pre-increment where expression is not used 2023-02-18 09:44:11 +01:00
stefan schippers 42c3024eda remove debug allocation IDs 2023-02-09 21:06:27 +01:00
stefan schippers 3be9a66aed fix memory leak in table_read() 2023-02-09 21:04:22 +01:00
stefan schippers 29ef08e84b better memory tracking reporting (my_strcat and my_strncat allocations) 2023-02-01 11:38:28 +01:00
stefan schippers 1da5e47d4a remove my*() allocation routines unique IDs and replace with _ALLOC_ID_ macro, to be substituted in debug sessions with create_alloc_ids.awk 2023-01-23 15:42:15 +01:00
Stefan Schippers e7851d01db "xschem set format <fmt_attribute>" will change netlisting format attribute instead of default "format" (or verilog_format or vhdl_format), however fallback to default netlisting rule attribute if not defined in symbol. add tcl function "from_eng <n>" to convert spice formatted numbers to floating point 2022-11-23 16:16:38 +01:00
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