diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-18 13:06:21 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-18 13:06:21 +0200 |
commit | 97520bb72833820e0d4321670ccf5a6edeea9d16 (patch) | |
tree | 2f42982b058c4a0a89de79f51201beddc4a5cdfb | |
parent | 428f0b9ebaec7bd0cf86ecbc50d1edd3a7bf0c51 (diff) | |
parent | 5fe29922fd15af87cd260a561e88ac2e5b27203d (diff) | |
download | nextpnr-97520bb72833820e0d4321670ccf5a6edeea9d16.tar.gz nextpnr-97520bb72833820e0d4321670ccf5a6edeea9d16.tar.bz2 nextpnr-97520bb72833820e0d4321670ccf5a6edeea9d16.zip |
Merge branch 'master' of github.com:YosysHQ/nextpnr into archattr
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | ecp5/arch.cc | 4 | ||||
-rw-r--r-- | ice40/bitstream.cc | 10 |
4 files changed, 23 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c222d71..0cf55eb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,13 @@ project(nextpnr) option(BUILD_GUI "Build GUI" ON) option(BUILD_PYTHON "Build Python Integration" ON) 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 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 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_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES}) + target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES} ${link_param}) if (NOT MSVC) target_link_libraries(${target} LINK_PUBLIC pthread) endif() @@ -127,6 +127,13 @@ cmake -DARCH=ice40 -DCMAKE_BUILD_TYPE=Debug -DBUILD_PYTHON=OFF -DBUILD_GUI=OFF - 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 -------------------- diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 4358fdaf..fec1011c 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -367,7 +367,7 @@ BelId Arch::getBelByLocation(Loc loc) 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 @@ -376,7 +376,7 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const auto driver_loc = getBelLocation(driver.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; } diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc index ee276e49..4ea91011 100644 --- a/ice40/bitstream.cc +++ b/ice40/bitstream.cc @@ -870,10 +870,12 @@ bool read_asc(Context *ctx, std::istream &in) }
if (isUsed) {
NetInfo *net = ctx->wire_to_net[pi.dst];
- WireId wire;
- wire.index = pi.dst;
- ctx->unbindWire(wire);
- ctx->bindPip(pip, net, STRENGTH_WEAK);
+ if (net!=nullptr) {
+ WireId wire;
+ wire.index = pi.dst;
+ ctx->unbindWire(wire);
+ ctx->bindPip(pip, net, STRENGTH_WEAK);
+ }
}
}
for (auto bel : ctx->getBels()) {
|