Skip to content

Commit 41afe8d

Browse files
authored
Merge pull request #275 from yrabbit/no-hard
Remove the magic numbers
2 parents b0f4246 + 1186b6c commit 41afe8d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apycula/chipdb.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1928,6 +1928,8 @@ def from_fse(device, fse, dat: Datfile):
19281928
bram_aux_ttypes = get_tile_types_by_func(dev, dat, fse, 'b')
19291929
dsp_ttypes = get_tile_types_by_func(dev, dat, fse, 'D')
19301930
dsp_aux_ttypes = get_tile_types_by_func(dev, dat, fse, 'd')
1931+
pll_ttypes = get_tile_types_by_func(dev, dat, fse, 'P')
1932+
pll_ttypes.update(get_tile_types_by_func(dev, dat, fse, 'p'))
19311933
for ttyp in ttypes:
19321934
w = fse[ttyp]['width']
19331935
h = fse[ttyp]['height']
@@ -1950,11 +1952,7 @@ def from_fse(device, fse, dat: Datfile):
19501952
tile.bels = fse_dsp(fse)
19511953
elif ttyp in dsp_aux_ttypes:
19521954
tile.bels = fse_dsp(fse, True)
1953-
# These are the cell types in which PLLs can be located. To determine,
1954-
# we first take the coordinates of the cells with the letters P and p
1955-
# from the dat['grid'] table, and then, using these coordinates,
1956-
# determine the type from fse['header']['grid'][61][row][col]
1957-
elif ttyp in [42, 45, 74, 75, 76, 77, 78, 79, 86, 87, 88, 89]:
1955+
elif ttyp in pll_ttypes:
19581956
tile.bels = fse_pll(device, fse, ttyp)
19591957
tile.bels.update(fse_iologic(device, fse, ttyp))
19601958
tiles[ttyp] = tile

0 commit comments

Comments
 (0)