aboutsummaryrefslogtreecommitdiffstats
path: root/icetime/timings.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-04-16 10:25:04 +0200
committerGitHub <noreply@github.com>2019-04-16 10:25:04 +0200
commitd9ea2e15fccebbbce59409b0ae7a1481d78aab86 (patch)
tree8fbc3a23d39065bf615cda9fac0ef50eefa24cb2 /icetime/timings.py
parent1caaec363ab9f3cb8fd76fa7fef6ff6633942ab9 (diff)
parent472fd1a56f0323c3fe43b8f222bdb8b4bcbc07d5 (diff)
downloadicestorm-d9ea2e15fccebbbce59409b0ae7a1481d78aab86.tar.gz
icestorm-d9ea2e15fccebbbce59409b0ae7a1481d78aab86.tar.bz2
icestorm-d9ea2e15fccebbbce59409b0ae7a1481d78aab86.zip
Merge pull request #206 from smunaut/icetime
icetime: Split timing 'get_delay' functions per device
Diffstat (limited to 'icetime/timings.py')
-rw-r--r--icetime/timings.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/icetime/timings.py b/icetime/timings.py
index 7ac2a7b..604dbcd 100644
--- a/icetime/timings.py
+++ b/icetime/timings.py
@@ -1,8 +1,10 @@
#!/usr/bin/env python3
import re
+import sys
print("// auto-generated by timings.py from ../icefuzz/timings_*.txt")
+print("#include <string>")
def timings_to_c(chip, f):
print("")
@@ -47,6 +49,11 @@ def timings_to_c(chip, f):
print(" exit(1);")
print("}")
-for db in "lp384 lp1k lp8k hx1k hx8k up5k".split():
+if len(sys.argv) >= 2:
+ chips = sys.argv[1:]
+else:
+ chips = "lp384 lp1k lp8k hx1k hx8k up5k".split()
+
+for db in chips:
with open("../icefuzz/timings_%s.txt" % db, "r") as f:
timings_to_c(db, f);