-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 872 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 872 Bytes
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
V_FILE_GEN = build/ysyxSoCTop.sv
V_FILE_FINAL = build/ysyxSoCFull.v
SCALA_FILES = $(shell find src/ -name "*.scala")
# Firtool version
FIRTOOL_VERSION = 1.105.0
FIRTOOL_PATCH_DIR = $(shell pwd)/patch/firtool
$(V_FILE_FINAL): $(SCALA_FILES)
# Replace firtool with a newer version
# TODO: This can be removed after chisel publishes a new version
@./patch/update-firtool.sh $(FIRTOOL_VERSION) $(FIRTOOL_PATCH_DIR)
CHISEL_FIRTOOL_PATH=$(FIRTOOL_PATCH_DIR)/firtool-$(FIRTOOL_VERSION)/bin \
mill -i ysyxsoc.runMain ysyx.Elaborate --target-dir $(@D)
mv $(V_FILE_GEN) $@
sed -i -e 's/_\(aw\|ar\|w\|r\|b\)_\(\|bits_\)/_\1/g' $@
sed -i '/firrtl_black_box_resource_files.f/, $$d' $@
verilog: $(V_FILE_FINAL)
clean:
-rm -rf build/
dev-init:
git submodule update --init --recursive
cd rocket-chip && git apply ../patch/rocket-chip.patch
.PHONY: verilog clean dev-init