aboutsummaryrefslogtreecommitdiffstats
path: root/icebox
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2019-06-07 23:51:40 +0200
committerMichael Buesch <m@bues.ch>2019-06-08 16:12:16 +0200
commit51a11ffc81a09bd464f4ef637646fa682d281f54 (patch)
tree4f75a15d3d0ffbe95873f69121b6137190e9c2a4 /icebox
parente0642ba06eac0c057a05c7c7f46b4f22b90a4c76 (diff)
downloadicestorm-51a11ffc81a09bd464f4ef637646fa682d281f54.tar.gz
icestorm-51a11ffc81a09bd464f4ef637646fa682d281f54.tar.bz2
icestorm-51a11ffc81a09bd464f4ef637646fa682d281f54.zip
icebox_maps: Use cached re functions
Diffstat (limited to 'icebox')
-rwxr-xr-xicebox/icebox_maps.py5
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="")