-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (47 loc) · 1.38 KB
/
Makefile
File metadata and controls
58 lines (47 loc) · 1.38 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
.PHONY: all doc vivado lint-verilator clean test docker-build docker-run-it
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR := $(dir $(MKFILE_PATH))
INC_DIR := ${MKFILE_DIR}/rtl/inc
RTL_DIR := ${MKFILE_DIR}/rtl
TB_SUPPORT_DIR := ${MKFILE_DIR}/tb/support
V_FILES := $(shell find ${RTL_DIR} ${TB_SUPPORT_DIR} -name "*.v")
SV_FILES := $(shell find ${RTL_DIR} ${TB_SUPPORT_DIR} -name "*.sv")
RTL_FILES := ${V_FILES} ${SV_FILES}
CUID := $(shell id -u)
CGID := $(shell id -g)
CWD := $(abspath $(dir $$PWD))
all: lint-verilator test vivado doc
doc:
cd docs && $(MAKE)
vivado:
cd impl && $(MAKE) vivado
lint-verilator:
verilator --timescale 1ns/1ps \
-I${INC_DIR} \
-DRVFI \
-DRVFI_TRACE \
-DASSERTIONS \
-lint-only \
-Wall \
-Wno-fatal ${RTL_FILES} \
--top-module rvj1_top \
.verilator_lint_config.vlt
clean:
cd impl && $(MAKE) clean
cd doc && $(MAKE) clean
cd tb && $(MAKE) clean
test:
cd tb && $(MAKE) all
docker-build:
docker build -t iic-osic-tools-plus:0.1 .
docker-run-it:
docker run -it \
--user ${CUID}:${CGID} \
-e "UID=${CUID}" \
-e "GID=${CGID}" \
-v /etc/group:/etc/group:ro \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/shadow:/etc/shadow:ro \
-v ~/.cache/:/headless/.cache:rw \
-v $(CWD):/foss/designs/rvj1 \
iic-osic-tools-plus:0.1 -s /bin/bash