aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chipdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/chipdb.py')
-rw-r--r--ice40/chipdb.py38
1 files changed, 1 insertions, 37 deletions
diff --git a/ice40/chipdb.py b/ice40/chipdb.py
index 63d90b45..108197c1 100644
--- a/ice40/chipdb.py
+++ b/ice40/chipdb.py
@@ -41,8 +41,6 @@ extra_cells = dict()
extra_cell_config = dict()
packages = list()
-wire_uphill_belports = dict()
-wire_downhill_belports = dict()
wire_belports = dict()
wire_names = dict()
@@ -453,18 +451,12 @@ for i in range(8):
add_wire(0, 0, "padin_%d" % i)
def add_bel_input(bel, wire, port):
- if wire not in wire_downhill_belports:
- wire_downhill_belports[wire] = set()
- wire_downhill_belports[wire].add((bel, port))
if wire not in wire_belports:
wire_belports[wire] = set()
wire_belports[wire].add((bel, port))
bel_wires[bel].append((wire, port, 0))
def add_bel_output(bel, wire, port):
- if wire not in wire_uphill_belports:
- wire_uphill_belports[wire] = set()
- wire_uphill_belports[wire].add((bel, port))
if wire not in wire_belports:
wire_belports[wire] = set()
wire_belports[wire].add((bel, port))
@@ -672,7 +664,7 @@ for tile_xy, tile_type in sorted(tiles.items()):
add_bel_ec(ec)
for ec in sorted(extra_cells.keys()):
- if ec[1] == 0 and ec[2] == 0:
+ if ec[1] in (0, dev_width - 1) and ec[2] in (0, dev_height - 1):
add_bel_ec(ec)
class BinaryBlobAssembler:
@@ -1011,24 +1003,6 @@ for wire in range(num_wires):
num_downhill = 0
list_downhill = None
- if wire in wire_uphill_belports:
- num_bels_uphill = len(wire_uphill_belports[wire])
- bba.l("wire%d_upbels" % wire, "BelPortPOD")
- for belport in sorted(wire_uphill_belports[wire]):
- bba.u32(belport[0], "bel_index")
- bba.u32(portpins[belport[1]], "port")
- else:
- num_bels_uphill = 0
-
- if wire in wire_downhill_belports:
- num_bels_downhill = len(wire_downhill_belports[wire])
- bba.l("wire%d_downbels" % wire, "BelPortPOD")
- for belport in sorted(wire_downhill_belports[wire]):
- bba.u32(belport[0], "bel_index")
- bba.u32(portpins[belport[1]], "port")
- else:
- num_bels_downhill = 0
-
if wire in wire_belports:
num_bel_pins = len(wire_belports[wire])
bba.l("wire%d_bels" % wire, "BelPortPOD")
@@ -1047,12 +1021,6 @@ for wire in range(num_wires):
info["num_downhill"] = num_downhill
info["list_downhill"] = list_downhill
- info["num_bels_downhill"] = num_bels_downhill
- info["list_bels_downhill"] = ("wire%d_downbels" % wire) if num_bels_downhill > 0 else None
-
- info["num_bels_uphill"] = num_bels_uphill
- info["list_bels_uphill"] = ("wire%d_upbels" % wire) if num_bels_uphill > 0 else None
-
info["num_bel_pins"] = num_bel_pins
info["list_bel_pins"] = ("wire%d_bels" % wire) if num_bel_pins > 0 else None
@@ -1130,10 +1098,6 @@ for wire, info in enumerate(wireinfo):
bba.u32(info["num_downhill"], "num_downhill")
bba.r(info["list_uphill"], "pips_uphill")
bba.r(info["list_downhill"], "pips_downhill")
- bba.u32(info["num_bels_uphill"], "num_bels_uphill")
- bba.u32(info["num_bels_downhill"], "num_bels_downhill")
- bba.r(info["list_bels_uphill"], "bels_uphill")
- bba.r(info["list_bels_downhill"], "bels_downhill")
bba.u32(info["num_bel_pins"], "num_bel_pins")
bba.r(info["list_bel_pins"], "bel_pins")
bba.u32(len(wire_segments[wire]), "num_segments")