forked from dimitriv/Ziria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
203 lines (160 loc) · 6.42 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the ""License""); you
# may not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR
# A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
#
# See the Apache Version 2.0 License for specific language governing
# permissions and limitations under the License.
#
#
GHCFLAGS += -fwarn-incomplete-patterns -Werror
GHCFLAGS += -isrc:src/Typecheck:src/Codegen:src/Vectorize:src/Parse:src/Optimize:src/Pipeline:src/BasicTypes:src/Utils
GHCFLAGS += -odir obj -hidir obj
ifneq ($(wildcard .cabal-sandbox/*-packages.conf.d),)
GHCFLAGS += \
-no-user-package-db \
-package-db $(wildcard .cabal-sandbox/*-packages.conf.d)
endif
all:
ghc $(GHCFLAGS) --make Main -o wplc
ghc --make tools/BlinkDiff.hs -o tools/BlinkDiff
clean:
rm -rf obj wplc wplc.exe
test: test-backend test-lut test-WiFi-all
test-backend:
@echo ">>>>>>>>>>>>>>> Backend tests"
cd _tests/_backend && make
@echo "<<<<<<<<<<<<<<< Backend tests"
test-lut:
@echo ">>>>>>>>>>>>>>> LUT tests"
cd _tests/_lut && make
@echo "<<<<<<<<<<<<<<< LUT tests"
test-WiFi-all: test-WiFi test-WiFi-TX test-WiFi-RX
test-WiFi:
@echo ">>>>>>>>>>>>>>> Backend tests"
cd _code/WiFi/tests && EXTRAOPTS="--no-exp-fold" make
@echo "<<<<<<<<<<<<<<< Backend tests"
test-WiFi-TX:
@echo ">>>>>>>>>>>>>>> Backend tests"
cd _code/WiFi/transmitter/tests && make
@echo "<<<<<<<<<<<<<<< Backend tests"
test-WiFi-RX:
@echo ">>>>>>>>>>>>>>> Backend tests"
cd _code/WiFi/receiver/tests && make
@echo "<<<<<<<<<<<<<<< Backend tests"
# examples: all
# @echo "*** Examples (with optimization):"
# cd examples; ./runTest s && cd ../
# @echo ""
# @echo "*** Examples (without optimization):"
# cd examples; ./runTestsNoOpt && cd ../
# allclean: clean
# find tests -name '*.wpl.c' | xargs rm -f
# find tests -name '*.wpl.exe' | xargs rm -f
# find tests -name '*.wpl.expanded' | xargs rm -f
# find tests -name '*.wpl.outfile' | xargs rm -f
# test-frontend: all
# @echo ""
# @echo "*** Frontend Tests:"
# (cd tests && ./runTests)
# test-vectorize: all
# @echo ""
# @echo "*** Vectorization Tests:"
# (cd tests/vectorize && ./runTests)
# test-lut: all
# @echo ""
# @echo "*** LUT Tests:"
# (cd tests/lut && ./runTests)
# test-wifi-tx: all
# @echo ""
# @echo "*** WiFi Tx Tests (with -x -v):"
# # (cd Code/802.11a/transmitter && ../../../scripts/runGCCTests 10000000)
# (cd Code/802.11a/transmitter && ./runTests)
# test-wifi-rx: all
# @echo ""
# @echo "*** WiFi Rx Tests (with -x -v):"
# (cd Code/802.11a/receiver && ../../../scripts/runDDKTests)
# test-wifi-rx-vector: all
# @echo ""
# @echo "*** WiFi Vectorized - Rx Tests (with -x -v):"
# (cd Code/802.11a/receiver/vectorized && ../../../../scripts/runDDKTests)
# test-backend: all
# @echo ""
# @echo "*** Backend Tests (with optimization):"
# (cd tests/backend && ../../scripts/runGCCTests 1000)
# test-pipeline: all
# @echo ""
# @echo "*** Pipeline Tests:"
# (cd tests/pipeline && ../../scripts/runDDKPipeTests)
# test-pipeline-aggressive: all
# @echo ""
# @echo "*** Aggressive Pipeline Tests:"
# (cd tests/pipeline/aggressive && ../../../scripts/runDDKAggrPipeTests)
# test-wifi-rx-pipeline: all
# @echo ""
# @echo "*** WiFi Pipelined on 2 Cores - Rx Tests (with -x -v):"
# (cd Code/802.11a/receiver/pipelined && ../../../../scripts/runDDKPipeTests)
# test-wifi-rx-vector-pipeline: all
# @echo ""
# @echo "*** WiFi Vectorized & Pipelined on 2 Cores - Rx Tests (with -x -v):"
# (cd Code/802.11a/receiver/vectorized/pipelined && ../../../../../scripts/runDDKPipeTests)
# test-wifi-all: test-wifi-tx test-wifi-rx \
# test-wifi-rx-vector test-wifi-rx-pipeline test-wifi-rx-vector-pipeline
# test: all \
# test-frontend test-backend test-pipeline test-pipeline-aggressive \
# test-wifi-all test-vectorize test-lut
# @echo "Testsuite run completed!"
# mini-test: all \
# test-frontend test-backend test-pipeline test-pipeline-aggressive \
# test-wifi-all test-lut
# @echo "Testsuite run completed!"
# # No need for this as non-vectorized is run by avect script anyway
# #test-performance-wifi-rx: all
# # @echo ""
# # @echo "*** Test Wifi RX non-vectorized performance:"
# # (cd Code/802.11a/receiver/ && ../../../scripts/runDDKTestsPerf)
# test-performance-micro: all
# @echo ""
# @echo "*** Test micro-benchmark performance (results in performance dir):"
# (cd performance && ./runAll)
# test-performance-wifi-rx-avect: all
# @echo ""
# @echo "*** Test Wifi RX auto-vectorized performance:"
# (cd Code/802.11a/receiver/ && ../../../scripts/runDDKVectTestsPerf)
# test-performance-wifi-rx-avect-pipeline: all
# @echo ""
# @echo "*** Test Wifi RX auto-vectorized & pipelined performance:"
# (cd Code/802.11a/receiver/ && ../../../scripts/runDDKVectPipeTestsPerf)
# test-performance-wifi-rx-mvect: all
# @echo ""
# @echo "*** Test Wifi RX manually-vectorized performance:"
# (cd Code/802.11a/receiver/vectorized/ && ../../../../scripts/runDDKTestsPerf)
# test-performance-wifi-tx-avect-alut-pipeline: all
# @echo ""
# @echo "*** Test Wifi TX auto-vectorized aut-lutted pipelined performance:"
# (cd Code/802.11a/transmitter/ && ../../../scripts/runDDKAVectPipeTestsPerf)
# test-performance-wifi-rx-all: all \
# test-performance-wifi-rx-avect \
# test-performance-wifi-rx-mvect test-performance-wifi-rx-avect-pipeline
# @echo "Wifi RX performance testsuite run completed!"
# test-performance: all \
# test-performance-micro test-performance-wifi-rx-avect \
# test-performance-wifi-rx-mvect test-performance-wifi-rx-avect-pipeline
# @echo "Performance testsuite run completed!"
# test-thorough-performance-wifi: all
# @echo ""
# @echo "*** Thorough performance measurement of WiFi (results in TOP/processedPerfResults.txt):"
# (./scripts/runPerformanceAll)
# test-thorough-performance: all \
# test-thorough-performance-wifi test-performance-micro
# @echo "Thorough performance suite finished"