From 638afaeb314cdf14680d7053d35c3a0a797ea13f Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Mon, 25 Feb 2019 10:14:02 -0800 Subject: [PATCH 1/4] Remove duplicate profile stats script --- compiler/profile_stats.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 compiler/profile_stats.py diff --git a/compiler/profile_stats.py b/compiler/profile_stats.py deleted file mode 100755 index d3c33801..00000000 --- a/compiler/profile_stats.py +++ /dev/null @@ -1,5 +0,0 @@ -import pstats -p = pstats.Stats('profile.dat') -p.strip_dirs() -p.sort_stats('cumulative') -p.print_stats(50) From da6aa161dee14095eb680dec666cb7de2db963fb Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Thu, 28 Feb 2019 09:12:32 -0800 Subject: [PATCH 2/4] Don't autodetect the bitcell if the user overrides it --- compiler/globals.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/globals.py b/compiler/globals.py index 73cd3747..631508f9 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -168,8 +168,10 @@ def setup_bitcell(): if (OPTS.num_rw_ports==1 and OPTS.num_w_ports==0 and OPTS.num_r_ports==0): OPTS.bitcell = "bitcell" OPTS.replica_bitcell = "replica_bitcell" - # If we have non-1rw ports, figure out the right bitcell to use - else: + # If we have non-1rw ports, + # and the user didn't over-ride the bitcell manually, + # figure out the right bitcell to use + elsif (OPTs.bitcell=="bitcell" and OPTS.replica_bitcell=="replica_bitcell"): ports = "" if OPTS.num_rw_ports>0: ports += "{}rw_".format(OPTS.num_rw_ports) From abcb1cfa2c66b6430981af0406d5bc04ed804666 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Thu, 28 Feb 2019 09:17:24 -0800 Subject: [PATCH 3/4] Correct elsif to elif --- compiler/globals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/globals.py b/compiler/globals.py index 631508f9..67cba281 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -171,7 +171,7 @@ def setup_bitcell(): # If we have non-1rw ports, # and the user didn't over-ride the bitcell manually, # figure out the right bitcell to use - elsif (OPTs.bitcell=="bitcell" and OPTS.replica_bitcell=="replica_bitcell"): + elif (OPTs.bitcell=="bitcell" and OPTS.replica_bitcell=="replica_bitcell"): ports = "" if OPTS.num_rw_ports>0: ports += "{}rw_".format(OPTS.num_rw_ports) From 22deab959cc5a5d9a71c566dd7ec0496d63315d9 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Sun, 3 Mar 2019 11:58:41 -0800 Subject: [PATCH 4/4] Fix setup_bitcell to allow user to force override the bitcell. --- compiler/globals.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/compiler/globals.py b/compiler/globals.py index 67cba281..c1422592 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -165,23 +165,25 @@ def setup_bitcell(): """ global OPTS - if (OPTS.num_rw_ports==1 and OPTS.num_w_ports==0 and OPTS.num_r_ports==0): - OPTS.bitcell = "bitcell" - OPTS.replica_bitcell = "replica_bitcell" # If we have non-1rw ports, # and the user didn't over-ride the bitcell manually, # figure out the right bitcell to use - elif (OPTs.bitcell=="bitcell" and OPTS.replica_bitcell=="replica_bitcell"): - ports = "" - if OPTS.num_rw_ports>0: - ports += "{}rw_".format(OPTS.num_rw_ports) - if OPTS.num_w_ports>0: - ports += "{}w_".format(OPTS.num_w_ports) - if OPTS.num_r_ports>0: - ports += "{}r".format(OPTS.num_r_ports) + if (OPTS.bitcell=="bitcell" and OPTS.replica_bitcell=="replica_bitcell"): + + if (OPTS.num_rw_ports==1 and OPTS.num_w_ports==0 and OPTS.num_r_ports==0): + OPTS.bitcell = "bitcell" + OPTS.replica_bitcell = "replica_bitcell" + else: + ports = "" + if OPTS.num_rw_ports>0: + ports += "{}rw_".format(OPTS.num_rw_ports) + if OPTS.num_w_ports>0: + ports += "{}w_".format(OPTS.num_w_ports) + if OPTS.num_r_ports>0: + ports += "{}r".format(OPTS.num_r_ports) - OPTS.bitcell = "bitcell_"+ports - OPTS.replica_bitcell = "replica_bitcell_"+ports + OPTS.bitcell = "bitcell_"+ports + OPTS.replica_bitcell = "replica_bitcell_"+ports # See if a custom bitcell exists from importlib import find_loader @@ -195,8 +197,8 @@ def setup_bitcell(): OPTS.replica_bitcell = "replica_pbitcell" if not OPTS.is_unit_test: debug.warning("Using the parameterized bitcell which may have suboptimal density.") - else: - debug.info(1,"Using custom bitcell: {}".format(OPTS.bitcell)) + + debug.info(1,"Using bitcell: {}".format(OPTS.bitcell)) def get_tool(tool_type, preferences, default_name=None):