2014-09-01 05:26:55 +02:00
|
|
|
#=======================================================================
|
|
|
|
# Makefile for Verilog simulation w/ VCS
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# Yunsup Lee (yunsup@cs.berkeley.edu)
|
|
|
|
#
|
|
|
|
# This makefile will build a rtl simulator and run various tests to
|
|
|
|
# verify proper functionality.
|
|
|
|
#
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
base_dir = $(abspath ..)
|
|
|
|
generated_dir = $(abspath ./generated-src)
|
2017-08-01 06:12:45 +02:00
|
|
|
VLSI_MEM_GEN ?= $(base_dir)/scripts/vlsi_mem_gen
|
2016-08-24 02:05:09 +02:00
|
|
|
mem_gen = $(VLSI_MEM_GEN)
|
2014-09-01 05:26:55 +02:00
|
|
|
sim_dir = .
|
|
|
|
output_dir = $(sim_dir)/output
|
|
|
|
|
2016-03-06 02:19:53 +01:00
|
|
|
BACKEND ?= v
|
2016-08-16 07:03:03 +02:00
|
|
|
TB ?= TestDriver
|
2014-09-08 09:21:57 +02:00
|
|
|
|
2014-09-04 02:28:45 +02:00
|
|
|
include $(base_dir)/Makefrag
|
2014-09-04 18:49:57 +02:00
|
|
|
include $(sim_dir)/Makefrag
|
2016-08-25 23:42:04 +02:00
|
|
|
ifneq ($(filter run% %.run %.out %.vpd %.vcd,$(MAKECMDGOALS)),)
|
2016-09-19 22:23:17 +02:00
|
|
|
-include $(generated_dir)/$(long_name).d
|
2015-11-12 09:41:55 +01:00
|
|
|
endif
|
2015-07-28 09:23:31 +02:00
|
|
|
include $(base_dir)/vsim/Makefrag-verilog
|
2014-09-01 05:26:55 +02:00
|
|
|
|
|
|
|
all: $(simv)
|
2014-09-12 07:11:58 +02:00
|
|
|
debug: $(simv_debug)
|
2014-09-01 05:26:55 +02:00
|
|
|
|
|
|
|
clean:
|
2014-09-04 18:49:57 +02:00
|
|
|
rm -rf $(junk) simv* csrc *.key DVE* *.h *.a *.daidir $(generated_dir)
|
2014-09-12 07:11:58 +02:00
|
|
|
|
|
|
|
.PHONY: default all debug clean
|