aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/bitstream.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-07 11:00:57 +0000
committerDavid Shah <dave@ds0.me>2018-11-15 11:30:27 +0000
commitcc9fb1497d070eafff678a092efc649c508b3b90 (patch)
tree0cf4388917619d69e52b7740067a9fb800304b2b /ecp5/bitstream.cc
parent9472b6d78f68544d430feeae6d75dbd2dc43019d (diff)
downloadnextpnr-cc9fb1497d070eafff678a092efc649c508b3b90.tar.gz
nextpnr-cc9fb1497d070eafff678a092efc649c508b3b90.tar.bz2
nextpnr-cc9fb1497d070eafff678a092efc649c508b3b90.zip
ecp5: Groundwork for DCU support
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/bitstream.cc')
-rw-r--r--ecp5/bitstream.cc23
1 files changed, 10 insertions, 13 deletions
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<std::string, std::string> 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