From ad3059dd838b906df3b6bf493385a9040e295159 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Thu, 26 Nov 2020 04:01:11 +0100 Subject: [PATCH] added some comments --- XSchemWin/XSchemWix/Product.wxs | 6 +- XSchemWin/XSchemWix/heat_doc.wxs | 492 +-- XSchemWin/XSchemWix/heat_xschem_library.wxs | 3392 ++++++++++--------- XSchemWin/XSchemWix/xschem_library.wxs | 20 + scconfig/src/scripts/find_fungw.c | 38 + scconfig/src/scripts/scripts.c | 1 + scconfig/src/scripts/scripts.h | 1 + src/xschem.tcl | 7 +- 8 files changed, 2022 insertions(+), 1935 deletions(-) diff --git a/XSchemWin/XSchemWix/Product.wxs b/XSchemWin/XSchemWix/Product.wxs index 6eabaeaa..e0f51bfa 100644 --- a/XSchemWin/XSchemWix/Product.wxs +++ b/XSchemWin/XSchemWix/Product.wxs @@ -1,6 +1,6 @@ - + @@ -133,6 +133,9 @@ + + + @@ -297,6 +300,7 @@ + diff --git a/XSchemWin/XSchemWix/heat_doc.wxs b/XSchemWin/XSchemWix/heat_doc.wxs index e156b0fc..64f7fbbc 100644 --- a/XSchemWin/XSchemWix/heat_doc.wxs +++ b/XSchemWin/XSchemWix/heat_doc.wxs @@ -3,745 +3,745 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/XSchemWin/XSchemWix/heat_xschem_library.wxs b/XSchemWin/XSchemWix/heat_xschem_library.wxs index bb11cbb7..0ecdb316 100644 --- a/XSchemWin/XSchemWix/heat_xschem_library.wxs +++ b/XSchemWin/XSchemWix/heat_xschem_library.wxs @@ -3,5085 +3,5100 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -6688,6 +6703,8 @@ + + @@ -6699,7 +6716,10 @@ + + + diff --git a/XSchemWin/XSchemWix/xschem_library.wxs b/XSchemWin/XSchemWix/xschem_library.wxs index 16695210..c29a95ff 100644 --- a/XSchemWin/XSchemWix/xschem_library.wxs +++ b/XSchemWin/XSchemWix/xschem_library.wxs @@ -4812,6 +4812,12 @@ + + + + + + @@ -4845,9 +4851,18 @@ + + + + + + + + + @@ -6688,6 +6703,8 @@ + + @@ -6699,7 +6716,10 @@ + + + diff --git a/scconfig/src/scripts/find_fungw.c b/scconfig/src/scripts/find_fungw.c index 6ff40701..6a24bb4e 100644 --- a/scconfig/src/scripts/find_fungw.c +++ b/scconfig/src/scripts/find_fungw.c @@ -83,6 +83,44 @@ int find_script_fungw_user_call_ctx(const char *name, int logdepth, int fatal) return try_fail(logdepth, "libs/script/fungw/user_call_ctx"); } +int find_script_fungw_cfg_pupdir(const char *name, int logdepth, int fatal) +{ + const char *lf, *cf, *inc, *out; + char *test_c = + NL "#include " + NL "int main() {" + NL " puts(FGW_CFG_PUPDIR);" + NL " return 0;" + NL "}" + NL; + + require("cc/cc", logdepth, fatal); + require("libs/script/fungw/presents", logdepth, fatal); + + report("Checking for fungw configured pupdir... "); + logprintf(logdepth, "find_fungw_cfg_pupdir: trying to find fungw pupdir...\n"); + logdepth++; + + inc = get("libs/script/fungw/includes"); + lf = get("libs/script/fungw/ldflags"); + cf = get("libs/script/fungw/cflags"); + + if ((compile_run(logdepth, test_c, NULL, cf, lf, &out) == 0) && (out != NULL)) { + char *end = strpbrk(out, "\r\n"); + if (end != NULL) *end = '\0'; + report("Found: %s\n", out); + logprintf(logdepth+1, "found: %s\n", out); + put("libs/script/fungw/cfg_pupdir/path", out); + put("libs/script/fungw/cfg_pupdir/presents", strue); + free(out); + return 1; + } + report("Not found\n"); + logprintf(logdepth+1, "not found\n"); + put("libs/script/fungw/cfg_pupdir/presents", sfalse); + return 0; +} + int find_script_fungw_all(const char *name, int logdepth, int fatal) { diff --git a/scconfig/src/scripts/scripts.c b/scconfig/src/scripts/scripts.c index cffdf8c4..fb3f9bdd 100644 --- a/scconfig/src/scripts/scripts.c +++ b/scconfig/src/scripts/scripts.c @@ -45,6 +45,7 @@ void deps_scripts_init() dep_add("libs/script/fungw/presents", find_script_fungw); dep_add("libs/script/fungw/user_call_ctx/*", find_script_fungw_user_call_ctx); + dep_add("libs/script/fungw/cfg_pupdir/*", find_script_fungw_cfg_pupdir); dep_add("libs/script/fungw/*", find_script_fungw_all); } diff --git a/scconfig/src/scripts/scripts.h b/scconfig/src/scripts/scripts.h index e05db438..0e00a3f1 100644 --- a/scconfig/src/scripts/scripts.h +++ b/scconfig/src/scripts/scripts.h @@ -27,5 +27,6 @@ int find_script_funlisp(const char *name, int logdepth, int fatal); int find_script_duktape(const char *name, int logdepth, int fatal); int find_script_fungw(const char *name, int logdepth, int fatal); int find_script_fungw_user_call_ctx(const char *name, int logdepth, int fatal); +int find_script_fungw_cfg_pupdir(const char *name, int logdepth, int fatal); int find_script_fungw_all(const char *name, int logdepth, int fatal); int find_script_m4(const char *name, int logdepth, int fatal); diff --git a/src/xschem.tcl b/src/xschem.tcl index 638e7b83..dfa975d9 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -137,7 +137,7 @@ proc netlist {source_file show netlist_file} { } } if {$netlist_type eq {tedax}} { - if {[catch {eval exec {awk -f $XSCHEM_SHAREDIR/tedax.awk $source_file | $XSCHEM_SHAREDIR/flatten_tedax.awk \ + if {[catch {eval exec {awk -f $XSCHEM_SHAREDIR/tedax.awk $source_file | awk -f $XSCHEM_SHAREDIR/flatten_tedax.awk \ > $netlist_dir/$netlist_file} } err] } { puts stderr "tEDAx errors: $err" } @@ -717,6 +717,9 @@ proc probe_net {fullnet {redraw 1} } { if {$res} {return $net} else { return {} } } +# backannotate newnet to be connected to specified hierarchical instance name and pin. +# places a label close to the instance pin to be re-routed. +# actual reconnect is human assisted! proc reroute_inst {fullinst pinattr pinval newnet} { if { [regexp {\.} $fullinst] } { set hier 1 } else { set hier 0 } set res [descend_hierarchy $fullinst 0] @@ -742,7 +745,7 @@ proc reroute_inst {fullinst pinattr pinval newnet} { xschem hilight_netname $newnet xschem select instance $res xschem hilight_netname $oldnet - if {$hier} { xschem save} + if {$hier} { xschem save} ;# save so we can process other reroute_inst without beink asked to save. xschem redraw return 1 }