-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
77 lines (61 loc) · 2.25 KB
/
Makefile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
ICOPTS = -DSIM -Wall -Wno-implicit-dimensions -g2012
SIMOPTS = -N
INCLUDES = kv10.svh alu.svh constants.svh disasm.svh functions.svh io.svh opcodes.svh
LINTOPTS = --lint-only -Wno-LITENDIAN -DLINT
check: alu.check apr.check sram.check mem-sram.check mem.check pag.check cache.check
ver:
verilator $(LINTOPTS) --top-module apr_tb tb-apr.sv apr.sv barrel.sv pag.sv
# verilator $(LINTOPTS) apr.v barrel.v
# verilator $(LINTOPTS) pag.sv
apr.check: apr.sv alu.sv barrel.sv $(INCLUDES)
iverilog -tnull $(ICOPTS) apr.sv alu.sv decode.sv barrel.sv
alu.check: alu.sv alu.svh barrel.sv
iverilog -tnull $(ICOPTS) alu.sv barrel.sv
pag.check: pag.sv $(INCLUDES)
pidp-10-test.check:
iverilog -tnull $(ICOPTS) pidp-10.sv pidp-10-test.sv
tb-apr.vvp: Makefile kv10.hex tb-apr.sv apr.sv alu.sv barrel.sv mem.sv decode.sv pag.sv $(INCLUDES)
iverilog $(ICOPTS) -o tb-apr.vvp tb-apr.sv apr.sv alu.sv barrel.sv mem.sv decode.sv pag.sv
tb-alu.vvp: tb-alu.v alu.sv barrel.sv alu.svh
iverilog -o tb-alu.vvp tb-alu.sv alu.sv barrel.sv
tb-alu.lxt: tb-alu.vvp
./tb-alu.vvp
test.alu: tb-alu.lxt
./tb-alu.vvp
kv10.hex: kv10.asm kv10.def
uas kv10.def kv10.asm kv10.hex kv10.lst
test: test.aa test.ab test.ac test.ad test.ae test.af test.ag test.ai test.aj test.ak test.al test.am
test.aa: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcaa.mif
test.ab: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcab.mif
test.ac: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcac.mif
test.ad: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcad.mif
test.ae: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcae.mif
test.af: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcaf.mif
test.ag: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcag.mif
test.ah: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcah.mif
test.ai: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcai.mif
test.aj: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcaj.mif
test.ak: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcak.mif
test.al: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcal.mif
test.am: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dgcam.mif
test.qa: tb-apr.vvp
./tb-apr.vvp $(SIMOPTS) +file=dabqa.mif
KV10-PRM.pdf: KV10-PRM.tex KV10-PRM.aux KV10-PRM.toc
pdflatex KV10-PRM.tex
.SUFFIXES: .sv .check
# Test compile to check for error
.sv.check:
iverilog -tnull $(ICOPTS) $<