icestorm/icefuzz/export.py

19 lines
631 B
Python
Raw Permalink Normal View History

2015-08-22 09:36:28 +02:00
#!/usr/bin/env python3
import os
device_class = os.getenv("ICEDEVICE")
2015-07-18 13:10:40 +02:00
with open("../icebox/iceboxdb.py", "w") as f:
2017-11-11 12:26:43 +01:00
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)
2017-11-11 12:26:43 +01:00
for i in range(4):
files.append("database_dsp%d_5k" % i)
for i in files:
2015-07-18 13:10:40 +02:00
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)