diff options
author | YRabbit <rabbit@yrabbit.cyou> | 2021-10-09 20:33:48 +1000 |
---|---|---|
committer | YRabbit <rabbit@yrabbit.cyou> | 2021-10-09 20:33:48 +1000 |
commit | 95217e7dd27c538fdfad4dfc4f724398c37edad3 (patch) | |
tree | e78a7669237365984c374bc9d8eaa42ddca2edac /mistral/arch.cc | |
parent | bfe9cd548a80adb83cb136efbe12216ebb1392d6 (diff) | |
parent | 520aec3ef459c478decf6954385b25c0260614de (diff) | |
download | nextpnr-95217e7dd27c538fdfad4dfc4f724398c37edad3.tar.gz nextpnr-95217e7dd27c538fdfad4dfc4f724398c37edad3.tar.bz2 nextpnr-95217e7dd27c538fdfad4dfc4f724398c37edad3.zip |
Merge branch 'master' into delays
Diffstat (limited to 'mistral/arch.cc')
-rw-r--r-- | mistral/arch.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/mistral/arch.cc b/mistral/arch.cc index a6146fcb..52ba14fb 100644 --- a/mistral/arch.cc +++ b/mistral/arch.cc @@ -64,24 +64,12 @@ Arch::Arch(ArchArgs args) log_info("Initialising bels...\n"); bels_by_tile.resize(cyclonev->get_tile_sx() * cyclonev->get_tile_sy()); - for (int x = 0; x < cyclonev->get_tile_sx(); x++) { - for (int y = 0; y < cyclonev->get_tile_sy(); y++) { - CycloneV::pos_t pos = cyclonev->xy2pos(x, y); - - for (CycloneV::block_type_t bel : cyclonev->pos_get_bels(pos)) { - switch (bel) { - case CycloneV::block_type_t::LAB: - create_lab(x, y, /*is_mlab=*/false); - break; - case CycloneV::block_type_t::MLAB: - create_lab(x, y, /*is_mlab=*/true); - break; - default: - continue; - } - } - } - } + + for (auto lab_pos : cyclonev->lab_get_pos()) + create_lab(CycloneV::pos2x(lab_pos), CycloneV::pos2y(lab_pos), /*is_mlab=*/false); + + for (auto mlab_pos : cyclonev->mlab_get_pos()) + create_lab(CycloneV::pos2x(mlab_pos), CycloneV::pos2y(mlab_pos), /*is_mlab=*/true); for (auto gpio_pos : cyclonev->gpio_get_pos()) create_gpio(CycloneV::pos2x(gpio_pos), CycloneV::pos2y(gpio_pos)); |