CMake: align Himbaechel targets with non-Himbaechel ones.

Primarily, this commit makes both of them use the `BBAsm` functions
to build and compile `.bba` files.

In addition, Himbaechel targets are now aligned with the rest in
how they are configured: instead of having all uarches enabled with
all of the devices disabled (the opposite of the rest of nextpnr),
uarches must be enabled explicitly but they come with all devices
enabled (except for Xilinx, which does not have a list of devices).
This commit is contained in:
Catherine 2025-01-15 16:20:21 +00:00
parent f5776a6d64
commit dcfb7d8c33
9 changed files with 187 additions and 139 deletions

View File

@ -7,7 +7,7 @@ function get_dependencies {
function build_nextpnr { function build_nextpnr {
mkdir build mkdir build
pushd build pushd build
cmake .. -DARCH=himbaechel -DHIMBAECHEL_EXAMPLE_DEVICES=example cmake .. -DARCH=himbaechel -DHIMBAECHEL_UARCH=example -DHIMBAECHEL_EXAMPLE_DEVICES=example
make nextpnr-himbaechel chipdb-himbaechel-example -j`nproc` make nextpnr-himbaechel chipdb-himbaechel-example -j`nproc`
popd popd
} }

View File

@ -140,7 +140,7 @@ The himbaechel target allows running placement and routing for larger architectu
For Gowin support, install [Project Apicula](https://github.com/YosysHQ/apicula) For Gowin support, install [Project Apicula](https://github.com/YosysHQ/apicula)
``` ```
cmake . -DARCH="himbaechel" -DHIMBAECHEL_GOWIN_DEVICES="all" cmake . -DARCH="himbaechel" -DHIMBAECHEL_UARCH="gowin"
make -j$(nproc) make -j$(nproc)
sudo make install sudo make install
``` ```
@ -152,7 +152,7 @@ sudo make install
For NanoXplore NG-Ultra support, clone [Project Beyond DB](https://github.com/yosyshq-GmbH/prjbeyond-db) repo For NanoXplore NG-Ultra support, clone [Project Beyond DB](https://github.com/yosyshq-GmbH/prjbeyond-db) repo
``` ```
cmake . -DARCH="himbaechel" -DHIMBAECHEL_PRJBEYOND_DB=/path/to/prjbeyond-db -DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra cmake . -DARCH="himbaechel" -DHIMBAECHEL_UARCH="ng-ultra" -DHIMBAECHEL_PRJBEYOND_DB=/path/to/prjbeyond-db -DHIMBAECHEL_NGULTRA_DEVICES=ng-ultra
make -j$(nproc) make -j$(nproc)
sudo make install sudo make install
``` ```

View File

@ -39,12 +39,18 @@ function(add_bba_produce_command)
DEPENDS DEPENDS
${arg_EXECUTABLE} ${arg_EXECUTABLE}
${arg_INPUTS} ${arg_INPUTS}
$ENV{SERIALIZE_BBA_PRODUCE_COMMAND} $ENV{SERIALIZE_BBA_TARGET}
VERBATIM VERBATIM
) )
if (BBASM_SERIALIZE) if (BBASM_SERIALIZE)
set(ENV{SERIALIZE_BBA_PRODUCE_COMMAND} ${arg_OUTPUT}) # Have to insert a custom target in between two custom commands, else CMake will try to
# depend on the previous (in serialization order) command directly, which will fail if
# they're in different directories. Unfortunately this makes the terminal output uglier.
math(EXPR next_count "$ENV{SERIALIZE_BBA_COUNT} + 1")
add_custom_target(--bbasm-serialize-${next_count} DEPENDS ${arg_OUTPUT})
set(ENV{SERIALIZE_BBA_COUNT} ${next_count})
set(ENV{SERIALIZE_BBA_TARGET} --bbasm-serialize-${next_count})
endif() endif()
endfunction() endfunction()

View File

@ -1,2 +1,19 @@
# nextpnr-gowin only
find_program (GOWIN_BBA_EXECUTABLE gowin_bba) find_program (GOWIN_BBA_EXECUTABLE gowin_bba)
message(STATUS "gowin_bba executable: ${GOWIN_BBA_EXECUTABLE}") message(STATUS "gowin_bba executable: ${GOWIN_BBA_EXECUTABLE}")
# nextpnr-himbaechel-gowin only
if (DEFINED ENV{APYCULA_INSTALL_PREFIX})
set(apycula_default_install_prefix $ENV{APYCULA_INSTALL_PREFIX})
endif()
set(APYCULA_INSTALL_PREFIX ${apycula_default_install_prefix} CACHE STRING
"Apycula install prefix (virtualenv directory)")
if (NOT APYCULA_INSTALL_PREFIX STREQUAL "")
message(STATUS "Apycula install prefix: ${APYCULA_INSTALL_PREFIX}")
set(apycula_Python3_EXECUTABLE ${APYCULA_INSTALL_PREFIX}/bin/python)
else()
message(STATUS "Apycula install prefix: (not set, using Python: ${Python3_EXECUTABLE})")
set(apycula_Python3_EXECUTABLE ${Python3_EXECUTABLE})
endif()

View File

@ -1,16 +1,28 @@
set(HIMBAECHEL_UARCHES "example;gowin;xilinx;ng-ultra") set(HIMBAECHEL_UARCHES example gowin xilinx ng-ultra)
set(HIMBAECHEL_UARCH "${HIMBAECHEL_UARCHES}" CACHE STRING "Microarchitectures for nextpnr-himbaechel build") set(HIMBAECHEL_UARCH "" CACHE STRING "Microarchitectures for nextpnr-himbaechel build")
set_property(CACHE HIMBAECHEL_UARCH PROPERTY STRINGS ${HIMBAECHEL_UARCHES}) set_property(CACHE HIMBAECHEL_UARCH PROPERTY STRINGS ${HIMBAECHEL_UARCHES})
foreach (item ${HIMBAECHEL_UARCH}) if (NOT HIMBAECHEL_UARCH)
if (NOT item IN_LIST HIMBAECHEL_UARCHES) message(STATUS "Microarchitecture needs to be set, set desired one with -DHIMBAECHEL_UARCH=xxx")
message(FATAL_ERROR "Microarchitecture '${item}' not in list of supported architectures") message(STATUS "Supported Himbaechel microarchitectures are :")
endif() message(STATUS " all")
endforeach() foreach (item ${HIMBAECHEL_UARCHES})
message(STATUS " ${item}")
endforeach()
message(FATAL_ERROR "Microarchitecture setting is mandatory")
endif()
if (HIMBAECHEL_UARCH STREQUAL "all")
set(HIMBAECHEL_UARCH ${HIMBAECHEL_UARCHES})
endif()
foreach (uarch ${HIMBAECHEL_UARCH}) foreach (uarch ${HIMBAECHEL_UARCH})
add_subdirectory(uarch/${uarch}) if (NOT uarch IN_LIST HIMBAECHEL_UARCHES)
message(FATAL_ERROR "Microarchitecture ${uarch} is not a supported Himbaechel microarchitecture")
endif()
add_subdirectory(uarch/${uarch})
aux_source_directory(uarch/${uarch} HM_UARCH_FILES) aux_source_directory(uarch/${uarch} HM_UARCH_FILES)
foreach (target ${family_targets}) foreach (target ${family_targets})
target_sources(${target} PRIVATE ${HM_UARCH_FILES}) target_sources(${target} PRIVATE ${HM_UARCH_FILES})

View File

@ -1,32 +1,39 @@
message(STATUS "Configuring Himbaechel-Example uarch") add_custom_target(chipdb-himbaechel-example)
cmake_minimum_required(VERSION 3.5) foreach (target ${family_targets})
project(himbaechel-example-chipdb NONE) add_dependencies(${target} chipdb-himbaechel-example)
endforeach()
set(ALL_HIMBAECHEL_EXAMPLE_DEVICES example) set(ALL_HIMBAECHEL_EXAMPLE_DEVICES example)
set(HIMBAECHEL_EXAMPLE_DEVICES "" CACHE STRING set(HIMBAECHEL_EXAMPLE_DEVICES ${ALL_HIMBAECHEL_EXAMPLE_DEVICES} CACHE STRING
"Include support for these Example devices (available: ${ALL_HIMBAECHEL_EXAMPLE_DEVICES})") "Include support for these Example devices (available: ${ALL_HIMBAECHEL_EXAMPLE_DEVICES})")
message(STATUS "Enabled Himbaechel-Example devices: ${HIMBAECHEL_EXAMPLE_DEVICES}") message(STATUS "Enabled Himbaechel-Example devices: ${HIMBAECHEL_EXAMPLE_DEVICES}")
set(chipdb_binaries)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/example)
foreach (device ${HIMBAECHEL_EXAMPLE_DEVICES}) foreach (device ${HIMBAECHEL_EXAMPLE_DEVICES})
set(device_bba ${CMAKE_BINARY_DIR}/share/himbaechel/example/chipdb-${device}.bba) if (NOT device IN_LIST ALL_HIMBAECHEL_EXAMPLE_DEVICES)
set(device_bin ${CMAKE_BINARY_DIR}/share/himbaechel/example/chipdb-${device}.bin) message(FATAL_ERROR "Device ${device} is not a supported Example device")
add_custom_command( endif()
OUTPUT ${device_bin}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example_arch_gen.py ${device_bba} add_bba_produce_command(
COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${device_bba} ${device_bin}.new COMMAND ${Python3_EXECUTABLE}
# atomically update ${CMAKE_CURRENT_SOURCE_DIR}/example_arch_gen.py
COMMAND ${CMAKE_COMMAND} -E rename ${device_bin}.new ${device_bin} ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba.new
DEPENDS OUTPUT
bbasm ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
${CMAKE_CURRENT_SOURCE_DIR}/example_arch_gen.py INPUTS
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc ${CMAKE_CURRENT_SOURCE_DIR}/example_arch_gen.py
${CMAKE_CURRENT_SOURCE_DIR}/gfxids.inc ${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
VERBATIM) ${CMAKE_CURRENT_SOURCE_DIR}/gfxids.inc
list(APPEND chipdb_binaries ${device_bin}) )
add_bba_compile_command(
TARGET chipdb-himbaechel-example
OUTPUT ${CMAKE_BINARY_DIR}/share/himbaechel/example/chipdb-${device}.bin
INPUT ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
MODE binary
)
endforeach() endforeach()
add_custom_target(chipdb-himbaechel-example ALL DEPENDS ${chipdb_binaries}) install(
install(DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/example/ DESTINATION share/nextpnr/himbaechel/example DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/example
PATTERN "*.bba" EXCLUDE) DESTINATION share/nextpnr/himbaechel/example
)

View File

@ -1,51 +1,44 @@
message(STATUS "Configuring Himbaechel-Gowin uarch") include(FindApycula)
cmake_minimum_required(VERSION 3.5)
project(himbaechel-gowin-chipdb NONE) add_custom_target(chipdb-himbaechel-gowin ALL)
foreach (target ${family_targets})
add_dependencies(${target} chipdb-himbaechel-gowin)
endforeach()
set(ALL_HIMBAECHEL_GOWIN_DEVICES GW1N-1 GW1NZ-1 GW1N-4 GW1N-9 GW1N-9C GW1NS-4 GW2A-18 GW2A-18C) set(ALL_HIMBAECHEL_GOWIN_DEVICES GW1N-1 GW1NZ-1 GW1N-4 GW1N-9 GW1N-9C GW1NS-4 GW2A-18 GW2A-18C)
set(HIMBAECHEL_GOWIN_DEVICES "" CACHE STRING set(HIMBAECHEL_GOWIN_DEVICES ${ALL_HIMBAECHEL_GOWIN_DEVICES} CACHE STRING
"Include support for these Gowin devices (available: ${ALL_HIMBAECHEL_GOWIN_DEVICES})") "Include support for these Gowin devices (available: ${ALL_HIMBAECHEL_GOWIN_DEVICES})")
if (HIMBAECHEL_GOWIN_DEVICES STREQUAL "all") if (HIMBAECHEL_GOWIN_DEVICES STREQUAL "all")
set(HIMBAECHEL_GOWIN_DEVICES ${ALL_HIMBAECHEL_GOWIN_DEVICES}) set(HIMBAECHEL_GOWIN_DEVICES ${ALL_HIMBAECHEL_GOWIN_DEVICES})
endif() endif()
message(STATUS "Enabled Himbaechel-Gowin devices: ${HIMBAECHEL_GOWIN_DEVICES}") message(STATUS "Enabled Himbaechel-Gowin devices: ${HIMBAECHEL_GOWIN_DEVICES}")
if (DEFINED ENV{APYCULA_INSTALL_PREFIX})
set(apycula_default_install_prefix $ENV{APYCULA_INSTALL_PREFIX})
endif()
set(APYCULA_INSTALL_PREFIX ${apycula_default_install_prefix} CACHE STRING
"Apycula install prefix (virtualenv directory)")
if (NOT APYCULA_INSTALL_PREFIX STREQUAL "")
message(STATUS "Apycula install prefix: ${APYCULA_INSTALL_PREFIX}")
set(apycula_Python3_EXECUTABLE ${APYCULA_INSTALL_PREFIX}/bin/python)
else()
message(STATUS "Apycula install prefix: (using system Python)")
set(apycula_Python3_EXECUTABLE ${Python3_EXECUTABLE})
endif()
set(chipdb_binaries)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/gowin)
foreach (device ${HIMBAECHEL_GOWIN_DEVICES}) foreach (device ${HIMBAECHEL_GOWIN_DEVICES})
if (NOT device IN_LIST ALL_HIMBAECHEL_GOWIN_DEVICES) if (NOT device IN_LIST ALL_HIMBAECHEL_GOWIN_DEVICES)
message(FATAL_ERROR "Device ${device} is not a supported Gowin device") message(FATAL_ERROR "Device ${device} is not a supported Gowin device")
endif() endif()
set(device_bba ${CMAKE_BINARY_DIR}/share/himbaechel/gowin/chipdb-${device}.bba) add_bba_produce_command(
set(device_bin ${CMAKE_BINARY_DIR}/share/himbaechel/gowin/chipdb-${device}.bin) COMMAND ${apycula_Python3_EXECUTABLE}
add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/gowin_arch_gen.py
OUTPUT ${device_bin} -d ${device}
COMMAND ${apycula_Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gowin_arch_gen.py -d ${device} -o ${device_bba} -o ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba.new
COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${device_bba} ${device_bin}.new OUTPUT
# atomically update ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
COMMAND ${CMAKE_COMMAND} -E rename ${device_bin}.new ${device_bin} INPUTS
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gowin_arch_gen.py
bbasm ${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
${CMAKE_CURRENT_SOURCE_DIR}/gowin_arch_gen.py )
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
VERBATIM) add_bba_compile_command(
list(APPEND chipdb_binaries ${device_bin}) TARGET chipdb-himbaechel-gowin
OUTPUT ${CMAKE_BINARY_DIR}/share/himbaechel/gowin/chipdb-${device}.bin
INPUT ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
MODE binary
)
endforeach() endforeach()
add_custom_target(chipdb-himbaechel-gowin ALL DEPENDS ${chipdb_binaries}) install(
install(DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/gowin/ DESTINATION share/nextpnr/himbaechel/gowin DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/gowin
PATTERN "*.bba" EXCLUDE) DESTINATION share/nextpnr/himbaechel/gowin
)

View File

@ -1,38 +1,48 @@
message(STATUS "Configuring Himbaechel-NG-ULTRA uarch")
cmake_minimum_required(VERSION 3.5)
project(himbaechel-ng-ultra-chipdb NONE)
set(ALL_HIMBAECHEL_NGULTRA_DEVICES ng-ultra)
set(HIMBAECHEL_NGULTRA_DEVICES "" CACHE STRING
"Include support for these NG-Ultra devices (available: ${ALL_HIMBAECHEL_NGULTRA_DEVICES})")
message(STATUS "Enabled Himbaechel-NG-Ultra devices: ${HIMBAECHEL_NGULTRA_DEVICES}")
set(HIMBAECHEL_PRJBEYOND_DB "" CACHE STRING set(HIMBAECHEL_PRJBEYOND_DB "" CACHE STRING
"Path to a Project Beyond database") "Path to a Project Beyond database")
if (NOT HIMBAECHEL_PRJBEYOND_DB)
message(FATAL_ERROR "HIMBAECHEL_PRJBEYOND_DB must be set to a prjbeyond database checkout")
endif()
set(chipdb_binaries) add_custom_target(chipdb-himbaechel-ng-ultra)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra) foreach (target ${family_targets})
foreach (device ${HIMBAECHEL_NGULTRA_DEVICES}) add_dependencies(${target} chipdb-himbaechel-ng-ultra)
if ("${HIMBAECHEL_PRJBEYOND_DB}" STREQUAL "")
message(SEND_ERROR "HIMBAECHEL_PRJBEYOND_DB must be set to a prjbeyond database checkout")
endif()
set(device_bba ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra/chipdb-${device}.bba)
set(device_bin ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra/chipdb-${device}.bin)
string(TOUPPER ${device} upcase_device)
add_custom_command(
OUTPUT ${device_bin}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/gen/arch_gen.py --db ${HIMBAECHEL_PRJBEYOND_DB} --device ${upcase_device} --bba ${device_bba}
COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${device_bba} ${device_bin}.new
# atomically update
COMMAND ${CMAKE_COMMAND} -E rename ${device_bin}.new ${device_bin}
DEPENDS
bbasm
${CMAKE_CURRENT_SOURCE_DIR}/gen/arch_gen.py
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
VERBATIM)
list(APPEND chipdb_binaries ${device_bin})
endforeach() endforeach()
add_custom_target(chipdb-himbaechel-ng-ultra ALL DEPENDS ${chipdb_binaries}) set(ALL_HIMBAECHEL_NGULTRA_DEVICES ng-ultra)
install(DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra/ DESTINATION share/nextpnr/himbaechel/ng-ultra set(HIMBAECHEL_NGULTRA_DEVICES ${ALL_HIMBAECHEL_NGULTRA_DEVICES} CACHE STRING
PATTERN "*.bba" EXCLUDE) "Include support for these NG-Ultra devices (available: ${ALL_HIMBAECHEL_NGULTRA_DEVICES})")
message(STATUS "Enabled Himbaechel-NG-Ultra devices: ${HIMBAECHEL_NGULTRA_DEVICES}")
foreach (device ${HIMBAECHEL_NGULTRA_DEVICES})
if (NOT device IN_LIST ALL_HIMBAECHEL_NGULTRA_DEVICES)
message(FATAL_ERROR "Device ${device} is not a supported NG-Ultra device")
endif()
string(TOUPPER ${device} upcase_device)
add_bba_produce_command(
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/gen/arch_gen.py
--db ${HIMBAECHEL_PRJBEYOND_DB}
--device ${upcase_device}
--bba ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba.new
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
INPUTS
${CMAKE_CURRENT_SOURCE_DIR}/gen/arch_gen.py
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
)
add_bba_compile_command(
TARGET chipdb-himbaechel-ng-ultra
OUTPUT ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra/chipdb-${device}.bin
INPUT ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
MODE binary
)
endforeach()
install(
DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/ng-ultra
DESTINATION share/nextpnr/himbaechel/ng-ultra
)

View File

@ -1,37 +1,40 @@
message(STATUS "Configuring Xilinx uarch")
cmake_minimum_required(VERSION 3.5)
project(himbaechel-xilinx-chipdb NONE)
set(HIMBAECHEL_XILINX_DEVICES "" CACHE STRING
"Include support for these Xilinx devices via himbaechel")
set(HIMBAECHEL_PRJXRAY_DB "" CACHE STRING set(HIMBAECHEL_PRJXRAY_DB "" CACHE STRING
"Path to a project x-ray database") "Path to a project x-ray database")
message(STATUS "Enabled Himbaechel-Xilinx devices: ${HIMBAECHEL_XILINX_DEVICES}") if (NOT HIMBAECHEL_PRJXRAY_DB)
message(FATAL_ERROR "HIMBAECHEL_PRJXRAY_DB must be set to a prjxray database checkout")
endif()
add_custom_target(chipdb-himbaechel-xilinx)
set(chipdb_binaries) foreach (target ${family_targets})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx) add_dependencies(${target} chipdb-himbaechel-xilinx)
foreach (device ${HIMBAECHEL_XILINX_DEVICES})
if ("${HIMBAECHEL_PRJXRAY_DB}" STREQUAL "")
message(SEND_ERROR "HIMBAECHEL_PRJXRAY_DB must be set to a prjxray database checkout")
endif()
set(device_bba ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx/chipdb-${device}.bba)
set(device_bin ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx/chipdb-${device}.bin)
add_custom_command(
OUTPUT ${device_bin}
COMMAND pypy3 ${CMAKE_CURRENT_SOURCE_DIR}/gen/xilinx_gen.py --xray ${HIMBAECHEL_PRJXRAY_DB}/artix7 --device ${device} --bba ${device_bba}
COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${device_bba} ${device_bin}.new
# atomically update
COMMAND ${CMAKE_COMMAND} -E rename ${device_bin}.new ${device_bin}
DEPENDS
bbasm
${CMAKE_CURRENT_SOURCE_DIR}/gen/xilinx_gen.py
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
VERBATIM)
list(APPEND chipdb_binaries ${device_bin})
endforeach() endforeach()
add_custom_target(chipdb-himbaechel-xilinx ALL DEPENDS ${chipdb_binaries}) set(HIMBAECHEL_XILINX_DEVICES "" CACHE STRING
install(DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx/ DESTINATION share/nextpnr/himbaechel/xilinx "Include support for these Xilinx devices")
PATTERN "*.bba" EXCLUDE) message(STATUS "Enabled Himbaechel-Xilinx devices: ${HIMBAECHEL_XILINX_DEVICES}")
foreach (device ${HIMBAECHEL_XILINX_DEVICES})
add_bba_produce_command(
COMMAND /usr/bin/pypy3 ${CMAKE_CURRENT_SOURCE_DIR}/gen/xilinx_gen.py
--xray ${HIMBAECHEL_PRJXRAY_DB}/artix7
--device ${device}
--bba ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba.new
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
INPUTS
${CMAKE_CURRENT_SOURCE_DIR}/gen/xilinx_gen.py
${CMAKE_CURRENT_SOURCE_DIR}/constids.inc
)
add_bba_compile_command(
TARGET chipdb-himbaechel-xilinx
OUTPUT ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx/chipdb-${device}.bin
INPUT ${CMAKE_CURRENT_BINARY_DIR}/chipdb-${device}.bba
MODE binary
)
endforeach()
install(
DIRECTORY ${CMAKE_BINARY_DIR}/share/himbaechel/xilinx
DESTINATION share/nextpnr/himbaechel/xilinx
)