aboutsummaryrefslogtreecommitdiff
path: root/icefuzz/rename_dsps.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-01-30 17:13:37 +0100
committerGitHub <noreply@github.com>2018-01-30 17:13:37 +0100
commit722790ad3cdb497e1b13cd1b4368d8380371eb37 (patch)
tree8edd2abd05093d42fe06a6d7b8b2d27e3b56c99c /icefuzz/rename_dsps.py
parent479467a50da0bd604a52116dcefbacf36bc601bd (diff)
parent6efb7f7cc2a9ddb07f9436739387f182014e1855 (diff)
Merge pull request #119 from daveshah1/up5k_improve
UltraPlus Timing Analysis Improvements
Diffstat (limited to 'icefuzz/rename_dsps.py')
-rw-r--r--icefuzz/rename_dsps.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/icefuzz/rename_dsps.py b/icefuzz/rename_dsps.py
new file mode 100644
index 0000000..8c6cc58
--- /dev/null
+++ b/icefuzz/rename_dsps.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import sys, os
+
+dsptype = None
+dsppath = sys.argv[1].replace(".vsb", ".dsp")
+
+if os.path.exists(dsppath):
+ with open(dsppath, 'r') as f:
+ dsptype = f.readline().strip()
+
+with open("tmedges.tmp", "a") as outfile:
+ with open("tmedges_unrenamed.tmp", "r") as infile:
+ for line in infile:
+ if "SB_MAC16" in line:
+ if dsptype is not None:
+ outfile.write(line.replace("SB_MAC16", dsptype))
+ else:
+ outfile.write(line)