OpenCores
URL https://opencores.org/ocsvn/ao68000/ao68000/trunk

Subversion Repositories ao68000

[/] [ao68000/] [trunk/] [Makefile] - Blame information for rev 12

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 alfik
help:
2
        @echo -e "Select operation to perform. Type 'make' followed by the name of the operation."
3
        @echo
4
        @echo -e "Available operations:"
5
        @echo -e "doxygen             - run the doxygen tool on the ao68000 project."
6
        @echo -e "                      Doxverilog version required."
7
        @echo -e "spec_extract        - generate the specification.odt file from the Doxygen HTML docs."
8
        @echo -e "soc_for_linux       - synthesise soc_for_linux SoC with ao68000 processor for"
9
        @echo -e "                      the Terasic DE2-70 board."
10
        @echo -e "test_bcd            - test BCD opcode algorithms."
11
        @echo -e "compare_with_winuae - compare ao68000 processor with WinUAE MC68000 emulator (www.winuae.net)."
12
        @echo -e "clean               - clean all."
13
        @echo
14
        @exit 0
15
 
16
doxygen: ./doc/doxygen/doxygen.cfg
17
ifndef DOXVERILOG
18
        @echo "DOXVERILOG environment variable not set. Set it to a Doxverilog executable."
19
        @exit 1
20
endif
21
        $(DOXVERILOG) ./doc/doxygen/doxygen.cfg
22
 
23
ao68000_tool:
24
        javac -d ./tmp ./sw/ao68000_tool/*.java
25
 
26
microcode: ao68000_tool
27
        java -cp ./tmp ao68000_tool.Main parser ./rtl/ao68000.v ./sw/ao68000_tool/Parser.java
28
        javac -d ./tmp ./sw/ao68000_tool/*.java
29
        java -cp ./tmp ao68000_tool.Main microcode ./rtl/ao68000.v ./rtl/ao68000_microcode.mif
30
 
31
test_bcd:
32
        gcc -o ./tmp/test_bcd ./tests/nbcd_abcd_sbcd/nbcd_abcd_sbcd.c
33
        ./tmp/test_bcd
34
 
35
soc_for_linux:
36
        mkdir -p ./tmp/soc_for_linux_on_terasic_de2_70
37
        cp ./rtl/* ./tmp/soc_for_linux_on_terasic_de2_70
38
        cp ./tests/soc_for_linux_on_terasic_de2_70/verilog/* ./tmp/soc_for_linux_on_terasic_de2_70
39
        cp ./tests/soc_for_linux_on_terasic_de2_70/quartus_project/* ./tmp/soc_for_linux_on_terasic_de2_70
40
        cd ./tmp/soc_for_linux_on_terasic_de2_70 && quartus_sh --flow compile soc_for_linux
41
 
42
spec_extract: ao68000_tool
43
        mkdir -p ./tmp/spec_extract
44
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_references.html ./tmp/spec_extract/references.html
45
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_ports.html ./tmp/spec_extract/ports.html
46
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_clocks.html ./tmp/spec_extract/clocks.html
47
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_registers.html ./tmp/spec_extract/registers.html
48
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_operation.html ./tmp/spec_extract/operation.html
49
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_architecture.html ./tmp/spec_extract/architecture.html
50
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_introduction.html ./tmp/spec_extract/introduction.html
51
        java -cp ./tmp ao68000_tool.Main spec_extract ./doc/doxygen/html/page_spec_revisions.html ./tmp/spec_extract/revisions.html
52
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/doc/src/specification_template.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/references.html,True)"
53
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/ports.html,True)"
54
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/clocks.html,True)"
55
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/registers.html,True)"
56
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/operation.html,True)"
57
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/architecture.html,True)"
58
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/introduction.html,True)"
59
        soffice "macro:///Standard.Module1.Main(file://$(CURDIR)/tmp/spec_extract/specification.odt,file://$(CURDIR)/tmp/spec_extract/specification.odt,,file://$(CURDIR)/tmp/spec_extract/revisions.html,False)"
60
 
61
winuae:
62
        mkdir -p ./tmp/compare_with_winuae/winuae
63
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -o build68k ./../../../tests/compare_with_winuae/winuae/build68k.c
64
        cd ./tmp/compare_with_winuae/winuae && ./build68k < ./../../../tests/compare_with_winuae/winuae/table68k > table68k.c
65
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c ./../../../tests/compare_with_winuae/winuae/gencpu.c
66
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c ./../../../tests/compare_with_winuae/winuae/readcpu.c
67
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c table68k.c
68
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -o gencpu gencpu.o readcpu.o table68k.o
69
        cd ./tmp/compare_with_winuae/winuae && ./gencpu
70
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c ./../../../tests/compare_with_winuae/winuae/ao.c
71
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c cpustbl.c
72
        cd ./tmp/compare_with_winuae/winuae && gcc -DCPUEMU_68000_ONLY -DCPUEMU_11 -I./../../../tests/compare_with_winuae/winuae -c cpuemu_11.c
73
        cd ./tmp/compare_with_winuae/winuae && gcc -o ao ao.o cpustbl.o cpuemu_11.o table68k.o readcpu.o
74
 
75
tb_ao68000:
76
ifndef QUARTUS_ROOTDIR
77
        @echo "Environment variable QUARTUS_ROOTDIR not set. Please set it to point to Altera Quartus II rootdir."
78
        @exit 1
79
endif
80
        mkdir -p ./tmp/compare_with_winuae/verilog
81
        cd ./tmp/compare_with_winuae/verilog && ln -s -f $(QUARTUS_ROOTDIR)/eda/sim_lib/altera_mf.v altsyncram.v
82
        cd ./tmp/compare_with_winuae/verilog && ln -s -f $(QUARTUS_ROOTDIR)/eda/sim_lib/220model.v lpm_mult.v
83
        cd ./tmp/compare_with_winuae/verilog && ln -s -f $(QUARTUS_ROOTDIR)/eda/sim_lib/220model.v lpm_divide.v
84
        cd ./tmp/compare_with_winuae/verilog && iverilog -y. -y./../../../rtl -y./../../../tests/compare_with_winuae/verilog -o tb_ao68000 ./../../../tests/compare_with_winuae/verilog/tb_ao68000.v
85
        cp ./rtl/ao68000_microcode.mif ./tmp/compare_with_winuae/verilog
86
 
87
START_IR_DEC    := 0
88
END_IR_DEC      := 65536
89
TERM_PROGRAM    := xterm
90
COUNT           := 2
91
COUNT_LIST      := $(wordlist 1,$(COUNT),0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
92
STEP            := `expr \( $(END_IR_DEC) - $(START_IR_DEC) \) / $(COUNT)`
93
 
94
compare_with_winuae: ao68000_tool winuae tb_ao68000
95
        $(foreach i,$(COUNT_LIST), mkdir -p ./tmp/compare_with_winuae/run_$(i); )
96
        $(foreach i,$(COUNT_LIST), cp ./rtl/ao68000_microcode.mif ./tmp/compare_with_winuae/run_$(i); )
97
        $(foreach i,$(COUNT_LIST), echo -e "#!/bin/bash\n./../verilog/tb_ao68000 \$$@" \
98
                > ./tmp/compare_with_winuae/run_$(i)/run.sh; \
99
        )
100
        $(foreach i,$(COUNT_LIST), chmod +x ./tmp/compare_with_winuae/run_$(i)/run.sh; )
101
        $(foreach i,$(COUNT_LIST), $(TERM_PROGRAM) -e java -cp ./tmp ao68000_tool.Main test \
102
                ./tmp/compare_with_winuae/winuae/ao \
103
                ./tmp/compare_with_winuae/run_$(i)/run.sh \
104
                `expr $(i) \* \( \( $(END_IR_DEC) - $(START_IR_DEC) \) / $(COUNT) \)` \
105
                `expr \( $(i) + 1 \) \* \( \( $(END_IR_DEC) - $(START_IR_DEC) \) / $(COUNT) \)` \
106
                & \
107
        )
108
 
109
clean:
110
        rm -R -f ./tmp/*

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.