- changed wave format selection
git-svn-id: http://moon:8086/svn/vhdl/trunk@1557 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -11,7 +11,6 @@ SRCS += ../src/tb_cpu_embedded.vhd
|
|||||||
# Compile
|
# Compile
|
||||||
TARGET := cpu_embedded
|
TARGET := cpu_embedded
|
||||||
ENTITY := tb_cpu_embedded
|
ENTITY := tb_cpu_embedded
|
||||||
WITH_GHW := y
|
|
||||||
|
|
||||||
include $(VHDL_HOME)/make/ghdl.mk
|
include $(VHDL_HOME)/make/ghdl.mk
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ SRCS += ../src/tb_cpu_itest.vhd
|
|||||||
# Compile
|
# Compile
|
||||||
TARGET := cpu_itest
|
TARGET := cpu_itest
|
||||||
ENTITY := tb_cpu
|
ENTITY := tb_cpu
|
||||||
WITH_GHW := y
|
|
||||||
|
|
||||||
include $(VHDL_HOME)/make/ghdl.mk
|
include $(VHDL_HOME)/make/ghdl.mk
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ SRCS += ../src/tb_cpu_embedded.vhd
|
|||||||
# Compile
|
# Compile
|
||||||
TARGET := mul8x8
|
TARGET := mul8x8
|
||||||
ENTITY := tb_cpu_embedded
|
ENTITY := tb_cpu_embedded
|
||||||
WITH_GHW := y
|
|
||||||
|
|
||||||
include $(VHDL_HOME)/make/ghdl.mk
|
include $(VHDL_HOME)/make/ghdl.mk
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ SRCS += ../src/tb_cpu_itest.vhd
|
|||||||
# Compile
|
# Compile
|
||||||
TARGET := reti_issue
|
TARGET := reti_issue
|
||||||
ENTITY := tb_cpu
|
ENTITY := tb_cpu
|
||||||
WITH_GHW := y
|
|
||||||
|
|
||||||
include $(VHDL_HOME)/make/ghdl.mk
|
include $(VHDL_HOME)/make/ghdl.mk
|
||||||
|
|
||||||
|
|||||||
+15
-11
@@ -10,6 +10,7 @@ WORK_LIB ?= work
|
|||||||
LANG_STD ?= 93c
|
LANG_STD ?= 93c
|
||||||
IEEE_STD ?= standard
|
IEEE_STD ?= standard
|
||||||
RUN_TIME ?= 1000ns
|
RUN_TIME ?= 1000ns
|
||||||
|
WAVE_FORMAT ?= FST
|
||||||
|
|
||||||
# Build path
|
# Build path
|
||||||
BUILD_DIR ?= build/$(TARGET)
|
BUILD_DIR ?= build/$(TARGET)
|
||||||
@@ -40,20 +41,23 @@ SRCS := $(filter-out ,$(SRCS))
|
|||||||
GHDL := ghdl
|
GHDL := ghdl
|
||||||
GHDL_GCC := ghdl-gcc
|
GHDL_GCC := ghdl-gcc
|
||||||
|
|
||||||
# Output stuff
|
# Wave format selection
|
||||||
SIM_FILE-$(WITH_VCD) := $(BUILD_DIR)/$(TARGET).vcd
|
SIM_FILE-VCD := $(BUILD_DIR)/$(TARGET).vcd
|
||||||
SIM_FILE-$(WITH_FST) := $(BUILD_DIR)/$(TARGET).fst
|
GTK_OPTS-VCD := --vcd=$(SIM_FILE-VCD)
|
||||||
SIM_FILE-$(WITH_GHW) := $(BUILD_DIR)/$(TARGET).ghw
|
|
||||||
|
|
||||||
GTK_OPTS-$(WITH_VCD) := --vcd=$(SIM_FILE-y)
|
SIM_FILE-FST := $(BUILD_DIR)/$(TARGET).fst
|
||||||
GTK_OPTS-$(WITH_FST) := --fst=$(SIM_FILE-y)
|
GTK_OPTS-FST := --fst=$(SIM_FILE-FST)
|
||||||
GTK_OPTS-$(WITH_GHW) := --wave=$(SIM_FILE-y)
|
|
||||||
|
SIM_FILE-GHW := $(BUILD_DIR)/$(TARGET).ghw
|
||||||
|
GTK_OPTS-GHW := --wave=$(SIM_FILE-GHW)
|
||||||
|
|
||||||
|
SIM_FILE := $(SIM_FILE-$(WAVE_FORMAT))
|
||||||
|
GTK_OPTS := $(GTK_OPTS-$(WAVE_FORMAT))
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# Targets
|
# Targets
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
all: analyze
|
all: analyze
|
||||||
|
|
||||||
$(WORK_DIR):
|
$(WORK_DIR):
|
||||||
@@ -86,16 +90,16 @@ run: analyze
|
|||||||
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS)
|
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS)
|
||||||
|
|
||||||
run_wave: analyze
|
run_wave: analyze
|
||||||
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS) $(GTK_OPTS-y) >$(BUILD_DIR)/$(TARGET).log
|
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS) $(GTK_OPTS) >$(BUILD_DIR)/$(TARGET).log
|
||||||
|
|
||||||
synth: analyze
|
synth: analyze
|
||||||
$(GHDL) --synth $(GHDL_OPTS) $(ENTITY)
|
$(GHDL) --synth $(GHDL_OPTS) $(ENTITY)
|
||||||
|
|
||||||
wave: run_wave
|
wave: run_wave
|
||||||
exec gtkwave -f $(SIM_FILE-y) -a $(BUILD_DIR)/$(TARGET).gtkw &
|
exec gtkwave -f $(SIM_FILE) -a $(BUILD_DIR)/$(TARGET).gtkw &
|
||||||
|
|
||||||
result:
|
result:
|
||||||
exec gtkwave -f $(SIM_FILE-y) -a $(BUILD_DIR)/$(TARGET).gtkw &
|
exec gtkwave -f $(SIM_FILE) -a $(BUILD_DIR)/$(TARGET).gtkw &
|
||||||
|
|
||||||
tree: analyze
|
tree: analyze
|
||||||
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS) --no-run --disp-tree=inst
|
$(GHDL) -r $(GHDL_OPTS) $(ENTITY) $(RUN_OPTS) --no-run --disp-tree=inst
|
||||||
|
|||||||
Reference in New Issue
Block a user