diff options
author | David Shah <dave@ds0.me> | 2019-01-21 19:03:12 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-02-08 12:34:22 +0000 |
commit | e929d221f3395b8c28bf146d1673072077cd8eea (patch) | |
tree | c6e2d2c8ee2046ef3df5423ba3fc5cab4808be5c /ecp5/arch.h | |
parent | 8e8c103b3490a4636b652fb6555c40cd39fc1649 (diff) | |
download | nextpnr-e929d221f3395b8c28bf146d1673072077cd8eea.tar.gz nextpnr-e929d221f3395b8c28bf146d1673072077cd8eea.tar.bz2 nextpnr-e929d221f3395b8c28bf146d1673072077cd8eea.zip |
ecp5: Adding DTR, OSCG, CLKDIVF, USRMCLK, JTAGG
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/arch.h')
-rw-r--r-- | ecp5/arch.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h index a68673f4..4f2aaaa9 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -993,6 +993,17 @@ struct Arch : BaseCtx NPNR_ASSERT_FALSE_STR("no tile at (" + std::to_string(col) + ", " + std::to_string(row) + ") with type in set"); } + std::string getTileByType(std::string type) const + { + for (int i = 0; i < chip_info->height * chip_info->width; i++) { + auto &tileloc = chip_info->tile_info[i]; + for (int j = 0; j < tileloc.num_tiles; j++) + if (chip_info->tiletype_names[tileloc.tile_names[j].type_idx].get() == type) + return tileloc.tile_names[j].name.get(); + } + NPNR_ASSERT_FALSE_STR("no with type " + type); + } + GlobalInfoPOD globalInfoAtLoc(Location loc); // Apply LPF constraints to the context |