File: export.py

package info (click to toggle)
fpga-icestorm 0~20190913git0ec00d8-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 7,468 kB
  • sloc: python: 27,893; cpp: 4,598; sh: 2,590; ansic: 1,116; makefile: 643; xml: 16
file content (18 lines) | stat: -rw-r--r-- 631 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3
import os

device_class = os.getenv("ICEDEVICE")

with open("../icebox/iceboxdb.py", "w") as f:
    files = [ "database_io", "database_logic", "database_ramb", "database_ramt", "database_ipcon_5k"]
    for device_class in ["8k"]:
      files.append("database_ramb_" + device_class)
      files.append("database_ramt_" + device_class)
    for i in range(4):
      files.append("database_dsp%d_5k" % i)
    for i in files:
        print('%s_txt = """' % i, file=f)
        with open("%s.txt" % i, "r") as fi:
            for line in fi:
                print(line, end="", file=f)
        print('"""', file=f)