diff options
author | YRabbit <rabbit@yrabbit.cyou> | 2022-07-04 08:15:21 +1000 |
---|---|---|
committer | YRabbit <rabbit@yrabbit.cyou> | 2022-07-04 08:15:21 +1000 |
commit | 6d85de43ee1f9585e3c3a170f52513755ed924b5 (patch) | |
tree | 3b4b9fdde4a94f6d18dba269284bf5fb42265f72 | |
parent | 63f2acd42adf3884d153381696cf7845c6d74162 (diff) | |
parent | b4337d99fde46abe85cab8bdf98a681eefe1f3e1 (diff) | |
download | nextpnr-6d85de43ee1f9585e3c3a170f52513755ed924b5.tar.gz nextpnr-6d85de43ee1f9585e3c3a170f52513755ed924b5.tar.bz2 nextpnr-6d85de43ee1f9585e3c3a170f52513755ed924b5.zip |
Merge branch 'master' into clock-wip
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | ice40/arch_place.cc | 18 |
2 files changed, 11 insertions, 10 deletions
@@ -145,7 +145,8 @@ An example of how to use the generic flow is in [generic/examples](generic/examp The nextpnr GUI is not built by default, to reduce the number of dependencies for a standard headless build. To enable it, add `-DBUILD_GUI=ON` to the CMake command line and ensure that Qt5 and OpenGL are available: - - On Ubuntu, install `qt5-default` + - On Ubuntu 22.04 LTS, install `qtcreator qtbase5-dev qt5-qmake` + - On other Ubuntu versions, install `qt5-default` - For MSVC vcpkg, install `qt5-base` (32-bit) or `qt5-base:x64-windows` (64-bit) - For Homebrew, install `qt5` and add qt5 in path: `echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile` ` - this change is effective in next terminal session, so please re-open terminal window before building diff --git a/ice40/arch_place.cc b/ice40/arch_place.cc index 3b024d81..67ddf777 100644 --- a/ice40/arch_place.cc +++ b/ice40/arch_place.cc @@ -95,7 +95,7 @@ bool Arch::isBelLocationValid(BelId bel) const } return logic_cells_compatible(bel_cells.data(), num_cells); } else { - CellInfo *cell = getBoundBelCell(bel); + const CellInfo *cell = getBoundBelCell(bel); if (cell == nullptr) return true; else if (cell->type == id_SB_IO) { @@ -107,7 +107,7 @@ bool Arch::isBelLocationValid(BelId bel) const for (auto pin : getWireBelPins(wire)) { if (pin.pin == id_PLLOUT_A || pin.pin == id_PLLOUT_B) { // Is there a PLL there ? - auto pll_cell = getBoundBelCell(pin.bel); + const CellInfo *pll_cell = getBoundBelCell(pin.bel); if (pll_cell == nullptr) break; @@ -116,11 +116,11 @@ bool Arch::isBelLocationValid(BelId bel) const break; // Is that SB_IO used at an input ? - if ((cell->ports[id_D_IN_0].net == nullptr) && (cell->ports[id_D_IN_1].net == nullptr)) + if ((cell->getPort(id_D_IN_0) == nullptr) && (cell->getPort(id_D_IN_1) == nullptr)) break; // Are we perhaps a PAD INPUT Bel that can be placed here? - if (pll_cell->attrs[id_BEL_PAD_INPUT] == getBelName(bel).str(getCtx())) + if (str_or_default(pll_cell->attrs, id_BEL_PAD_INPUT, "") == getBelName(bel).str(getCtx())) return true; // Conflict @@ -144,7 +144,7 @@ bool Arch::isBelLocationValid(BelId bel) const } else { // Check LVDS IO is not placed at complement location BelId compBel = getBelByLocation(compLoc); - CellInfo *compCell = getBoundBelCell(compBel); + const CellInfo *compCell = getBoundBelCell(compBel); if (compCell && compCell->ioInfo.lvds) return false; @@ -161,10 +161,10 @@ bool Arch::isBelLocationValid(BelId bel) const _io_pintype_need_clk_en(cell->ioInfo.pintype), _io_pintype_need_clk_en(compCell->ioInfo.pintype), }; - NetInfo *nets[] = { - cell->ports[id_INPUT_CLK].net, compCell->ports[id_INPUT_CLK].net, - cell->ports[id_OUTPUT_CLK].net, compCell->ports[id_OUTPUT_CLK].net, - cell->ports[id_CLOCK_ENABLE].net, compCell->ports[id_CLOCK_ENABLE].net, + const NetInfo *nets[] = { + cell->getPort(id_INPUT_CLK), compCell->getPort(id_INPUT_CLK), + cell->getPort(id_OUTPUT_CLK), compCell->getPort(id_OUTPUT_CLK), + cell->getPort(id_CLOCK_ENABLE), compCell->getPort(id_CLOCK_ENABLE), }; for (int i = 0; i < 6; i++) |