nextpnr/himbaechel/uarch/xilinx/CMakeLists.txt
Catherine dcfb7d8c33 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).
2025-01-21 17:13:03 +00:00

41 lines
1.4 KiB
CMake

set(HIMBAECHEL_PRJXRAY_DB "" CACHE STRING
"Path to a project x-ray database")
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)
foreach (target ${family_targets})
add_dependencies(${target} chipdb-himbaechel-xilinx)
endforeach()
set(HIMBAECHEL_XILINX_DEVICES "" CACHE STRING
"Include support for these Xilinx devices")
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
)