diff options
| author | Sylvain Munaut <tnt@246tNt.com> | 2019-03-20 11:38:36 +0100 |
|---|---|---|
| committer | Sylvain Munaut <tnt@246tNt.com> | 2019-03-20 11:38:36 +0100 |
| commit | 472fd1a56f0323c3fe43b8f222bdb8b4bcbc07d5 (patch) | |
| tree | 2cb295d7859f13795a28e9194c2c6efa5d1a7713 /icetime/timings.py | |
| parent | fa1c932452e8efe1dfcc6ff095e3f7130a7906b1 (diff) | |
icetime: Split timing 'get_delay' functions per device
This should reduce the memory requirement during build of icetime, not
trying to compile one huge file all at once
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
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); |
