1
0
rocket-chip/Makefrag

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-09-11 02:38:21 -07:00
# check RISCV environment variable
ifndef RISCV
$(error Please set environment variable RISCV. Please take a look at README)
endif
2012-10-18 17:51:41 -07:00
MODEL := Top
PROJECT := rocketchip
2012-10-01 19:30:11 -07:00
CXX := g++
2014-01-31 12:25:19 -08:00
CXXFLAGS := -O1
2012-10-01 19:30:11 -07:00
2012-11-20 05:39:48 -08:00
SBT := java -Xmx2048M -Xss8M -XX:MaxPermSize=128M -jar sbt-launch.jar
SHELL := /bin/bash
2012-10-01 19:30:11 -07:00
CHISEL_ARGS := $(MODEL) --W0W --backend $(BACKEND) --configInstance $(PROJECT).$(CONFIG) --compileInitializationUnoptimized --targetDir $(generated_dir)
2014-08-31 20:26:55 -07:00
src_path = src/main/scala
default_submodules = . junctions uncore hardfloat rocket zscale
chisel_srcs = $(addprefix $(base_dir)/,$(addsuffix /$(src_path)/*.scala,$(default_submodules)))
2014-08-31 20:26:55 -07:00
disasm := 2>
which_disasm := $(shell which spike-dasm)
2014-08-31 20:26:55 -07:00
ifneq ($(which_disasm),)
disasm := 3>&1 1>&2 2>&3 | $(which_disasm) $(DISASM_EXTENSION) >
2014-08-31 20:26:55 -07:00
endif
timeout_cycles = 100000000
#--------------------------------------------------------------------
# DRAMSim2
#--------------------------------------------------------------------
2013-05-01 02:58:53 -07:00
DRAMSIM_OBJS := $(patsubst %.cpp,%.o,$(wildcard $(base_dir)/dramsim2/*.cpp))
$(DRAMSIM_OBJS): %.o: %.cpp
$(CXX) $(CXXFLAGS) -DNO_STORAGE -DNO_OUTPUT -Dmain=nomain -c -o $@ $<
2013-05-01 02:58:53 -07:00
$(sim_dir)/libdramsim.a: $(DRAMSIM_OBJS)
ar rcs $@ $^
2014-08-31 20:26:55 -07:00
#--------------------------------------------------------------------
# Build Tests
#--------------------------------------------------------------------
%.hex:
$(MAKE) -C $(dir $@) $(notdir $@)
%.riscv.hex: %
$(MAKE) -C $(dir $@) $(notdir $@)