Pass EXTRA_OPTS to GHDL

This commit is contained in:
2022-09-10 08:25:14 +02:00
parent cac6fc9540
commit 1f52aee5d9
2 changed files with 15 additions and 8 deletions
+8 -7
View File
@@ -11,13 +11,14 @@ LANG_STD ?= 93c
IEEE_STD ?= standard
RUN_TIME ?= 1000ns
WAVE_FORMAT ?= fst
EXTRA_OPTS ?=
# Build path
BUILD_DIR ?= build/$(TARGET)
WORK_DIR ?= $(BUILD_DIR)/$(WORK_LIB)
# Can be pre-initialized by user
RUN_OPTS += --stop-time=$(RUN_TIME)
RUN_OPTS += --stop-time=$(RUN_TIME) $(EXTRA_OPTS)
GHDL_OPTS += --work=$(WORK_LIB) --workdir=$(WORK_DIR) --std=$(LANG_STD) --ieee=$(IEEE_STD)
# -------------------------------------------------
@@ -93,12 +94,6 @@ run_wave: analyze
synth: analyze
$(GHDL) --synth $(GHDL_OPTS) $(ENTITY)
wave: run_wave
exec gtkwave -f $(SIM_FILE) -a $(TARGET).gtkw &
result:
exec gtkwave -f $(SIM_FILE) -a $(TARGET).gtkw &
tree: analyze
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS) --no-run --disp-tree=inst
@@ -106,6 +101,12 @@ genwopt: analyze
rm -rf $(TARGET).wopt.templ
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) --stop-time=0ps --write-wave-opt=$(TARGET).wopt.templ --wave=$(BUILD_DIR)/$(TARGET).ghw
wave: run_wave
exec gtkwave -f $(SIM_FILE) -a $(TARGET).gtkw &
result:
exec gtkwave -f $(SIM_FILE) -a $(TARGET).gtkw &
.PHONY: list
INSTR = $(foreach number,$(SRCS),echo $(number);)