Merge branch 'master' of github.com:YosysHQ/nextpnr into archattr
This commit is contained in:
commit
97520bb728
@ -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()
|
||||||
|
@ -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
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -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; }
|
||||||
|
@ -870,10 +870,12 @@ 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];
|
||||||
WireId wire;
|
if (net!=nullptr) {
|
||||||
wire.index = pi.dst;
|
WireId wire;
|
||||||
ctx->unbindWire(wire);
|
wire.index = pi.dst;
|
||||||
ctx->bindPip(pip, net, STRENGTH_WEAK);
|
ctx->unbindWire(wire);
|
||||||
|
ctx->bindPip(pip, net, STRENGTH_WEAK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (auto bel : ctx->getBels()) {
|
for (auto bel : ctx->getBels()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user