1 |
2 |
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 aoOCS project."
|
6 |
|
|
@echo -e " Doxverilog version required."
|
7 |
|
|
@echo -e "control_osd - generate ./rtl/control_osd.mif"
|
8 |
|
|
@echo -e "sd_disk - generate SD disk image containing ROMs and ADFs."
|
9 |
|
|
@echo -e " The disk image should be written to a SD card starting at offset 0."
|
10 |
|
|
@echo -e "spec_extract - generate the specification.odt file from the Doxygen HTML docs."
|
11 |
|
|
@echo -e "vga_to_png - extract VGA dump file to a set of PNG frame images."
|
12 |
|
|
@echo -e "terasic_de2_70 - synthesise the aoOCS project for the Terasic DE2-70 board."
|
13 |
|
|
@echo -e "clean - clean all."
|
14 |
|
|
@echo
|
15 |
|
|
@exit 0
|
16 |
|
|
|
17 |
|
|
doxygen: ./doc/doxygen/doxygen.cfg
|
18 |
|
|
ifndef DOXVERILOG
|
19 |
|
|
@echo "DOXVERILOG environment variable not set. Set it to a Doxverilog executable."
|
20 |
|
|
@exit 1
|
21 |
|
|
endif
|
22 |
|
|
$(DOXVERILOG) ./doc/doxygen/doxygen.cfg
|
23 |
|
|
|
24 |
|
|
aoOCS_tool:
|
25 |
|
|
javac -d ./tmp ./sw/aoOCS_tool/*.java
|
26 |
|
|
|
27 |
|
|
control_osd: aoOCS_tool
|
28 |
|
|
java -cp ./tmp aoOCS_tool.Main control_osd ./rtl/control_osd.mif
|
29 |
|
|
|
30 |
|
|
sd_disk: aoOCS_tool
|
31 |
|
|
ifndef AO_INTRO_IMAGE
|
32 |
|
|
@echo "AO_INTRO_IMAGE environment variable not set. Set it to a PNG graphic file to display at startup."
|
33 |
|
|
@exit 1
|
34 |
|
|
endif
|
35 |
|
|
ifndef AO_ROMS
|
36 |
|
|
@echo "AO_ROMS environment variable not set. Set it to a directory with ROM files to insert into the sd disk image."
|
37 |
|
|
@exit 1
|
38 |
|
|
endif
|
39 |
|
|
ifndef AO_FLOPPIES
|
40 |
|
|
@echo "AO_FLOPPIES environment variable not set. Set it to a directory with ADF files to insert into the sd disk image."
|
41 |
|
|
@exit 1
|
42 |
|
|
endif
|
43 |
|
|
@echo "Generating SD disk image to file ./tmp/sd_disk.img"
|
44 |
|
|
java -cp ./tmp aoOCS_tool.Main sd_disk $(AO_INTRO_IMAGE) $(AO_ROMS) $(AO_FLOPPIES) ./tmp/sd_disk.img
|
45 |
|
|
|
46 |
|
|
vga_to_png: aoOCS_tool
|
47 |
|
|
ifndef AO_VGA_DUMP_FILE
|
48 |
|
|
@echo "AO_VGA_DUMP_FILE environment variable not set. Set it to a VGA dump file."
|
49 |
|
|
@exit 1
|
50 |
|
|
endif
|
51 |
|
|
ifndef AO_FRAME_OUTPUT_DIR
|
52 |
|
|
@echo "AO_FRAME_OUTPUT_DIR environment variable not set. Set it to a output directory for extracted frames."
|
53 |
|
|
@exit 1
|
54 |
|
|
endif
|
55 |
|
|
java -cp ./tmp aoOCS_tool.Main vga_to_png $(AO_VGA_DUMP_FILE) $(AO_FRAME_OUTPUT_DIR)
|
56 |
|
|
|
57 |
|
|
spec_extract: aoOCS_tool
|
58 |
|
|
mkdir -p ./tmp/spec_extract
|
59 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_references.html ./tmp/spec_extract/references.html
|
60 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_ports.html ./tmp/spec_extract/ports.html
|
61 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_clocks.html ./tmp/spec_extract/clocks.html
|
62 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_registers.html ./tmp/spec_extract/registers.html
|
63 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_operation.html ./tmp/spec_extract/operation.html
|
64 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_architecture.html ./tmp/spec_extract/architecture.html
|
65 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_introduction.html ./tmp/spec_extract/introduction.html
|
66 |
|
|
java -cp ./tmp aoOCS_tool.Main spec_extract ./doc/doxygen/html/page_spec_revisions.html ./tmp/spec_extract/revisions.html
|
67 |
|
|
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)"
|
68 |
|
|
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)"
|
69 |
|
|
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)"
|
70 |
|
|
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)"
|
71 |
|
|
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)"
|
72 |
|
|
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)"
|
73 |
|
|
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)"
|
74 |
|
|
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)"
|
75 |
|
|
|
76 |
|
|
terasic_de2_70:
|
77 |
|
|
mkdir -p ./tmp/terasic_de2_70
|
78 |
|
|
cp ./rtl/*.v ./tmp/terasic_de2_70
|
79 |
|
|
cp ./rtl/*.mif ./tmp/terasic_de2_70
|
80 |
|
|
cp ./rtl/terasic_de2_70/* ./tmp/terasic_de2_70
|
81 |
|
|
cp ./syn/terasic_de2_70/* ./tmp/terasic_de2_70
|
82 |
|
|
cd ./tmp/terasic_de2_70 && quartus_sh --flow compile aoOCS
|
83 |
|
|
|
84 |
|
|
clean:
|
85 |
|
|
rm -R -f ./tmp/*
|