From a209df39d200e7f7e7f9f06f9389a683540429b4 Mon Sep 17 00:00:00 2001 From: fengkehan Date: Tue, 4 Nov 2025 14:33:43 +0800 Subject: [PATCH] FPGA: Fix the makefile to adapt to the fpgadifftop --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ad287646..389c36fe 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,12 @@ TOP = TopMain SIM_TOP = SimTop +FPGA_DIFF_TOP = FpgaDiffTop FPGATOP = Top -REAL_TOP = $(if $(strip $(subst sim,,$(BOARD))),$(FPGATOP),$(SIM_TOP)) +# REAL_TOP selection: +# - if BOARD is exactly "fpgadiff" -> use FPGA_DIFF_TOP +# - else if BOARD starts with "sim" -> use SIM_TOP +# - otherwise use FPGATOP +REAL_TOP = $(if $(filter fpgadiff,$(BOARD)),$(FPGA_DIFF_TOP),$(if $(filter sim,$(BOARD)),$(SIM_TOP),$(FPGATOP))) BUILD_DIR = $(abspath ./build)