summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-09-29 03:35:56 -0600
committerAlejandro Soto <alejandro@34project.org>2023-09-29 03:35:56 -0600
commit78c46ca681c9a775cc68c9c58a5d5c70821ca0d7 (patch)
treef58626d2196bac82f616d6bcd38114eae213a8f8 /Makefile
parent205272a130e8def711065c65a0a32815cb45a693 (diff)
tb: enable sim performance flags ("faster is better")
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 53e06e5..0423c5e 100644
--- a/Makefile
+++ b/Makefile
@@ -14,9 +14,18 @@ CROSS_OBJCOPY := $(CROSS_COMPILE)objcopy
CROSS_CFLAGS := -O3 -Wall -Wextra -Werror
CROSS_LDFLAGS :=
+ifdef FASTER_IS_BETTER
+ DISABLE_COV := 1
+ DISABLE_RAND := 1
+ DISABLE_TRACE := 1
+endif
+
+X_MODE := $(if $(DISABLE_RAND),fast,unique)
+
VFLAGS ?= \
- --x-assign unique --x-initial unique \
- --threads $(shell nproc) \
+ --x-assign $(X_MODE) --x-initial $(X_MODE) \
+ $(if $(DISABLE_THREADS),,--threads $(shell nproc)) \
+ $(if $(DISABLE_TRACE),,--trace) \
$(if $(DISABLE_COV),,--coverage)
RTL_FILES = $(shell find $(RTL_DIR)/ ! -path '$(RTL_DIR)/top/*' -type f -name '*.sv')
@@ -96,6 +105,6 @@ $(OBJ_DIR)/%.mk: \
mkdir -p $(dir $@)
$(VERILATOR) \
- -O3 --cc --exe --trace -y $(RTL_DIR) --Mdir $(dir $@) \
+ -O3 --cc --exe -y $(RTL_DIR) --Mdir $(dir $@) \
--top $(word 1,$(subst /, ,$*)) $(patsubst tb/%,../tb/%,$^) \
$(VFLAGS)