diff options
author | David Shah <davey1576@gmail.com> | 2018-09-30 13:31:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-30 13:31:27 +0100 |
commit | 2e7aeaef974c8c104e61de03bc57f0ea764bd9c0 (patch) | |
tree | c4ad68c7128a21d1bb4cb5baf16679addddcd074 /ecp5/trellis_import.py | |
parent | 07cf349ee46a8c8a3163d2f8a146beab02e6b487 (diff) | |
parent | 0e0ad26f07354938820b6acd1d422fee3208767e (diff) | |
download | nextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.tar.gz nextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.tar.bz2 nextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.zip |
Merge pull request #81 from YosysHQ/ecp5_globals
Adding a simple ECP5 global network router
Diffstat (limited to 'ecp5/trellis_import.py')
-rwxr-xr-x | ecp5/trellis_import.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ecp5/trellis_import.py b/ecp5/trellis_import.py index de8e9958..9a26b605 100755 --- a/ecp5/trellis_import.py +++ b/ecp5/trellis_import.py @@ -128,7 +128,12 @@ def process_loc_globals(chip): for x in range(0, max_col+1): quad = chip.global_data.get_quadrant(y, x) tapdrv = chip.global_data.get_tap_driver(y, x) - global_data[x, y] = (quadrants.index(quad), int(tapdrv.dir), tapdrv.col) + if tapdrv.col == x: + spinedrv = chip.global_data.get_spine_driver(quad, x) + spine = (spinedrv.second, spinedrv.first) + else: + spine = (-1, -1) + global_data[x, y] = (quadrants.index(quad), int(tapdrv.dir), tapdrv.col, spine) def get_wire_type(name): if "H00" in name or "V00" in name: @@ -282,6 +287,8 @@ def write_database(dev_name, chip, ddrg, endianness): bba.u16(global_data[x, y][2], "tap_col") bba.u8(global_data[x, y][1], "tap_dir") bba.u8(global_data[x, y][0], "quad") + bba.u16(global_data[x, y][3][1], "spine_row") + bba.u16(global_data[x, y][3][0], "spine_col") for package, pkgdata in sorted(packages.items()): bba.l("package_data_%s" % package, "PackagePinPOD") |