-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefrag
52 lines (39 loc) · 1.42 KB
/
Makefrag
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# check RISCV environment variable
ifndef RISCV
$(error Please set environment variable RISCV. Please take a look at README)
endif
MODEL ?= TestHarness
PROJECT ?= motion
CFG_PROJECT ?= freechips.rocketchip.system
CONFIG ?= DefaultConfig
# TODO: For now must match rocketchip.Generator
long_name = $(CFG_PROJECT).$(CONFIG)
VLSI_MEM_GEN ?= $(base_dir)/scripts/vlsi_mem_gen
CXX ?= g++
CXXFLAGS := -O1
JVM_MEMORY ?= 2G
SBT := sbt
SHELL := /bin/bash
ROCKET_CLASSES ?= "$(base_dir)/target/scala-2.12/classes:$(base_dir)/chisel3/target/scala-2.12/*"
FIRRTL ?= cd $(base_dir) && $(SBT) "project ofdmRocket" "runMain firrtl.Driver
src_path := rocket/src/main/scala
resources := $(base_dir)/rocket/src/main/resources/ofdm/
csrc := $(resources)/csrc
vsrc := $(resources)/vsrc
chisel_srcs := $(foreach submodule,$(ROCKETCHIP_ADDONS),$(shell find $(base_dir)/$(submodule)/$(src_path) -name "*.scala"))
disasm := 2>
which_disasm := $(shell which spike-dasm 2> /dev/null)
ifneq ($(which_disasm),)
disasm := 3>&1 1>&2 2>&3 | $(which_disasm) $(DISASM_EXTENSION) >
endif
timeout_cycles = 100000000
bootrom_img = $(base_dir)/bootrom/bootrom.img
#--------------------------------------------------------------------
# Build Tests
#--------------------------------------------------------------------
%.hex:
$(MAKE) -C $(dir $@) $(notdir $@)
%.riscv.hex: %.riscv
$(MAKE) -C $(dir $@) $(notdir $@)
clean-run-output:
rm -f $(output_dir)/{*.out,*.run,*.vpd}