diff options
Diffstat (limited to 'icetime/timings.py')
-rw-r--r-- | icetime/timings.py | 9 |
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); |