Skip to content

Commit

Permalink
Merge pull request #1575 from antmicro/fix-carry-diff-fasm
Browse files Browse the repository at this point in the history
fasm2bels: clb: fix carry chain DOUTMUX connections
  • Loading branch information
litghost authored Jul 7, 2020
2 parents 5b56d66 + 2ff40b1 commit 6f9c691
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions xc/xc7/fasm2bels/clb_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,7 @@ def connect_ce_sr(bel, ce, sr):
co_pin = 'CO[{}]'.format(idx)
if idx == 3:
site.add_source(bel, co_pin, 'COUT')
else:
site.add_internal_source(bel, co_pin, lut + '_CY')
site.add_internal_source(bel, co_pin, lut + '_CY')

if site.has_feature('PRECYINIT.AX'):
site.add_sink(bel, 'CYINIT', 'AX')
Expand Down Expand Up @@ -1178,10 +1177,8 @@ def connect_ce_sr(bel, ce, sr):

elif site.has_feature('{}FFMUX.CY'.format(lut)):
assert can_have_carry4
if lut != 'D':
site.connect_internal(ff, 'D', lut + '_CY')
else:
ff.connections['D'] = 'COUT'
site.connect_internal(ff, 'D', lut + '_CY')

elif site.has_feature('{}FFMUX.XOR'.format(lut)):
assert can_have_carry4
site.connect_internal(ff, 'D', lut + '_XOR')
Expand Down Expand Up @@ -1230,10 +1227,7 @@ def connect_ce_sr(bel, ce, sr):

elif site.has_feature('{}OUTMUX.CY'.format(lut)):
assert can_have_carry4
if lut != 'D':
site.add_output_from_internal(output_wire, lut + '_CY')
else:
site.add_output_from_output(output_wire, 'COUT')
site.add_output_from_internal(output_wire, lut + '_CY')

elif site.has_feature('{}OUTMUX.XOR'.format(lut)):
assert can_have_carry4
Expand Down

0 comments on commit 6f9c691

Please sign in to comment.