aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-08-26 15:32:52 +0200
committerClifford Wolf <clifford@clifford.at>2015-08-26 15:32:52 +0200
commit935621a18d0f50cae7fcb1589bf69ab3e8cf0a68 (patch)
tree751aa9aa02bdb15c6db654a1718af2c8db3c986b
parent19be8895a51a50937261528035c95d4686228528 (diff)
downloadicestorm-935621a18d0f50cae7fcb1589bf69ab3e8cf0a68.tar.gz
icestorm-935621a18d0f50cae7fcb1589bf69ab3e8cf0a68.tar.bz2
icestorm-935621a18d0f50cae7fcb1589bf69ab3e8cf0a68.zip
Improved icebox_vlog -P for new iCEcube2
-rwxr-xr-xicebox/icebox_vlog.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/icebox/icebox_vlog.py b/icebox/icebox_vlog.py
index f70b66f..feb1023 100755
--- a/icebox/icebox_vlog.py
+++ b/icebox/icebox_vlog.py
@@ -95,10 +95,11 @@ for o, a in opts:
p = line[1]
if o == "-P":
p = p.lower()
- p = p.replace("_ibuf", "")
- p = p.replace("_obuft", "")
- p = p.replace("_obuf", "")
- p = p.replace("_gb_io", "")
+ p = re.sub(r"_ibuf$", "", p)
+ p = re.sub(r"_obuft$", "", p)
+ p = re.sub(r"_obuf$", "", p)
+ p = re.sub(r"_gb_io$", "", p)
+ p = re.sub(r"_pad(_[0-9]+|)$", r"\1", p)
portnames.add(p)
if not re.match(r"[a-zA-Z_][a-zA-Z0-9_]*$", p):
p = "\\%s " % p