-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·62 lines (50 loc) · 1.73 KB
/
run.sh
File metadata and controls
executable file
·62 lines (50 loc) · 1.73 KB
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
#!/bin/bash -xe
set -xe
export PATH=/j/GHDL/0.37-mingw32-mcode/bin:$PATH
# Build and packaging
G=generated
P=comfilter
rm -rf $P
mkdir $P
python microops/make_settings.py
python microops/filter_implementation.py
cat $G/settings.h c/packetgen.c | tr -d '\r' > $P/packetgen.c
tr -d '\r' < c/packetgen.h > $P/packetgen.h
cp fpga/banked_shift_register.vhdl $P
cp fpga/filter_unit.vhdl $P
cp fpga/shift_register.vhdl $P
cp fpga/subtractor.vhdl $P
cp fpga/debug_textio-body.vhdl $P
cp fpga/debug_textio.vhdl $P
cp $G/filter_unit_control_line_decoder.vhdl $P
cp $G/filter_unit_microcode_store.vhdl $P
cp $G/filter_unit_microcode_store.test.vhdl $P
cp $G/filter_unit_settings.vhdl $P
cp fpga/com_receiver.vhdl $P
cp fpga/pulse_gen.vhdl $P
cp fpga/crc.vhdl $P
cp fpga/comfilter_main.vhdl $P
git rev-parse HEAD > $P/version.txt
tar cvzf $P-$(git rev-parse HEAD).tar.gz $P
# Model test (C++)
gcc -o $G/siggen.exe model/siggen.c -Wall -Werror -g -lm -I$G
g++ -o $G/sigdec.exe model/sigdec.cpp -std=c++17 -Wall -Werror -g -lm -I$G
$G/siggen.exe test_data $G/signal.wav $G/debug_1
$G/sigdec.exe $G/signal.wav $G/output $G/test_vector $G/debug_2
#gnuplot model/test1.gnuplot > $G/t.png
cmp test_data $G/output
# Library test (C++)
gcc -o $G/packetgen.exe model/sigpacket.c -I$P $P/packetgen.c -Wall -Werror -g -lm -I$G
$G/packetgen.exe wav $G/packet.wav 1 2 4 8 16 32 64 128 256 512
# Functional test (Python only)
python microops/func_test.py
# Test VHDL components without microcode
generated/packetgen.exe vhdl generated/test_packet_signal.vhdl 0xc001
cd $P
../fpga/test_crc.sh
../fpga/test_com_receiver.sh
cd ..
# Test VHDL components with microcode
python microops/ghdl_test.py
# Hardware test (use with fpga_test_project_top_bitmap.bin)
# python microops/fpga_test.py