From d9a1e124e8c5ffead4cef7fe49785a5150cece29 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Mon, 1 Jan 2024 14:36:38 +0800 Subject: [PATCH] =?UTF-8?q?>=20sim=20RTL=20ysyx=5F22040000=20=E6=9D=8E?= =?UTF-8?q?=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.1.69=20#1-NixOS=20SMP?= =?UTF-8?q?=20PREEMPT=5FDYNAMIC=20Wed=20Dec=2020=2016:00:29=20UTC=202023?= =?UTF-8?q?=20x86=5F64=20GNU/Linux=20=2014:36:38=20=20up=20=2023:15,=20=20?= =?UTF-8?q?2=20users,=20=20load=20average:=201.36,=201.54,=201.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/Makefile | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/npc/Makefile b/npc/Makefile index f012226..1f78dc1 100644 --- a/npc/Makefile +++ b/npc/Makefile @@ -10,15 +10,7 @@ SUBMAKE := $(OBJDIR)/Vexample.mk VERILATOR_FLAGS := --cc --exe LDFLAGS += $(shell sdl2-config --libs) -lSDL2_image -all: sim - -sim-bin: VERILATOR_FLAGS += --trace -sim-bin: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample git_trace - -sim: sim-bin - @echo "Running" $(OBJDIR)/Vexample "..." - @echo "================================" - @$(OBJDIR)/Vexample +all: sim-bin nvboard-bin $(OBJDIR)/Vexample: $(SUBMAKE) $(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample @@ -29,17 +21,8 @@ $(SUBMAKE): $(VSRC) $(CPPSRCS) $(OBJDIR) $(OBJDIR): mkdir -p $(OBJDIR) -ifneq (,$(wildcard ../Makefile)) -include ../Makefile -else -define git_commit # not in ICS subfolder, no tracing -endef -endif - -git_trace: - $(call git_commit, "sim RTL") - -.PHONY: clean nvboard compile_commands.json +sim-bin: VERILATOR_FLAGS += --trace +sim-bin: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample SRC_AUTO_BIND := $(abspath $(PREFIX)/auto_bind.cpp) NXDC_FILES := $(abspath constr/top.nxdc) @@ -54,9 +37,30 @@ nvboard-bin: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) nvboard-bin: $(VSRC) $(CPPSRCS) $(SUBMAKE) $(SRC_AUTO_BIND) $(OBJDIR)/Vexample -nvboard: nvboard-bin + +ifneq (,$(wildcard ../Makefile)) +include ../Makefile +else +define git_commit # not in ICS subfolder, no tracing +endef +endif + +git_trace_sim: + $(call git_commit, "sim RTL") + +git_trace_nvboard: + $(call git_commit, "nvboard") + +.PHONY: clean nvboard sim compile_commands.json + +nvboard: nvboard-bin git_trace_nvboard @NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample +sim: sim-bin git_trace_sim + @echo "Running" $(OBJDIR)/Vexample "..." + @echo "================================" + @$(OBJDIR)/Vexample + compile_commands.json: clean bear --output nvboard.json -- $(MAKE) nvboard-bin