diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-02 13:02:07 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-02 13:02:07 +0200 |
commit | f9a9da6cdb6e864f04532fd1d1ab3e646319fc2d (patch) | |
tree | d0542fcdf558552f23b8baa49f4f981bf23d1883 /ecp5/trellis_import.py | |
parent | 2b3f363e8975e80bb56e6adaea5604ab8fce164c (diff) | |
parent | 81ee55c7eb2f153ba01a6ff8aba2bffc54daa9dc (diff) | |
download | nextpnr-f9a9da6cdb6e864f04532fd1d1ab3e646319fc2d.tar.gz nextpnr-f9a9da6cdb6e864f04532fd1d1ab3e646319fc2d.tar.bz2 nextpnr-f9a9da6cdb6e864f04532fd1d1ab3e646319fc2d.zip |
Merge branch 'master' of github.com:YosysHQ/nextpnr into reroute
Diffstat (limited to 'ecp5/trellis_import.py')
-rwxr-xr-x | ecp5/trellis_import.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ecp5/trellis_import.py b/ecp5/trellis_import.py index 9a4f30ab..d60ab6f4 100755 --- a/ecp5/trellis_import.py +++ b/ecp5/trellis_import.py @@ -136,7 +136,7 @@ def process_loc_globals(chip): tapdrv = chip.global_data.get_tap_driver(y, x) global_data[x, y] = (quadrants.index(quad), int(tapdrv.dir), tapdrv.col) -def write_database(dev_name, ddrg, endianness): +def write_database(dev_name, chip, ddrg, endianness): def write_loc(loc, sym_name): bba.u16(loc.x, "%s.x" % sym_name) bba.u16(loc.y, "%s.y" % sym_name) @@ -221,6 +221,20 @@ def write_database(dev_name, ddrg, endianness): bba.r("loc%d_wires" % idx if len(loctype.wires) > 0 else None, "wire_data") bba.r("loc%d_pips" % idx if len(loctype.arcs) > 0 else None, "pips_data") + for y in range(0, max_row+1): + for x in range(0, max_col+1): + bba.l("tile_info_%d_%d" % (x, y), "TileNamePOD") + for tile in chip.get_tiles_by_position(y, x): + bba.s(tile.info.name, "name") + bba.u16(get_tiletype_index(tile.info.type), "type_idx") + bba.u16(0, "padding") + + bba.l("tiles_info", "TileInfoPOD") + for y in range(0, max_row+1): + for x in range(0, max_col+1): + bba.u32(len(chip.get_tiles_by_position(y, x)), "num_tiles") + bba.r("tile_info_%d_%d" % (x, y), "tile_names") + bba.l("location_types", "int32_t") for y in range(0, max_row+1): for x in range(0, max_col+1): @@ -278,6 +292,7 @@ def write_database(dev_name, ddrg, endianness): bba.r("tiletype_names", "tiletype_names") bba.r("package_data", "package_info") bba.r("pio_info", "pio_info") + bba.r("tiles_info", "tile_info") bba.pop() return bba @@ -311,7 +326,7 @@ def main(): process_pio_db(ddrg, args.device) process_loc_globals(chip) # print("{} unique location types".format(len(ddrg.locationTypes))) - bba = write_database(args.device, ddrg, "le") + bba = write_database(args.device, chip, ddrg, "le") |