Merge branch 'master' of github.com:YosysHQ/nextpnr into archattr

This commit is contained in:
Clifford Wolf 2018-08-18 13:06:21 +02:00
commit 97520bb728
4 changed files with 23 additions and 7 deletions

View File

@ -5,6 +5,13 @@ project(nextpnr)
option(BUILD_GUI "Build GUI" ON) option(BUILD_GUI "Build GUI" ON)
option(BUILD_PYTHON "Build Python Integration" ON) option(BUILD_PYTHON "Build Python Integration" ON)
option(BUILD_TESTS "Build GUI" OFF) option(BUILD_TESTS "Build GUI" OFF)
option(STATIC_BUILD "Create static build" OFF)
set(link_param "")
if (STATIC_BUILD)
set(Boost_USE_STATIC_LIBS ON)
set(link_param "-static")
endif()
# List of families to build # List of families to build
set(FAMILIES generic ice40 ecp5) set(FAMILIES generic ice40 ecp5)
@ -211,7 +218,7 @@ foreach (family ${ARCH})
# Include family-specific source files to all family targets and set defines appropriately # Include family-specific source files to all family targets and set defines appropriately
target_include_directories(${target} PRIVATE ${family}/ ${CMAKE_CURRENT_BINARY_DIR}/generated/) target_include_directories(${target} PRIVATE ${family}/ ${CMAKE_CURRENT_BINARY_DIR}/generated/)
target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family}) target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family})
target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES}) target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES} ${link_param})
if (NOT MSVC) if (NOT MSVC)
target_link_libraries(${target} LINK_PUBLIC pthread) target_link_libraries(${target} LINK_PUBLIC pthread)
endif() endif()

View File

@ -127,6 +127,13 @@ cmake -DARCH=ice40 -DCMAKE_BUILD_TYPE=Debug -DBUILD_PYTHON=OFF -DBUILD_GUI=OFF -
make -j$(nproc) make -j$(nproc)
``` ```
To make static build relase for iCE40 architecture use the following:
```
cmake -DARCH=ice40 -DBUILD_PYTHON=OFF -DBUILD_GUI=OFF -DSTATIC_BUILD=ON .
make -j$(nproc)
```
Notes for developers Notes for developers
-------------------- --------------------

View File

@ -367,7 +367,7 @@ BelId Arch::getBelByLocation(Loc loc) const
delay_t Arch::estimateDelay(WireId src, WireId dst) const delay_t Arch::estimateDelay(WireId src, WireId dst) const
{ {
return 200 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); return 50 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y));
} }
delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
@ -376,7 +376,7 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
auto driver_loc = getBelLocation(driver.cell->bel); auto driver_loc = getBelLocation(driver.cell->bel);
auto sink_loc = getBelLocation(sink.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel);
return 200 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); return 50 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y));
} }
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; } bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; }

View File

@ -870,12 +870,14 @@ bool read_asc(Context *ctx, std::istream &in)
} }
if (isUsed) { if (isUsed) {
NetInfo *net = ctx->wire_to_net[pi.dst]; NetInfo *net = ctx->wire_to_net[pi.dst];
if (net!=nullptr) {
WireId wire; WireId wire;
wire.index = pi.dst; wire.index = pi.dst;
ctx->unbindWire(wire); ctx->unbindWire(wire);
ctx->bindPip(pip, net, STRENGTH_WEAK); ctx->bindPip(pip, net, STRENGTH_WEAK);
} }
} }
}
for (auto bel : ctx->getBels()) { for (auto bel : ctx->getBels()) {
if (ctx->getBelType(bel) == id_ICESTORM_LC) { if (ctx->getBelType(bel) == id_ICESTORM_LC) {
const TileInfoPOD &ti = bi.tiles_nonrouting[TILE_LOGIC]; const TileInfoPOD &ti = bi.tiles_nonrouting[TILE_LOGIC];