aboutsummaryrefslogtreecommitdiff
path: root/icefuzz/rename_dsps.py
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-01-22 16:34:51 +0000
committerDavid Shah <davey1576@gmail.com>2018-01-22 16:34:51 +0000
commit8a30b4bbd4d9b8b5d43566b7320554e6f4601b87 (patch)
treecc22c17141eb1126e66ff0cb63e677d1ffd4d8d5 /icefuzz/rename_dsps.py
parent78e5b89e7c95ac2a825d557c11114b198a2d8f28 (diff)
Seperate different DSP configs in timing data
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)