-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.99 KB
/
Makefile
File metadata and controls
62 lines (48 loc) · 1.99 KB
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
53
54
55
56
57
58
59
60
61
62
MAKEFLAGS += --silent
# Define SBT variable
SBT = sbt
# Add phony targets
.PHONY: clean docs update verilog synth sta test
# Default target
default: verilog
docs:
@echo Generating docs
mkdir -p $(shell pwd)/out/doc
cd doc/user-guide && pdflatex -output-directory=$(shell pwd)/out/doc uart.tex | tee -a $(shell pwd)/out/doc/doc.rpt
doc_frags:
@echo Generating doc fragments
@$(SBT) "runMain tech.rocksavage.Main docs --module tech.rocksavage.chiselware.uart.hw.Uart --config-class tech.rocksavage.chiselware.uart.UartConfig --techlib synth/stdcells.lib --clock-period 5.0"
update:
@echo Updating...
sbt clean update
# Start with a fresh directory
clean:
@echo Cleaning...
rm -rf generated target *anno.json ./*.rpt doc/*.rpt syn/*.rpt syn.log out test_run_dir target
rm -rf project/project project/target
# filter all files with bad extensions
find . -type f -name "*.aux" -delete
find . -type f -name "*.toc" -delete
find . -type f -name "*.out" -delete
find . -type f -name "*.log" -delete
find . -type f -name "*.fdb_latexmk" -delete
find . -type f -name "*.fls" -delete
find . -type f -name "*.synctex.gz" -delete
find . -type f -name "*.pdf" -delete
# Generate verilog from the Chisel code
verilog:
@echo Generating Verilog...
@$(SBT) "runMain tech.rocksavage.Main verilog --mode write --module tech.rocksavage.chiselware.uart.hw.Uart --config-class tech.rocksavage.chiselware.uart.UartConfig"
# Run the tests
test:
@echo Running tests...
@$(SBT) -DuseVerilator="true" test
cov:
@$(SBT) coverageOn test coverageReport
# Synthesize the design
synth:
@echo Synthesizing...
@$(SBT) "runMain tech.rocksavage.Main synth --module tech.rocksavage.chiselware.uart.hw.Uart --config-class tech.rocksavage.chiselware.uart.UartConfig --techlib synth/stdcells.lib"
sta:
@echo Running Timing Analysis...
@$(SBT) "runMain tech.rocksavage.Main sta --module tech.rocksavage.chiselware.uart.hw.Uart --config-class tech.rocksavage.chiselware.uart.UartConfig --techlib synth/stdcells.lib --clock-period 5.0"