From cc9fb1497d070eafff678a092efc649c508b3b90 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 7 Nov 2018 11:00:57 +0000 Subject: ecp5: Groundwork for DCU support Signed-off-by: David Shah --- ecp5/bitstream.cc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'ecp5/bitstream.cc') diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc index 6d43b369..a48b7793 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -414,20 +414,17 @@ void fix_tile_names(Context *ctx, ChipConfig &cc) std::map tiletype_xform; for (const auto &tile : cc.tiles) { std::string newname = tile.first; - auto vcib = tile.first.find("VCIB"); - if (vcib != std::string::npos) { - // Remove the V - newname.erase(vcib, 1); + auto cibdcu = tile.first.find("CIB_DCU"); + if (cibdcu != std::string::npos) { + // Add the V + newname.insert(cibdcu, 1, 'V'); + tiletype_xform[tile.first] = newname; + } else if (tile.first.substr(tile.first.size() - 7) == "BMID_0H") { + newname.back() = 'V'; + tiletype_xform[tile.first] = newname; + } else if (tile.first.substr(tile.first.size() - 6) == "BMID_2") { + newname.push_back('V'); tiletype_xform[tile.first] = newname; - } else if (tile.first.back() == 'V') { - // BMID_0V or BMID_2V - if (tile.first.at(tile.first.size() - 2) == '0') { - newname.at(tile.first.size() - 1) = 'H'; - tiletype_xform[tile.first] = newname; - } else if (tile.first.at(tile.first.size() - 2) == '2') { - newname.pop_back(); - tiletype_xform[tile.first] = newname; - } } } // Apply the name changes -- cgit v1.2.3