mirror of https://github.com/YosysHQ/icestorm.git
icebox: python3
This commit is contained in:
parent
f6f96a26e0
commit
498a7acbe2
|
|
@ -1,14 +1,13 @@
|
|||
PYTHON ?= python2
|
||||
DESTDIR = /usr/local
|
||||
|
||||
all: chipdb-1k.txt chipdb-8k.txt
|
||||
|
||||
chipdb-1k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON) icebox_chipdb.py > chipdb-1k.new
|
||||
python3 icebox_chipdb.py > chipdb-1k.new
|
||||
mv chipdb-1k.new chipdb-1k.txt
|
||||
|
||||
chipdb-8k.txt: icebox.py iceboxdb.py icebox_chipdb.py
|
||||
$(PYTHON) icebox_chipdb.py -8 > chipdb-8k.new
|
||||
python3 icebox_chipdb.py -8 > chipdb-8k.new
|
||||
mv chipdb-8k.new chipdb-8k.txt
|
||||
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,8 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
import iceboxdb
|
||||
import re, sys
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
|
||||
|
|
@ -175,7 +172,7 @@ all_group_segments = ic.group_segments(all_tiles, connect_gb=False)
|
|||
print(".device %s %d %d %d" % (ic.device, ic.max_x+1, ic.max_y+1, len(all_group_segments)))
|
||||
print()
|
||||
|
||||
for key in icebox.pinloc_db.keys():
|
||||
for key in list(icebox.pinloc_db.keys()):
|
||||
key_dev, key_package = key.split("-")
|
||||
if key_dev == ic.device:
|
||||
print(".pins %s" % (key_package))
|
||||
|
|
@ -247,10 +244,10 @@ def print_tile_nonrouting_bits(tile_type, idx):
|
|||
print(" ".join([x] + function_bits[x]))
|
||||
print()
|
||||
|
||||
print_tile_nonrouting_bits("logic", ic.logic_tiles.keys()[0])
|
||||
print_tile_nonrouting_bits("io", ic.io_tiles.keys()[0])
|
||||
print_tile_nonrouting_bits("ramb", ic.ramb_tiles.keys()[0])
|
||||
print_tile_nonrouting_bits("ramt", ic.ramt_tiles.keys()[0])
|
||||
print_tile_nonrouting_bits("logic", list(ic.logic_tiles.keys())[0])
|
||||
print_tile_nonrouting_bits("io", list(ic.io_tiles.keys())[0])
|
||||
print_tile_nonrouting_bits("ramb", list(ic.ramb_tiles.keys())[0])
|
||||
print_tile_nonrouting_bits("ramt", list(ic.ramt_tiles.keys())[0])
|
||||
|
||||
print(".extra_cell 0 0 WARMBOOT")
|
||||
for key in sorted(icebox.warmbootinfo_db[ic.device]):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import sys
|
||||
import re
|
||||
|
|
@ -64,7 +61,7 @@ def explained_bits(db, tile):
|
|||
return text
|
||||
|
||||
def diff_tiles(stmt, tiles1, tiles2):
|
||||
for i in sorted(set(tiles1.keys() + tiles2.keys())):
|
||||
for i in sorted(set(list(tiles1.keys()) + list(tiles2.keys()))):
|
||||
if not i in tiles1:
|
||||
print("+ %s %d %d" % (stmt, i[0], i[1]))
|
||||
for line in tiles2[i]:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, os, re
|
||||
|
||||
|
|
@ -64,15 +61,15 @@ mktiles = set()
|
|||
if mode8k:
|
||||
ic.setup_empty_8k()
|
||||
|
||||
for x in range(1, 3) + range(8-2, 8+3) + range(15, 19) + range(25-2, 25+3) + range(33-2, 33):
|
||||
for x in list(range(1, 3)) + list(range(8-2, 8+3)) + list(range(15, 19)) + list(range(25-2, 25+3)) + list(range(33-2, 33)):
|
||||
mktiles.add((x, 0))
|
||||
mktiles.add((x, 33))
|
||||
|
||||
for x in range(0, 3) + range(8-1, 8+2) + range(25-1, 25+2) + range(33-2, 34):
|
||||
for x in list(range(0, 3)) + list(range(8-1, 8+2)) + list(range(25-1, 25+2)) + list(range(33-2, 34)):
|
||||
mktiles.add((x, 1))
|
||||
mktiles.add((x, 32))
|
||||
|
||||
for x in range(0, 2) + range(8-1, 8+2) + range(25-1, 25+2) + range(34-2, 34):
|
||||
for x in list(range(0, 2)) + list(range(8-1, 8+2)) + list(range(25-1, 25+2)) + list(range(34-2, 34)):
|
||||
mktiles.add((x, 2))
|
||||
mktiles.add((x, 31))
|
||||
|
||||
|
|
@ -93,11 +90,11 @@ else:
|
|||
mktiles.add((x, 0))
|
||||
mktiles.add((x, 17))
|
||||
|
||||
for x in range(0, 6) + range(8, 14):
|
||||
for x in list(range(0, 6)) + list(range(8, 14)):
|
||||
mktiles.add((x, 1))
|
||||
mktiles.add((x, 16))
|
||||
|
||||
for x in range(0, 5) + range(9, 14):
|
||||
for x in list(range(0, 5)) + list(range(9, 14)):
|
||||
mktiles.add((x, 2))
|
||||
mktiles.add((x, 15))
|
||||
|
||||
|
|
@ -566,7 +563,7 @@ if outdir is not None:
|
|||
print_tile(x, y)
|
||||
|
||||
print("Writing %s/%s..." % (outdir, chipdbfile), file=stdout)
|
||||
os.system("python2 icebox_chipdb.py > %s/%s" % (outdir, chipdbfile))
|
||||
os.system("python3 icebox_chipdb.py > %s/%s" % (outdir, chipdbfile))
|
||||
|
||||
sys.stdout = stdout
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python2
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 Clifford Wolf <clifford@clifford.at>
|
||||
#
|
||||
|
|
@ -15,9 +15,6 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import icebox
|
||||
import getopt, sys, re
|
||||
|
||||
|
|
@ -211,7 +208,7 @@ for bit in ic.extra_bits:
|
|||
s2 = (pin_entry[0], pin_entry[1], "padin_%d" % pin_entry[2])
|
||||
extra_connections.append((s1, s2))
|
||||
|
||||
for idx, tile in ic.io_tiles.items():
|
||||
for idx, tile in list(ic.io_tiles.items()):
|
||||
tc = icebox.tileconfig(tile)
|
||||
iocells_type[(idx[0], idx[1], 0)] = ["0" for i in range(6)]
|
||||
iocells_type[(idx[0], idx[1], 1)] = ["0" for i in range(6)]
|
||||
|
|
@ -834,7 +831,7 @@ if do_collect:
|
|||
vec_ports_dir[match.group(2)] = match.group(1)
|
||||
else:
|
||||
new_text_ports.add(port)
|
||||
for port, direct in vec_ports_dir.items():
|
||||
for port, direct in list(vec_ports_dir.items()):
|
||||
min_idx = vec_ports_min[port]
|
||||
max_idx = vec_ports_max[port]
|
||||
new_text_ports.add("%s [%d:%d] %s " % (direct, max_idx, min_idx, port))
|
||||
|
|
@ -874,7 +871,7 @@ if strip_comments:
|
|||
print()
|
||||
|
||||
if do_collect:
|
||||
for port, direct in vec_ports_dir.items():
|
||||
for port, direct in list(vec_ports_dir.items()):
|
||||
min_idx = vec_ports_min[port]
|
||||
max_idx = vec_ports_max[port]
|
||||
for i in range(min_idx, max_idx+1):
|
||||
|
|
|
|||
Loading…
Reference in New Issue