Skip to content

Commit 28c32ec

Browse files
authored
Merge pull request #48 from litghost/add_lut_output_pin
Add LUT output pins to chipdb.
2 parents b4331ef + 2b28278 commit 28c32ec

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

fpga_interchange/chip_info.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def __init__(self):
251251
self.pins = []
252252
self.low_bit = 0
253253
self.high_bit = 0
254+
self.out_pin = ''
254255

255256
def field_label(self, label_prefix, field):
256257
prefix = '{}.{}.{}'.format(label_prefix, self.name, field)
@@ -267,6 +268,7 @@ def append_bba(self, bba, label_prefix):
267268
bba.u32(len(self.pins))
268269
bba.u32(self.low_bit)
269270
bba.u32(self.high_bit)
271+
bba.str_id(self.out_pin)
270272

271273

272274
class LutElement():
@@ -721,7 +723,7 @@ def __init__(self):
721723
self.generator = ''
722724

723725
# Note: Increment by 1 this whenever schema changes.
724-
self.version = 5
726+
self.version = 6
725727
self.width = 0
726728
self.height = 0
727729

fpga_interchange/populate_chip_info.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def emit(self, lut_elements):
172172
for pin in bel.inputPins:
173173
lut_bel.pins.append(pin)
174174

175+
lut_bel.out_pin = bel.outputPin
176+
175177
lut_bel.low_bit = bel.lowBit
176178
lut_bel.high_bit = bel.highBit
177179

@@ -297,7 +299,8 @@ def __init__(self, device, tile_type_index, tile_type, cell_bel_mapper,
297299
if port.type == PortType.PORT_OUT:
298300
# Only record wires driven by BEL pin outputs.
299301
# BEL pin inputs do not consume the wire.
300-
pseudo_cell_wires.add(port.wire)
302+
if port.wire != -1:
303+
pseudo_cell_wires.add(port.wire)
301304

302305
# Make sure every BEL pin from the database matches at least 1
303306
# instance (possibly more!).

0 commit comments

Comments
 (0)