From 2daad1db298bbb7aba4c5627729bc1ff1b0e5c56 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sat, 11 Jan 2025 22:34:59 +0000 Subject: [PATCH] himbaechel: allow subsetting uarches. E.g. selecting only Gowin instead of the default shrinks the resulting binary by ~30%. --- himbaechel/family.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/himbaechel/family.cmake b/himbaechel/family.cmake index 5061124d..80253f89 100644 --- a/himbaechel/family.cmake +++ b/himbaechel/family.cmake @@ -1,5 +1,15 @@ set(HIMBAECHEL_UARCHES "example;gowin;xilinx;ng-ultra") -foreach(uarch ${HIMBAECHEL_UARCHES}) + +set(HIMBAECHEL_UARCH "${HIMBAECHEL_UARCHES}" CACHE STRING "Microarchitectures for nextpnr-himbaechel build") +set_property(CACHE HIMBAECHEL_UARCH PROPERTY STRINGS ${HIMBAECHEL_UARCHES}) + +foreach(item ${HIMBAECHEL_UARCH}) + if (NOT item IN_LIST HIMBAECHEL_UARCHES) + message(FATAL_ERROR "Microarchitecture '${item}' not in list of supported architectures") + endif() +endforeach() + +foreach(uarch ${HIMBAECHEL_UARCH}) add_subdirectory(${family}/uarch/${uarch}) aux_source_directory(${family}/uarch/${uarch} HM_UARCH_FILES) foreach(target ${family_targets})