OpenCores
URL https://opencores.org/ocsvn/connect-6/connect-6/trunk

Subversion Repositories connect-6

[/] [connect-6/] [trunk/] [XILINX/] [BUILD_SCC_SRCH/] [Makefile] - Blame information for rev 18

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 17 sumanta.ch
GCC=g++ -g -DPICO_SYNTH -I/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/include -I./synth_src
2
GCC_LINK= g++ -L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/src/SimCode/ -lpdextn -lnosimdump -lsimerror -L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/edgcpfe/lib/ -lpthread -lm -lstdc++ -lC
3
SCC=schroot -c centos5-i386 ~/bin/synphonycc_fpga
4
SCC_SCRIPTS=./scc_scripts
5
SYNTH_SRC=./synth_src
6
 
7
 
8
 
9
GCC_LINK=g++ /opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/src/SimCode/golden.o  -L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/src/SimCode/ -lpdextn -lnosimdump -lsimerror -L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/edgcpfe/lib/ -lpthread -lm -lstdc++ -lC
10
 
11
GCC_LINK_ARGS=-L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/src/SimCode/ -lpdextn -lnosimdump -lsimerror -L/opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/edgcpfe/lib/ -lpthread -lm -lstdc++ -lC
12
 
13
all: fpt_connect6 test_golden
14
emul:
15
        ${GCC} -c -g -pg -DEMUL ${SYNTH_SRC}/main.cpp
16
        ${GCC} -c -g -pg -DEMUL ${SYNTH_SRC}/connect6.cpp
17
        make -C ./ fpt_connect6
18
 
19
fpt_connect6: main.o util.o connect6.o connect6_synth.o state.o threats.o search.o
20
        ${GCC} -o connect6 /opt/synopsys/scc/synphonycc-fpga-vE-2010.12-SP1/pico/simu/src/SimCode/golden.o main.o  util.o connect6.o connect6_synth.o state.o threats.o search.o  ${GCC_LINK_ARGS} -lpthread -lm -g -pg
21
main.o:${SYNTH_SRC}/main.cpp
22
        ${GCC} -c -g -pg ${SYNTH_SRC}/main.cpp
23
connect6_synth.o: ${SYNTH_SRC}/connect6_synth.cpp ${SYNTH_SRC}/connect6_synth.h
24
        ${GCC} -c -g -pg ${SYNTH_SRC}/connect6_synth.cpp
25
connect6.o: ${SYNTH_SRC}/connect6.cpp ${SYNTH_SRC}/connect6.h
26
        ${GCC} -c -g -pg ${SYNTH_SRC}/connect6.cpp
27
 
28
util.o: ${SYNTH_SRC}/util.cpp ${SYNTH_SRC}/util.h
29
        ${GCC} -c -g -pg ${SYNTH_SRC}/util.cpp
30
state.o:${SYNTH_SRC}/state.cpp ${SYNTH_SRC}/shared.h
31
        ${GCC} -c -g -pg ${SYNTH_SRC}/state.cpp
32
 
33
search.o:${SYNTH_SRC}/search.cpp ${SYNTH_SRC}/shared.h
34
        ${GCC} -c -g -pg ${SYNTH_SRC}/search_bfs.cpp -o search.o
35
threats.o:${SYNTH_SRC}/threats.cpp ${SYNTH_SRC}/shared.h
36
        ${GCC} -c -g -pg ${SYNTH_SRC}/threats.cpp
37
q.o:${SYNTH_SRC}/q.cpp ${SYNTH_SRC}/shared.h
38
        ${GCC} -c -g -pg ${SYNTH_SRC}/q.cpp
39
 
40
 
41
test_golden:
42
        ./connect6 -player L
43
 
44
clean:
45
        rm -f *.o connect6 gmon.out myboard.txt
46
 
47
 
48
 
49
 
50
#first the c/c++ source should be compiled
51 18 sumanta.ch
fpga: synth xilinx_synth test
52 17 sumanta.ch
        cp cp ./rtl_package/synth/altera_fpga/run/DE2.sof ../DEMO
53
 
54
synth: imp_connect.tag
55
imp_window.tag:
56
        #sed -s 's/\\TCAB_NAME/threat_window/g' main.cpp.base >main.cpp
57
        cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
58
        ${SCC} ${SCC_SCRIPTS}/run_imp_window.tcl
59
        echo "Done" > imp_window.tag
60
imp_line.tag: imp_window.tag
61
        sed -s 's/\\TCAB_NAME/threat_line/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
62
        #cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
63
        ${SCC} ${SCC_SCRIPTS}/run_imp_line.tcl
64
        echo "Done" > imp_line.tag
65
imp_marks.tag:
66
        sed -s 's/\\TCAB_NAME/ai_marks/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
67
        #cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
68
        ${SCC} ${SCC_SCRIPTS}/run_imp_marks.tcl
69
        echo "Done" > imp_marks.tag
70
imp_sort.tag:
71
        sed -s 's/\\TCAB_NAME/streamsort/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
72
        #cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
73
        ${SCC} ${SCC_SCRIPTS}/run_imp_sort.tcl
74
        echo "Done" > imp_sort.tag
75
imp_threat.tag: imp_line.tag
76
        sed -s 's/\\TCAB_NAME/ai_threats/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
77
        #cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
78
        ${SCC} ${SCC_SCRIPTS}/run_imp_threat.tcl
79
        echo "Done" > imp_threat.tag
80
imp_adjacent.tag:
81
        #cp ${SYNTH_SRC}/main.cpp.base ${SYNTH_SRC}/main.cpp
82
        sed -s 's/\\TCAB_NAME/ai_adjacent/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
83
        ${SCC} ${SCC_SCRIPTS}/run_imp_adjacent.tcl
84
        echo "Done" > imp_adjacent.tag
85
imp_search.tag: imp_threat.tag
86
        sed -s 's/\\TCAB_NAME/search/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
87
        ${SCC} ${SCC_SCRIPTS}/run_imp_search.tcl
88
        echo "Done" > imp_search.tag
89
imp_connect.tag: imp_search.tag imp_adjacent.tag
90
        sed -s 's/\\TCAB_NAME/connect6ai_synth/g' ${SYNTH_SRC}/main.cpp.base >${SYNTH_SRC}/main.cpp
91
        ${SCC} ${SCC_SCRIPTS}/run_imp_connect.tcl
92
        echo "Done" > imp_connect.tag
93
 
94
xilinx_synth:
95
        cp -r ./imp_connect/rtl_package/ ./
96
        cp SP6/SP6.do_synth imp_connect/rtl_package/synth/synplify_fpga/do_synth
97
        cp SP6/SP6.synplify.tcl imp_connect/rtl_package/synth/synplify_fpga/synplify.tcl
98
        cp SP6/SP6.ucf imp_connect/rtl_package/synth/synplify_fpga/
99
        echo -e 'all:\n\t./do_synth' > imp_connect/rtl_package/synth/synplify_fpga/makefile
100
        make -C imp_connect/rtl_package/synth/synplify_fpga/
101
 
102
test:
103
        ../scripts/serial_port_setup.sh
104
        rm -f ./test.result
105
        for i in `seq 1 100` ; do  ../connect6 -port /dev/ttyS0 -player L >> test.result 2>&1; done
106
        #grep "FPGA has won" ./test.result | wc -l
107
        #grep "AI has won" ./test.result | wc -l
108
        #grep "TIE" ./test.result | wc -l
109
        python ../scripts/esult.py
110
pgm:
111
        cp ./rtl_package/synth/altera_fpga/run/DE2.sof ./
112
        quartus_pgm -c USB-Blaster -m jtag  -o "p;DE2.sof"
113
 
114
 
115
prof:
116
        valgrind --tool=callgrind  ./connect6 -player L
117
        kcachegrind
118
 
119
altera_clean:
120
        rm -rf ./rtl_package/
121
 
122
ultraclean: altera_clean
123
        rm -rf *.tag imp_line imp_marks imp_threat imp_choose imp_adjacent imp_connect imp_window Logs

powered by: WebSVN 2.1.0

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