diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-06-09 10:31:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-09 10:31:09 +0200 |
commit | 0f5feeaae9d581ea47eaf0d8ed0512962d1e85c0 (patch) | |
tree | 28f41bbbbde97e19f6f27445da6e487b2b33f2d2 /icebox/icebox_maps.py | |
parent | 625105c0d136e05b965c9192f6a3cc249f5cd9ae (diff) | |
parent | eec6555603d6f77ebec556ff3bf55ef0194381eb (diff) | |
download | icestorm-0f5feeaae9d581ea47eaf0d8ed0512962d1e85c0.tar.gz icestorm-0f5feeaae9d581ea47eaf0d8ed0512962d1e85c0.tar.bz2 icestorm-0f5feeaae9d581ea47eaf0d8ed0512962d1e85c0.zip |
Merge pull request #221 from mbuesch/icebox-lru-cache
Reduce icebox build time
Diffstat (limited to 'icebox/icebox_maps.py')
-rwxr-xr-x | icebox/icebox_maps.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/icebox/icebox_maps.py b/icebox/icebox_maps.py index c791bea..35ff316 100755 --- a/icebox/icebox_maps.py +++ b/icebox/icebox_maps.py @@ -16,6 +16,7 @@ # import icebox +from icebox import re_match_cached import getopt, sys, re mode = None @@ -58,7 +59,7 @@ def get_bit_group(x, y, db): funcs.add("r") elif entry[1] == "buffer": funcs.add("b") - elif re.match("LC_", entry[1]): + elif re_match_cached("LC_", entry[1]): funcs.add("l") elif entry[1] == "NegClk": funcs.add("N") @@ -94,7 +95,7 @@ def print_db_nets(stmt, db, pos): if icebox.pos_has_net(pos[0], entry[3]): netnames.add(entry[3]) last_prefix = "" for net in sorted(netnames, key=icebox.key_netname): - match = re.match(r"(.*?)(\d+)$", net) + match = re_match_cached(r"(.*?)(\d+)$", net) if match: if last_prefix == match.group(1): print(",%s" % match.group(2), end="") |