Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete version for reg9x9 algo #10

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1329e6d
Modify 3x3 region and 9x9 region to 2d array.
Aug 28, 2020
10fcf89
change reg3x3 and reg9x9 into 2d array, but with synthesis problem
Aug 31, 2020
5fd443c
modification on header file for adding upper_et and lower_et
Aug 31, 2020
97c444f
finished adding upper_et and lower_et information to reg0x0
Sep 4, 2020
7f271b2
adding upper_et and lower_et information to reg9x9
Sep 4, 2020
69a676d
Seperate class Region3x3 and Region9x9
Sep 11, 2020
eaaa00f
Modified the packOutput function and the bits used of Region9x9
Sep 15, 2020
8e26121
Fixed bug in the packing code
Sep 18, 2020
71e50a6
Update JetObjects.h
Kenny-Jia Sep 18, 2020
c05d0a4
Update algo_top.cpp
Kenny-Jia Sep 18, 2020
c7841e4
Update JetObjects.h
Kenny-Jia Sep 18, 2020
b8a8b29
Update JetObjects.h
Kenny-Jia Sep 18, 2020
2893727
Update algo_top.cpp
Kenny-Jia Sep 18, 2020
9466ff3
Update JetObjects.h
Kenny-Jia Sep 28, 2020
2c4e5bc
Pruning algorithm added
Sep 28, 2020
bf1d61a
Update JetObjects.h
Kenny-Jia Sep 28, 2020
eb28e05
Pruning algorithm added
Sep 28, 2020
c8a3176
Pruning algorithm is added
Sep 28, 2020
9c8a663
Improved JetAlgo
Oct 12, 2020
fb1fd88
Adding the sorting algorithm
Nov 11, 2020
1fdc1b9
rearranging sorted jet
Nov 12, 2020
f74e4f0
Correcting output
Nov 13, 2020
dc66bc4
applied bitonic sorting
Nov 29, 2020
19a1a31
add SLR test vector merge algorithm in python
Dec 24, 2020
fa8c60f
add merge algorithm in python
Dec 24, 2020
38705ee
add merge algo in python
Dec 24, 2020
b4f0110
add merge algo in python
Dec 24, 2020
188a8aa
add user input
Dec 28, 2020
23f7cfe
add user input
Dec 28, 2020
5d818ab
adding comment
Jan 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions JetAlgo/hls/vivado_hls/data/test_RCTmerge.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Automatically generated

# CLK Link 0 Link 1 Link 2 Link 3 Link 4 Link 5 Link 6 Link 7
0 0x00 0x000000000130e83a 0x00 0x01c0401000000000 0x00 0x0000000000000000 0x00 0x00000000000002fe 0x00 0x000000000130e83a 0x00 0x01c0401000000000 0x00 0x0000000000000000 0x00 0x00000000000002fe
1 0x00 0x0231244900000000 0x00 0x0210d43500c00000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0231244900000000 0x00 0x0210d43500c00000 0x00 0x0000000000000000 0x00 0x0000000000000000
2 0x00 0x0040000002411846 0x00 0x01c1405000100000 0x00 0x02306c1b0190f03c 0x00 0x02306c1b0190f03c 0x00 0x0040000002411846 0x00 0x01c1405000100000 0x00 0x02306c1b0190f03c 0x00 0x02306c1b0190f03c
3 0x00 0x0120942500000000 0x00 0x0000000001910842 0x00 0x00816c5b00000000 0x00 0x00816c5b00000000 0x00 0x0120942500000000 0x00 0x0000000001910842 0x00 0x00816c5b00000000 0x00 0x00816c5b00000000
4 0x00 0x0230000000000000 0x00 0x0200000000000000 0x00 0x01c0300c00000000 0x00 0x01c0300c00000000 0x00 0x0230000000000000 0x00 0x0200000000000000 0x00 0x01c0300c00000000 0x00 0x01c0300c00000000
5 0x00 0x000000000030e038 0x00 0x0030000002310c43 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x000000000030e038 0x00 0x0030000002310c43 0x00 0x0000000000000000 0x00 0x0000000000000000
12 changes: 12 additions & 0 deletions JetAlgo/hls/vivado_hls/data/test_SLR0.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions JetAlgo/hls/vivado_hls/data/test_out.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Automatically generated

# CLK Link 0 Link 1 Link 2 Link 3 Link 4 Link 5 Link 6 Link 7 Link 8 Link 9
0 0x00 0x0000003b9c000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
1 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
2 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
0 0x00 0x0e26405f3959011c 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
1 0x00 0x0e234076ba7001cb 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
2 0x00 0x000000003b240288 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
3 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
4 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
5 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
Expand Down
6 changes: 3 additions & 3 deletions JetAlgo/hls/vivado_hls/data/test_out_ref.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Automatically generated

# CLK Link 0 Link 1 Link 2 Link 3 Link 4 Link 5 Link 6 Link 7 Link 8 Link 9
0 0x00 0x0000003b9c000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
1 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
2 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
0 0x00 0x0e26405f3959011c 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
1 0x00 0x0e234076ba7001cb 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
2 0x00 0x000000003b240288 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
3 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
4 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
5 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000 0x00 0x0000000000000000
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
#include "bitonicSort128.h"

void bitonic32Dec(din_t in2[N], din_t out2[N]){

#pragma HLS PIPELINE II=9

#pragma HLS ARRAY_PARTITION variable=in2
#pragma HLS ARRAY_PARTITION variable=out2

GreaterSmaller result;

din_t a[N], b[N], c[N], d[N], e[N], f[N], g[N], h[N], l[N], m[N], n[N], o[N], p[N], q[N];
#pragma HLS ARRAY_PARTITION variable=a
#pragma HLS ARRAY_PARTITION variable=b
#pragma HLS ARRAY_PARTITION variable=c
#pragma HLS ARRAY_PARTITION variable=d
#pragma HLS ARRAY_PARTITION variable=e
#pragma HLS ARRAY_PARTITION variable=f
#pragma HLS ARRAY_PARTITION variable=g
#pragma HLS ARRAY_PARTITION variable=h
#pragma HLS ARRAY_PARTITION variable=l
#pragma HLS ARRAY_PARTITION variable=m
#pragma HLS ARRAY_PARTITION variable=n
#pragma HLS ARRAY_PARTITION variable=o
#pragma HLS ARRAY_PARTITION variable=p
#pragma HLS ARRAY_PARTITION variable=q

//.........................Starting of first stage.....................//

for(dloop_t i=0; i<N/4; i++){
#pragma HLS unroll
result = AscendDescend(in2[4*i], in2[4*i+1]);
a[4*i] = result.greater; a[4*i+1] = result.smaller;
}

for(dloop_t i=0; i<N/4; i++){
#pragma HLS unroll
result = AscendDescend(in2[4*i+2], in2[4*i+3]);
a[4*i+2] = result.smaller; a[4*i+3] = result.greater;
}

//.........................Starting of second stage......................//

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
FourinSmallFirDec(a[8*i], a[8*i+1], a[8*i+2], a[8*i+3], b[8*i], b[8*i+1], b[8*i+2], b[8*i+3]);
FourinGreatFirDec(a[8*i+4], a[8*i+5], a[8*i+6], a[8*i+7], b[8*i+4], b[8*i+5], b[8*i+6], b[8*i+7]);
}

//....................Starting of third stage.......................//

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(b[8*i], b[8*i+1]);
c[8*i] = result.greater; c[8*i+1] = result.smaller;

result = AscendDescend(b[8*i+2], b[8*i+3]);
c[8*i+2] = result.greater; c[8*i+3] = result.smaller;
}

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(b[8*i+4], b[8*i+5]);
c[8*i+4] = result.smaller; c[8*i+5] = result.greater;

result = AscendDescend(b[8*i+6], b[8*i+7]);
c[8*i+6] = result.smaller; c[8*i+7] = result.greater;
}

//.....................Starting of fourth stage........................//

for(dloop_t i=0; i<N/16; i++){
#pragma HLS unroll
EightinSmallFirDec(c[16*i+0], c[16*i+1], c[16*i+2], c[16*i+3], c[16*i+4], c[16*i+5], c[16*i+6], c[16*i+7],
d[16*i+0], d[16*i+1], d[16*i+2], d[16*i+3], d[16*i+4], d[16*i+5], d[16*i+6], d[16*i+7]);
EightinGreatFirDec(c[16*i+8], c[16*i+9], c[16*i+10], c[16*i+11], c[16*i+12], c[16*i+13], c[16*i+14], c[16*i+15],
d[16*i+8], d[16*i+9], d[16*i+10], d[16*i+11], d[16*i+12], d[16*i+13], d[16*i+14], d[16*i+15]);
}

//.....................Starting of fifth stage..........................//

for(dloop_t i=0; i<N/16; i++){
#pragma HLS unroll
FourinSmallFirDec(d[16*i], d[16*i+1], d[16*i+2], d[16*i+3], e[16*i], e[16*i+1], e[16*i+2], e[16*i+3]);
FourinSmallFirDec(d[16*i+4], d[16*i+5], d[16*i+6], d[16*i+7], e[16*i+4], e[16*i+5], e[16*i+6], e[16*i+7]);
FourinGreatFirDec(d[16*i+8], d[16*i+9], d[16*i+10], d[16*i+11], e[16*i+8], e[16*i+9], e[16*i+10], e[16*i+11]);
FourinGreatFirDec(d[16*i+12], d[16*i+13], d[16*i+14], d[16*i+15], e[16*i+12], e[16*i+13], e[16*i+14], e[16*i+15]);
}

//.....................Starting of sixth stage..........................//

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(e[2*i], e[2*i+1]);
f[2*i] = result.greater; f[2*i+1] = result.smaller;
}

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(e[2*i+8], e[2*i+9]);
f[2*i+8] = result.smaller; f[2*i+9] = result.greater;
}

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(e[2*i+16], e[2*i+17]);
f[2*i+16] = result.greater; f[2*i+17] = result.smaller;
}

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
result = AscendDescend(e[2*i+24], e[2*i+25]);
f[2*i+24] = result.smaller; f[2*i+25] = result.greater;
}

//.....................Starting of seventh stage..........................//

SixteenSmallFirDec(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7],
f[8], f[9], f[10], f[11], f[12], f[13], f[14], f[15],
g[0], g[1], g[2], g[3], g[4], g[5], g[6], g[7], g[8],
g[9], g[10], g[11], g[12], g[13], g[14], g[15]);
SixteenGreatFirDec(f[16], f[17], f[18], f[19], f[20], f[21], f[22], f[23],
f[24], f[25], f[26], f[27], f[28], f[29], f[30], f[31],
g[16], g[17], g[18], g[19], g[20], g[21], g[22], g[23], g[24],
g[25], g[26], g[27], g[28], g[29], g[30], g[31]);


//.....................Starting of eighth stage..........................//

for(dloop_t i=0; i<N/16; i++){
#pragma HLS unroll
EightinSmallFirDec(g[8*i], g[8*i+1], g[8*i+2], g[8*i+3], g[8*i+4], g[8*i+5], g[8*i+6], g[8*i+7],
h[8*i], h[8*i+1], h[8*i+2], h[8*i+3], h[8*i+4], h[8*i+5], h[8*i+6], h[8*i+7]);
}

for(dloop_t i=0; i<N/16; i++){
#pragma HLS unroll
EightinGreatFirDec(g[8*i+16], g[8*i+17], g[8*i+18], g[8*i+19], g[8*i+20], g[8*i+21], g[8*i+22], g[8*i+23],
h[8*i+16], h[8*i+17], h[8*i+18], h[8*i+19], h[8*i+20], h[8*i+21], h[8*i+22], h[8*i+23]);
}

//.....................Starting of ninth stage..........................//

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
FourinSmallFirDec(h[4*i], h[4*i+1], h[4*i+2], h[4*i+3], l[4*i], l[4*i+1], l[4*i+2], l[4*i+3]);
}

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
FourinGreatFirDec(h[4*i+16], h[4*i+17], h[4*i+18], h[4*i+19], l[4*i+16], l[4*i+17], l[4*i+18], l[4*i+19]);
}

//.....................Starting of tenth stage..........................//

for(dloop_t i=0; i<N/4; i++)
{
#pragma HLS unroll
result = AscendDescend(l[2*i], l[2*i+1]);
m[2*i] = result.greater; m[2*i+1] = result.smaller;
}

for(dloop_t i=0; i<N/4; i++){
#pragma HLS unroll
result = AscendDescend(l[2*i+16], l[2*i+17]);
m[2*i+16] = result.smaller; m[2*i+17] = result.greater;
}

//.....................Starting of eleventh stage..........................//

for(dloop_t i=0; i<N/2; i++){
#pragma HLS unroll
result = AscendDescend(m[i], m[i+16]);
n[i] = result.greater; n[i+16] = result.smaller;
}

//.....................Starting of twelfth stage..........................//

for(dloop_t i=0; i<N/16; i++){
#pragma HLS unroll
SixteenSmallFirDec(n[16*i], n[16*i+1], n[16*i+2], n[16*i+3], n[16*i+4], n[16*i+5], n[16*i+6], n[16*i+7],
n[16*i+8], n[16*i+9], n[16*i+10], n[16*i+11], n[16*i+12], n[16*i+13], n[16*i+14], n[16*i+15],
o[16*i+0], o[16*i+1], o[16*i+2], o[16*i+3], o[16*i+4], o[16*i+5], o[16*i+6], o[16*i+7], o[16*i+8],
o[16*i+9], o[16*i+10], o[16*i+11], o[16*i+12], o[16*i+13], o[16*i+14], o[16*i+15]);
}

//.....................Starting of thirteenth stage..........................//

for(dloop_t i=0; i<N/8; i++){
#pragma HLS unroll
EightinSmallFirDec(o[8*i], o[8*i+1], o[8*i+2], o[8*i+3], o[8*i+4], o[8*i+5], o[8*i+6], o[8*i+7],
p[8*i], p[8*i+1], p[8*i+2], p[8*i+3], p[8*i+4], p[8*i+5], p[8*i+6], p[8*i+7]);
}

//.....................Starting of fourteenth stage..........................//

for(dloop_t i=0; i<N/4; i++){
#pragma HLS unroll
FourinSmallFirDec(p[4*i], p[4*i+1], p[4*i+2], p[4*i+3], q[4*i], q[4*i+1], q[4*i+2], q[4*i+3]);
}

//.....................Starting of fifteenth stage..........................//

for(dloop_t i=0; i<N/2; i++){
#pragma HLS unroll
result = AscendDescend(q[2*i], q[2*i+1]);
out2[2*i] = result.greater; out2[2*i+1] = result.smaller;
}

}

Loading