> 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:56:48  up  22:35,  2 users,  load average: 0.69, 0.78, 0.80
This commit is contained in:
tracer-ysyx 2024-01-01 13:56:48 +08:00 committed by xinyangli
parent fc920227b2
commit 23766bd467

View file

@ -1,9 +1,10 @@
NVBOARD_HOME ?= $(abspath ../nvboard) NVBOARD_HOME ?= $(abspath ../nvboard)
PREFIX ?= build PREFIX ?= build
OBJDIR := $(PREFIX)/obj OBJDIR := $(PREFIX)/obj
TARGET := $(OBJDIR)/Vexample
VSRC := $(wildcard vsrc/*.v) VSRC := $(wildcard vsrc/*.v)
SRC_AUTO_BIND := $(abspath $(PREFIX)/auto_bind.cpp) SRC_AUTO_BIND := $(PREFIX)/auto_bind.cpp
CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc/*.cpp)) CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc/*.cpp))
NXDC_FILES = $(abspath constr/top.nxdc) NXDC_FILES = $(abspath constr/top.nxdc)
SUBMAKE := $(OBJDIR)/Vexample.mk SUBMAKE := $(OBJDIR)/Vexample.mk
@ -21,6 +22,9 @@ sim: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample git_trace
$(OBJDIR)/Vexample: $(SUBMAKE) $(OBJDIR)/Vexample: $(SUBMAKE)
$(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample $(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample
$(PREFIX)/nvobj/Vexample: $(SUBMAKE)
$(MAKE) -C $(OBJDIR) -f $(notdir $(SUBMAKE)) Vexample
$(SUBMAKE): $(VSRC) $(CPPSRCS) $(OBJDIR) $(SUBMAKE): $(VSRC) $(CPPSRCS) $(OBJDIR)
verilator $(VERILATOR_FLAGS) $(addprefix -CFLAGS , $(CXXFLAGS)) $(addprefix -LDFLAGS , $(LDFLAGS)) --Mdir $(abspath $(OBJDIR)) $(VSRC) $(CPPSRCS) verilator $(VERILATOR_FLAGS) $(addprefix -CFLAGS , $(CXXFLAGS)) $(addprefix -LDFLAGS , $(LDFLAGS)) --Mdir $(abspath $(OBJDIR)) $(VSRC) $(CPPSRCS)
@ -44,11 +48,11 @@ git_trace:
.PHONY: clean nvboard .PHONY: clean nvboard
nvboard: OBJDIR := $(PREFIX)/nvobj
# TODO: fix this awkward way to find nvboard.a # TODO: fix this awkward way to find nvboard.a
nvboard: CPPSRCS := $(addprefix $(PWD)/,$(wildcard csrc_nvboard/*.cpp)) $(SRC_AUTO_BIND) $(NVBOARD_HOME)/build/nvboard.a 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: CXXFLAGS += -I$(NVBOARD_HOME)/include $(shell sdl2-config --cflags) -g
nvboard: $(VSRC) $(CPPSRCS) $(OBJDIR)/Vexample nvboard: OBJDIR := $(PREFIX)/nvobj
nvboard: $(VSRC) $(CPPSRCS) $(PREFIX)/nvobj/Vexample $(SUBMAKE) $(SRC_AUTO_BIND)
@NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample @NVBOARD_HOME=$(NVBOARD_HOME) $(OBJDIR)/Vexample
clean: clean: