Add Nexys Video support
[microwatt.git] / Makefile
1 GHDL=ghdl
2 GHDLFLAGS=--std=08
3 CFLAGS=-O2
4
5 all = core_tb simple_ram_behavioural_tb
6 # XXX
7 # loadstore_tb fetch_tb
8
9 all: $(all)
10
11 %.o : %.vhdl
12 $(GHDL) -a $(GHDLFLAGS) $<
13
14 common.o: decode_types.o
15 core_tb.o: common.o wishbone_types.o core.o simple_ram_behavioural.o
16 core.o: common.o wishbone_types.o fetch1.o fetch2.o decode1.o decode2.o register_file.o cr_file.o execute1.o execute2.o loadstore1.o loadstore2.o multiply.o writeback.o wishbone_arbiter.o
17 cr_file.o: common.o
18 crhelpers.o: common.o
19 decode1.o: common.o decode_types.o
20 decode2.o: decode_types.o common.o helpers.o
21 decode_types.o:
22 execute1.o: decode_types.o common.o helpers.o crhelpers.o ppc_fx_insns.o sim_console.o
23 execute2.o: common.o crhelpers.o ppc_fx_insns.o
24 fetch1.o: common.o
25 fetch2.o: common.o wishbone_types.o
26 fetch_tb.o: common.o wishbone_types.o fetch.o
27 glibc_random_helpers.o:
28 glibc_random.o: glibc_random_helpers.o
29 helpers.o:
30 loadstore1.o: common.o
31 loadstore2.o: common.o helpers.o wishbone_types.o
32 loadstore_tb.o: common.o simple_ram_types.o simple_ram.o loadstore1.o loadstore2.o
33 multiply_tb.o: common.o glibc_random.o ppc_fx_insns.o multiply.o
34 multiply.o: common.o decode_types.o ppc_fx_insns.o crhelpers.o
35 ppc_fx_insns.o: helpers.o
36 register_file.o: common.o
37 sim_console.o:
38 simple_ram_behavioural_helpers.o:
39 simple_ram_behavioural_tb.o: wishbone_types.o simple_ram_behavioural.o
40 simple_ram_behavioural.o: wishbone_types.o simple_ram_behavioural_helpers.o
41 wishbone_arbiter.o: wishbone_types.o
42 wishbone_types.o:
43 writeback.o: common.o
44
45 core_tb: core_tb.o simple_ram_behavioural_helpers_c.o sim_console_c.o
46 $(GHDL) -e $(GHDLFLAGS) -Wl,simple_ram_behavioural_helpers_c.o -Wl,sim_console_c.o $@
47
48 fetch_tb: fetch_tb.o
49 $(GHDL) -e $(GHDLFLAGS) $@
50
51 loadstore_tb: loadstore_tb.o
52 $(GHDL) -e $(GHDLFLAGS) $@
53
54 simple_ram_tb: simple_ram_tb.o
55 $(GHDL) -e $(GHDLFLAGS) $@
56
57 simple_ram_behavioural_tb: simple_ram_behavioural_helpers_c.o simple_ram_behavioural_tb.o
58 $(GHDL) -e $(GHDLFLAGS) -Wl,simple_ram_behavioural_helpers_c.o $@
59
60 tests = $(sort $(patsubst tests/%.out,%,$(wildcard tests/*.out)))
61
62 check: $(tests) test_micropython test_micropython_long
63
64 $(tests): core_tb
65 @./scripts/run_test.sh $@
66
67 test_micropython:
68 @./scripts/test_micropython.py
69
70 test_micropython_long:
71 @./scripts/test_micropython_long.py
72
73 clean:
74 rm -f *.o work-*cf $(all)