rename makefiles | move verilog rule to common.mk
This commit is contained in:
@@ -11,7 +11,7 @@ sim_dir=$(abspath .)
|
||||
#########################################################################################
|
||||
# include shared variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/Makefrag-Variables
|
||||
include $(base_dir)/variables.mk
|
||||
|
||||
#########################################################################################
|
||||
# name of simulator (used to generate *.f arguments file)
|
||||
@@ -32,8 +32,8 @@ debug: $(sim_debug)
|
||||
#########################################################################################
|
||||
# import other necessary rules and variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/Makefrag
|
||||
include $(sim_dir)/Makefrag-Verilator
|
||||
include $(base_dir)/common.mk
|
||||
include $(sim_dir)/verilator.mk
|
||||
|
||||
#########################################################################################
|
||||
# verilator build paths and file names
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#########################################################################################
|
||||
# verilator installation makefrag
|
||||
#########################################################################################
|
||||
|
||||
#########################################################################################
|
||||
# verilator version, binary, and path
|
||||
#########################################################################################
|
||||
VERILATOR_VERSION=4.008
|
||||
VERILATOR_SRCDIR=verilator/src/verilator-$(VERILATOR_VERSION)
|
||||
INSTALLED_VERILATOR=$(abspath verilator/install/bin/verilator)
|
||||
|
||||
#########################################################################################
|
||||
# build and install our own verilator to work around versioning issues
|
||||
#########################################################################################
|
||||
$(INSTALLED_VERILATOR): $(VERILATOR_SRCDIR)/bin/verilator
|
||||
$(MAKE) -C $(VERILATOR_SRCDIR) installbin installdata
|
||||
touch $@
|
||||
|
||||
$(VERILATOR_SRCDIR)/bin/verilator: $(VERILATOR_SRCDIR)/Makefile
|
||||
$(MAKE) -C $(VERILATOR_SRCDIR) verilator_bin
|
||||
touch $@
|
||||
|
||||
$(VERILATOR_SRCDIR)/Makefile: $(VERILATOR_SRCDIR)/configure
|
||||
mkdir -p $(dir $@)
|
||||
cd $(dir $@) && ./configure --prefix=$(abspath verilator/install)
|
||||
|
||||
$(VERILATOR_SRCDIR)/configure: verilator/verilator-$(VERILATOR_VERSION).tar.gz
|
||||
rm -rf $(dir $@)
|
||||
mkdir -p $(dir $@)
|
||||
cat $^ | tar -xz --strip-components=1 -C $(dir $@)
|
||||
touch $@
|
||||
|
||||
verilator/verilator-$(VERILATOR_VERSION).tar.gz:
|
||||
mkdir -p $(dir $@)
|
||||
wget http://www.veripool.org/ftp/verilator-$(VERILATOR_VERSION).tgz -O $@
|
||||
|
||||
#########################################################################################
|
||||
# verilator binary and flags
|
||||
#########################################################################################
|
||||
VERILATOR := $(INSTALLED_VERILATOR) --cc --exe
|
||||
CXXFLAGS := $(CXXFLAGS) -O1 -std=c++11 -I$(RISCV)/include -D__STDC_FORMAT_MACROS
|
||||
VERILATOR_FLAGS := --top-module $(MODEL) \
|
||||
+define+PRINTF_COND=\$$c\(\"verbose\",\"\&\&\"\,\"done_reset\"\) \
|
||||
+define+STOP_COND=\$$c\(\"done_reset\"\) --assert \
|
||||
--output-split 20000 \
|
||||
-Wno-STMTDLY --x-assign unique \
|
||||
-O3 -CFLAGS "$(CXXFLAGS) -DTEST_HARNESS=V$(MODEL) -DVERILATOR"
|
||||
@@ -11,7 +11,7 @@ sim_dir=$(abspath .)
|
||||
#########################################################################################
|
||||
# include shared variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/Makefrag-Variables
|
||||
include $(base_dir)/variables.mk
|
||||
|
||||
#########################################################################################
|
||||
# name of simulator (used to generate *.f arguments file)
|
||||
@@ -32,7 +32,7 @@ debug: $(sim_debug)
|
||||
#########################################################################################
|
||||
# import other necessary rules and variables
|
||||
#########################################################################################
|
||||
include $(base_dir)/Makefrag
|
||||
include $(base_dir)/common.mk
|
||||
|
||||
#########################################################################################
|
||||
# vcs binary and arguments
|
||||
@@ -71,12 +71,6 @@ VCS_NONCC_OPTS = \
|
||||
|
||||
VCS_OPTS = -notice -line $(VCS_CC_OPTS) $(VCS_NONCC_OPTS)
|
||||
|
||||
#########################################################################################
|
||||
# helper rule to just make verilog files
|
||||
#########################################################################################
|
||||
.PHONY: verilog
|
||||
verilog: $(sim_vsrcs)
|
||||
|
||||
#########################################################################################
|
||||
# vcs simulator rules
|
||||
#########################################################################################
|
||||
|
||||
Reference in New Issue
Block a user