> sim RTL
ysyx_22040000 李心杨 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux 13:42:14 up 22:21, 2 users, load average: 1.25, 0.88, 0.85
This commit is contained in:
parent
e3d600fc21
commit
419fbdb941
1 changed files with 11 additions and 15 deletions
26
npc/Makefile
26
npc/Makefile
|
@ -5,16 +5,15 @@ OBJDIR := $(PREFIX)/obj
|
|||
VSRC := $(wildcard vsrc/*.v)
|
||||
SRC_AUTO_BIND := $(abspath $(PREFIX)/auto_bind.cpp)
|
||||
CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc/*.cpp))
|
||||
# TODO: fix this ugly way to find nvboard.a
|
||||
# TODO: fix this awkward way to find nvboard.a
|
||||
CPPSRCS += $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a
|
||||
NXDC_FILES = $(abspath constr/top.nxdc)
|
||||
SUBMAKE := $(OBJDIR)/Vexample.mk
|
||||
|
||||
VERILATOR_FLAGS := --cc --exe
|
||||
CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g
|
||||
LDFLAGS += $(shell sdl2-config --libs) -lSDL2_image
|
||||
|
||||
all: sim nvboard
|
||||
all: sim
|
||||
|
||||
sim: VERILATOR_FLAGS += --trace
|
||||
sim: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample git_trace
|
||||
|
@ -22,12 +21,6 @@ sim: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample git_trace
|
|||
@echo "================================"
|
||||
@$(OBJDIR)/Vexample
|
||||
|
||||
nvboard: OBJDIR := $(PREFIX)/nvobj
|
||||
nvboard: CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a
|
||||
nvboard: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample
|
||||
@NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample
|
||||
|
||||
|
||||
$(OBJDIR)/Vexample: $(SUBMAKE)
|
||||
$(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample
|
||||
|
||||
|
@ -40,13 +33,10 @@ $(OBJDIR):
|
|||
$(SRC_AUTO_BIND): $(NXDC_FILES) $(OBJDIR)
|
||||
NVBOARD_HOME=$(NVBOARD_HOME) python3 $(NVBOARD_HOME)/scripts/auto_pin_bind.py $< $@
|
||||
|
||||
|
||||
ifneq (,$(wildcard ../Makefile))
|
||||
include ../Makefile
|
||||
endif
|
||||
|
||||
ifeq (,$(wildcard ../Makefile))
|
||||
define git_commit
|
||||
else
|
||||
define git_commit # not in ICS subfolder, no tracing
|
||||
endef
|
||||
endif
|
||||
|
||||
|
@ -54,7 +44,13 @@ git_trace:
|
|||
$(call git_commit, "sim RTL")
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
.PHONY: clean nvboard
|
||||
|
||||
nvboard: OBJDIR := $(PREFIX)/nvobj
|
||||
nvboard: CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a
|
||||
nvboard: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g
|
||||
nvboard: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample
|
||||
@NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample
|
||||
|
||||
clean:
|
||||
$(RM) -r $(PREFIX)
|
||||
|
|
Loading…
Reference in a new issue