aboutsummaryrefslogtreecommitdiffstats
path: root/icebox/icebox_chipdb.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-07-18 13:06:48 +0200
committerClifford Wolf <clifford@clifford.at>2015-07-18 13:06:48 +0200
commitc41701ca3a2046e9cabe303cff0aa203215d70c1 (patch)
tree6a6e26d8278505d72dda2b9c691a8906002bc608 /icebox/icebox_chipdb.py
parent0347c37d56374447d170e9a8f59e56f84cbefcce (diff)
downloadicestorm-c41701ca3a2046e9cabe303cff0aa203215d70c1.tar.gz
icestorm-c41701ca3a2046e9cabe303cff0aa203215d70c1.tar.bz2
icestorm-c41701ca3a2046e9cabe303cff0aa203215d70c1.zip
Import of icestorm-snapshot-150413.zip
Diffstat (limited to 'icebox/icebox_chipdb.py')
-rwxr-xr-xicebox/icebox_chipdb.py34
1 files changed, 31 insertions, 3 deletions
diff --git a/icebox/icebox_chipdb.py b/icebox/icebox_chipdb.py
index 3441bd3..12ccfa8 100755
--- a/icebox/icebox_chipdb.py
+++ b/icebox/icebox_chipdb.py
@@ -40,10 +40,22 @@ print("""#
# Quick File Format Reference:
# ----------------------------
#
+# .device DEVICE
+#
+# declares the device type (e.g. "1k")
+#
+#
+# .pins PACKAGE
+# PIN_NUM TILE_X TILE_Y PIO_NUM PADIN_NUM
+# ...
+#
+# associates a package pin with an IO tile and block
+#
#
# .io_tile X Y
# .logic_tile X Y
-# .ram_tile X Y
+# .ramb_tile X Y
+# .ramt_tile X Y
#
# declares the existence of a IO/LOGIC/RAM tile with the given coordinates
#
@@ -73,6 +85,18 @@ print("""#
#
""")
+print(".device 1k")
+print()
+
+print(".pins tq144")
+pio_to_padin = dict()
+for padin, pio in enumerate(ic.padin_pio_db()):
+ pio_to_padin[pio] = padin
+for entry in sorted(ic.pinloc_db()):
+ pio = (entry[1], entry[2], entry[3])
+ print("%d %d %d %d %d" % tuple(entry + [pio_to_padin[pio] if pio in pio_to_padin else -1]))
+print()
+
for idx in sorted(ic.io_tiles):
print(".io_tile %d %d" % idx)
print()
@@ -81,8 +105,12 @@ for idx in sorted(ic.logic_tiles):
print(".logic_tile %d %d" % idx)
print()
-for idx in sorted(ic.ram_tiles):
- print(".ram_tile %d %d" % idx)
+for idx in sorted(ic.ramb_tiles):
+ print(".ramb_tile %d %d" % idx)
+print()
+
+for idx in sorted(ic.ramt_tiles):
+ print(".ramt_tile %d %d" % idx)
print()
for group in sorted(ic.group_segments(all_tiles)):