mirror of
https://github.com/verilator/verilator.git
synced 2025-01-03 21:27:35 +00:00
Fix example makefiles, 1648.
This commit is contained in:
parent
cafb148a62
commit
0465b6a3b1
@ -52,6 +52,9 @@ VERILATOR_FLAGS += --coverage
|
|||||||
# Add this trace to get a backtrace in gdb
|
# Add this trace to get a backtrace in gdb
|
||||||
#VERILATOR_FLAGS += --gdbbt
|
#VERILATOR_FLAGS += --gdbbt
|
||||||
|
|
||||||
|
# Input files for Verilator
|
||||||
|
VERILATOR_INPUT = -f input.vc top.v sim_main.cpp
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
default: run
|
default: run
|
||||||
|
|
||||||
@ -61,7 +64,7 @@ run:
|
|||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- VERILATE ----------------"
|
@echo "-- VERILATE ----------------"
|
||||||
$(VERILATOR) $(VERILATOR_FLAGS) -f input.vc top.v sim_main.cpp
|
$(VERILATOR) $(VERILATOR_FLAGS) $(VERILATOR_INPUT)
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- COMPILE -----------------"
|
@echo "-- COMPILE -----------------"
|
||||||
@ -72,11 +75,13 @@ run:
|
|||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- RUN ---------------------"
|
@echo "-- RUN ---------------------"
|
||||||
|
@rm -rf logs
|
||||||
@mkdir -p logs
|
@mkdir -p logs
|
||||||
obj_dir/Vtop +trace
|
obj_dir/Vtop +trace
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- COVERAGE ----------------"
|
@echo "-- COVERAGE ----------------"
|
||||||
|
@rm -rf logs/annotated
|
||||||
$(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
|
$(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
|
@ -52,6 +52,9 @@ VERILATOR_FLAGS += --coverage
|
|||||||
# Add this trace to get a backtrace in gdb
|
# Add this trace to get a backtrace in gdb
|
||||||
#VERILATOR_FLAGS += --gdbbt
|
#VERILATOR_FLAGS += --gdbbt
|
||||||
|
|
||||||
|
# Input files for Verilator
|
||||||
|
VERILATOR_INPUT = -f input.vc top.v sc_main.cpp
|
||||||
|
|
||||||
# Check if SC exists via a verilator call (empty if not)
|
# Check if SC exists via a verilator call (empty if not)
|
||||||
SYSTEMC_EXISTS := $(shell $(VERILATOR) --getenv SYSTEMC_INCLUDE)
|
SYSTEMC_EXISTS := $(shell $(VERILATOR) --getenv SYSTEMC_INCLUDE)
|
||||||
|
|
||||||
@ -69,10 +72,10 @@ run:
|
|||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- VERILATE ----------------"
|
@echo "-- VERILATE ----------------"
|
||||||
$(VERILATOR) $(VERILATOR_FLAGS) -f input.vc top.v sc_main.cpp
|
$(VERILATOR) $(VERILATOR_FLAGS) $(VERILATOR_INPUT)
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- COMPILE ----------------="
|
@echo "-- COMPILE -----------------"
|
||||||
# To compile, we can either just do what Verilator asks,
|
# To compile, we can either just do what Verilator asks,
|
||||||
# or call a submakefile where we can override the rules ourselves
|
# or call a submakefile where we can override the rules ourselves
|
||||||
# $(MAKE) -j 4 -C obj_dir -f Vtop.mk
|
# $(MAKE) -j 4 -C obj_dir -f Vtop.mk
|
||||||
@ -80,11 +83,13 @@ run:
|
|||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- RUN ---------------------"
|
@echo "-- RUN ---------------------"
|
||||||
|
@rm -rf logs
|
||||||
@mkdir -p logs
|
@mkdir -p logs
|
||||||
obj_dir/Vtop +trace
|
obj_dir/Vtop +trace
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
@echo "-- COVERAGE ----------------"
|
@echo "-- COVERAGE ----------------"
|
||||||
|
@rm -rf logs/annotated
|
||||||
$(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
|
$(VERILATOR_COVERAGE) --annotate logs/annotated logs/coverage.dat
|
||||||
|
|
||||||
@echo
|
@echo
|
||||||
@ -92,6 +97,7 @@ run:
|
|||||||
@echo "To see waveforms, open vlt_dump.vcd in a waveform viewer"
|
@echo "To see waveforms, open vlt_dump.vcd in a waveform viewer"
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Other targets
|
# Other targets
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user