mirror of https://github.com/openXC7/prjxray.git
Ran make format
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
parent
906046a3c4
commit
2c391890e3
|
|
@ -81,6 +81,7 @@ def find_pudc_b(db):
|
|||
|
||||
return pudc_b_tile_site
|
||||
|
||||
|
||||
def get_iob_sites(db, tile_name):
|
||||
"""
|
||||
Yields prjxray site names for given IOB tile name
|
||||
|
|
@ -92,6 +93,7 @@ def get_iob_sites(db, tile_name):
|
|||
site_y = int(site[-1]) % 2
|
||||
yield "IOB_Y{}".format(site_y)
|
||||
|
||||
|
||||
def run(
|
||||
db_root,
|
||||
part,
|
||||
|
|
@ -105,17 +107,19 @@ def run(
|
|||
assembler = fasm_assembler.FasmAssembler(db)
|
||||
|
||||
set_features = set()
|
||||
|
||||
def feature_callback(feature):
|
||||
set_features.add(feature)
|
||||
|
||||
assembler.set_feature_callback(feature_callback)
|
||||
assembler.set_feature_callback(feature_callback)
|
||||
|
||||
# Build mapping of tile to IO bank
|
||||
tile_to_bank = {}
|
||||
bank_to_tile = defaultdict(lambda: set())
|
||||
|
||||
if part is not None:
|
||||
with open(os.path.join(db_root, part+"_package_pins.csv"), "r") as fp:
|
||||
with open(os.path.join(db_root, part + "_package_pins.csv"),
|
||||
"r") as fp:
|
||||
reader = csv.DictReader(fp)
|
||||
package_pins = [l for l in reader]
|
||||
|
||||
|
|
@ -189,9 +193,12 @@ def run(
|
|||
|
||||
for set_feature in set_features:
|
||||
feature = set_feature.feature
|
||||
tile, site, tag = feature.split(".", maxsplit=2)
|
||||
tile, site, tag = feature.split(".", maxsplit=2)
|
||||
if "IOB33" in tile:
|
||||
used_iob_sites.add((tile, site,))
|
||||
used_iob_sites.add((
|
||||
tile,
|
||||
site,
|
||||
))
|
||||
if "STEPDOWN" in tag:
|
||||
stepdown_banks.add(tile_to_bank[tile])
|
||||
stepdown_tags.add(tag)
|
||||
|
|
@ -209,7 +216,7 @@ def run(
|
|||
for tag in stepdown_tags:
|
||||
feature = "{}.{}.{}".format(tile, site, tag)
|
||||
for line in fasm.parse_fasm_string(feature):
|
||||
assembler.add_fasm_line(line, missing_features)
|
||||
assembler.add_fasm_line(line, missing_features)
|
||||
|
||||
if missing_features:
|
||||
raise fasm_assembler.FasmLookupError('\n'.join(missing_features))
|
||||
|
|
|
|||
|
|
@ -168,10 +168,13 @@ CLBLM_L_X10Y102.SLICEM_X0.SRUSEDMUX 1
|
|||
self.assertGreaterEqual(len(fout_full_txt), len(fout_sparse_txt) * 4)
|
||||
|
||||
def test_stepdown_1(self):
|
||||
self.bitread_frm_equals('iob/liob_stepdown.fasm', 'iob/liob_stepdown.bits')
|
||||
self.bitread_frm_equals(
|
||||
'iob/liob_stepdown.fasm', 'iob/liob_stepdown.bits')
|
||||
|
||||
def test_stepdown_2(self):
|
||||
self.bitread_frm_equals('iob/riob_stepdown.fasm', 'iob/riob_stepdown.bits')
|
||||
self.bitread_frm_equals(
|
||||
'iob/riob_stepdown.fasm', 'iob/riob_stepdown.bits')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in New Issue