This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmake_flopoco.sh
executable file
·72 lines (56 loc) · 2.12 KB
/
make_flopoco.sh
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
#!/bin/bash
HERE="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
OPENHLS_DIR="$( cd $HERE; pwd -P)/.."
export PATH=$OPENHLS_DIR/build/ghdl/bin:$PATH
function flopoco_here () {
docker run --rm=true -v $HERE:/flopoco_workspace flopoco "$@"
}
function make() {
freq=$1
wE=$2
wF=$3
echo $freq
echo "fmul"
flopoco_here FPMult wE=$wE wF=$wF name=fmul outputFile=flopoco_fmul_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fmul_${wE}_${wF}.vhdl fmul
echo "fadd"
flopoco_here FPAdd wE=$wE wF=$wF name=fadd dualPath=1 outputFile=flopoco_fadd_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fadd_${wE}_${wF}.vhdl fadd
echo "fsqrt"
flopoco_here FPSqrt wE=$wE wF=$wF name=fsqrt outputFile=flopoco_fsqrt_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fsqrt_${wE}_${wF}.vhdl fsqrt
echo "fsub"
flopoco_here FPAdd wE=$wE wF=$wF name=fsub dualPath=1 sub=1 outputFile=flopoco_fsub_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fsub_${wE}_${wF}.vhdl fsub
echo "fdiv"
flopoco_here FPDiv wE=$wE wF=$wF name=fdiv outputFile=flopoco_fdiv_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fdiv_${wE}_${wF}.vhdl fdiv
echo "fcmplt"
flopoco_here FPComparator wE=$wE wF=$wF name=fcmplt outputFile=flopoco_fcmplt_${wE}_${wF}.vhdl target=Virtex6 frequency=$freq clockEnable=0 flags=1 method=3
$OPENHLS_DIR/scripts/ghdl_convert_vhdl_verilog.sh $HERE/flopoco_fcmplt_${wE}_${wF}.vhdl fcmplt
echo "\n"
}
width_pairs=(
"3 3"
"5 3"
"4 4"
"4 5"
"5 4"
"5 5"
"5 11"
"6 6"
"7 7"
"8 8"
"4 10"
"8 23"
)
#frequencies=(100 150 200 250 300 350 400 450 500 550 600 650 700 750 800)
frequencies=(300)
for freq in "${frequencies[@]}"; do
for widths in "${width_pairs[@]}"; do
set -- $widths
we=$1
wf=$2
make $freq $we $wf
done
done