2014-08-31 20:26:55 -07: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)
|
2014-09-08 00:21:57 -07:00
|
|
|
mem_gen = $(base_dir)/vsim/vlsi_mem_gen
|
2014-08-31 20:26:55 -07:00
|
|
|
sim_dir = .
|
|
|
|
output_dir = $(sim_dir)/output
|
|
|
|
|
2014-09-17 10:48:56 -07:00
|
|
|
BACKEND ?= rocketchip.RocketChipBackend
|
|
|
|
CONFIG ?= DefaultVLSIConfig
|
2015-07-17 12:02:02 -07:00
|
|
|
TB ?= rocketTestHarness
|
2014-09-08 00:21:57 -07:00
|
|
|
|
2014-09-03 17:28:45 -07:00
|
|
|
include $(base_dir)/Makefrag
|
2014-09-04 09:49:57 -07:00
|
|
|
include $(sim_dir)/Makefrag
|
2015-11-12 00:41:55 -08:00
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
2015-07-28 00:23:31 -07:00
|
|
|
-include $(generated_dir)/$(MODEL).$(CONFIG).d
|
2015-11-12 00:41:55 -08:00
|
|
|
endif
|
2015-07-28 00:23:31 -07:00
|
|
|
include $(base_dir)/vsim/Makefrag-verilog
|
2014-08-31 20:26:55 -07:00
|
|
|
|
|
|
|
all: $(simv)
|
2014-09-11 22:11:58 -07:00
|
|
|
debug: $(simv_debug)
|
2014-08-31 20:26:55 -07:00
|
|
|
|
|
|
|
clean:
|
2014-09-04 09:49:57 -07:00
|
|
|
rm -rf $(junk) simv* csrc *.key DVE* *.h *.a *.daidir $(generated_dir)
|
2014-09-11 22:11:58 -07:00
|
|
|
|
|
|
|
.PHONY: default all debug clean
|