From 0658759495d25fe5d1ffa8d58f86214ccd0e98d9 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 1 Aug 2018 15:58:38 +0200 Subject: ecp5: Remove libtrellis link for bitstream gen Signed-off-by: David Shah --- ecp5/arch.h | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'ecp5/arch.h') diff --git a/ecp5/arch.h b/ecp5/arch.h index 002d69c2..1ddc4003 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -759,17 +759,6 @@ struct Arch : BaseCtx return range; } - std::string getTileByTypeAndLocation(int row, int col, std::string type) const - { - auto &tileloc = chip_info->tile_info[row * chip_info->width + col]; - for (int i = 0; i < tileloc.num_tiles; i++) { - if (chip_info->tiletype_names[tileloc.tile_names[i].type_idx].get() == type) - return tileloc.tile_names[i].name.get(); - } - NPNR_ASSERT_FALSE_STR("no tile at (" + std::to_string(col) + ", " + std::to_string(row) + ") with type " + - type); - } - std::string getPipTilename(PipId pip) const { auto &tileloc = chip_info->tile_info[pip.location.y * chip_info->width + pip.location.x]; @@ -851,6 +840,28 @@ struct Arch : BaseCtx // Helper function for above bool slicesCompatible(const std::vector &cells) const; + std::vector> getTilesAtLocation(int row, int col); + std::string getTileByTypeAndLocation(int row, int col, std::string type) const + { + auto &tileloc = chip_info->tile_info[row * chip_info->width + col]; + for (int i = 0; i < tileloc.num_tiles; i++) { + if (chip_info->tiletype_names[tileloc.tile_names[i].type_idx].get() == type) + return tileloc.tile_names[i].name.get(); + } + NPNR_ASSERT_FALSE_STR("no tile at (" + std::to_string(col) + ", " + std::to_string(row) + ") with type " + + type); + } + + std::string getTileByTypeAndLocation(int row, int col, const std::set &type) const + { + auto &tileloc = chip_info->tile_info[row * chip_info->width + col]; + for (int i = 0; i < tileloc.num_tiles; i++) { + if (type.count(chip_info->tiletype_names[tileloc.tile_names[i].type_idx].get())) + return tileloc.tile_names[i].name.get(); + } + NPNR_ASSERT_FALSE_STR("no tile at (" + std::to_string(col) + ", " + std::to_string(row) + ") with type in set"); + } + IdString id_trellis_slice; IdString id_clk, id_lsr; IdString id_clkmux, id_lsrmux; -- cgit v1.2.3