Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock-fpga
Commits
8686b14a
Commit
8686b14a
authored
May 27, 2018
by
Leonardo Solis
Browse files
solved some deadlocks
Former-commit-id:
2ded3b42
parent
cb34a294
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
common_xilinx/utility/boards.mk
View file @
8686b14a
...
...
@@ -7,6 +7,402 @@ PROFILE ?= no
# Default C++ Compiler Flags and xocc compiler flags
CXXFLAGS
:=
-Wall
-O0
-g
-std
=
c++14
# =============================
# Enable Kernels
# =============================
ENABLE_K1
=
YES
ENABLE_K2
=
YES
ENABLE_K3
=
YES
ENABLE_K4
=
YES
# Prng kernels
# bt prng float
ENABLE_K5
=
NO
ENABLE_K6
=
YES
ENABLE_K7
=
YES
# bt prng ushort (check kernel36)
ENABLE_K8
=
NO
# ls1 prng
ENABLE_K9
=
NO
ENABLE_K10
=
YES
# Replace single Krnl_Prng_Arbiter
# See kernels 31, 32, 33, 34
ENABLE_K11
=
NO
# LS kernels
ENABLE_K12
=
YES
# disable Krnl_LS_Arbiter
ENABLE_K13
=
NO
ENABLE_K14
=
YES
ENABLE_K15
=
YES
# disable Krnl_LS2_Arbiter
ENABLE_K16
=
NO
#ENABLE_K17 = YES
#ENABLE_K18 = YES
#ENABLE_K19 = YES
ENABLE_K20
=
YES
ENABLE_K21
=
YES
# disable Krnl_LS3_Arbiter
ENABLE_K22
=
NO
#ENABLE_K23 = YES
#ENABLE_K24 = YES
# PRNGS in GA for LS2 and LS3
# ls2 & ls3 prng (ls1 is K9)
# replacement is K35
ENABLE_K25
=
NO
ENABLE_K26
=
NO
ENABLE_K27
=
YES
# IA Pipeline
ENABLE_K28
=
NO
ENABLE_K29
=
NO
ENABLE_K30
=
NO
# BT, GG, LS_ushort, LS_float arbiters
ENABLE_K31
=
NO
ENABLE_K32
=
NO
ENABLE_K33
=
NO
ENABLE_K34
=
NO
# ls123 prng
ENABLE_K35
=
YES
# bt ushort_float
ENABLE_K36
=
YES
# prng ls4, ls5
ENABLE_K37
=
YES
ENABLE_K38
=
YES
# krnl_ls4, Krnl_ls5
ENABLE_K39
=
YES
ENABLE_K40
=
YES
# prng ls6, ls7, ls8, ls9
ENABLE_K41
=
YES
ENABLE_K42
=
YES
ENABLE_K43
=
YES
ENABLE_K44
=
YES
# krnl_ls6, Krnl_ls7, krnl_ls8, Krnl_ls9
ENABLE_K45
=
YES
ENABLE_K46
=
YES
ENABLE_K47
=
YES
ENABLE_K48
=
YES
ifeq
($(ENABLE_K1),YES)
K1
=
-DENABLE_KERNEL1
else
K1
=
endif
ifeq
($(ENABLE_K2),YES)
K2
=
-DENABLE_KERNEL2
else
K2
=
endif
ifeq
($(ENABLE_K3),YES)
K3
=
-DENABLE_KERNEL3
else
K3
=
endif
ifeq
($(ENABLE_K4),YES)
K4
=
-DENABLE_KERNEL4
else
K4
=
endif
ifeq
($(ENABLE_K5),YES)
K5
=
-DENABLE_KERNEL5
else
K5
=
endif
ifeq
($(ENABLE_K6),YES)
K6
=
-DENABLE_KERNEL6
else
K6
=
endif
ifeq
($(ENABLE_K7),YES)
K7
=
-DENABLE_KERNEL7
else
K7
=
endif
ifeq
($(ENABLE_K8),YES)
K8
=
-DENABLE_KERNEL8
else
K8
=
endif
ifeq
($(ENABLE_K9),YES)
K9
=
-DENABLE_KERNEL9
else
K9
=
endif
ifeq
($(ENABLE_K10),YES)
K10
=
-DENABLE_KERNEL10
else
K10
=
endif
ifeq
($(ENABLE_K11),YES)
K11
=
-DENABLE_KERNEL11
else
K11
=
endif
ifeq
($(ENABLE_K12),YES)
K12
=
-DENABLE_KERNEL12
else
K12
=
endif
ifeq
($(ENABLE_K13),YES)
K13
=
-DENABLE_KERNEL13
else
K13
=
endif
ifeq
($(ENABLE_K14),YES)
K14
=
-DENABLE_KERNEL14
else
K14
=
endif
ifeq
($(ENABLE_K15),YES)
K15
=
-DENABLE_KERNEL15
else
K15
=
endif
ifeq
($(ENABLE_K16),YES)
K16
=
-DENABLE_KERNEL16
else
K16
=
endif
ifeq
($(ENABLE_K17),YES)
K17
=
-DENABLE_KERNEL17
else
K17
=
endif
ifeq
($(ENABLE_K18),YES)
K18
=
-DENABLE_KERNEL18
else
K18
=
endif
ifeq
($(ENABLE_K19),YES)
K19
=
-DENABLE_KERNEL19
else
K19
=
endif
ifeq
($(ENABLE_K20),YES)
K20
=
-DENABLE_KERNEL20
else
K20
=
endif
ifeq
($(ENABLE_K21),YES)
K21
=
-DENABLE_KERNEL21
else
K21
=
endif
ifeq
($(ENABLE_K22),YES)
K22
=
-DENABLE_KERNEL22
else
K22
=
endif
ifeq
($(ENABLE_K23),YES)
K23
=
-DENABLE_KERNEL23
else
K23
=
endif
ifeq
($(ENABLE_K24),YES)
K24
=
-DENABLE_KERNEL24
else
K24
=
endif
ifeq
($(ENABLE_K25),YES)
K25
=
-DENABLE_KERNEL25
else
K25
=
endif
ifeq
($(ENABLE_K26),YES)
K26
=
-DENABLE_KERNEL26
else
K26
=
endif
ifeq
($(ENABLE_K27),YES)
K27
=
-DENABLE_KERNEL27
else
K27
=
endif
ifeq
($(ENABLE_K28),YES)
K28
=
-DENABLE_KERNEL28
else
K28
=
endif
ifeq
($(ENABLE_K29),YES)
K29
=
-DENABLE_KERNEL29
else
K29
=
endif
ifeq
($(ENABLE_K30),YES)
K30
=
-DENABLE_KERNEL30
else
K30
=
endif
ifeq
($(ENABLE_K31),YES)
K31
=
-DENABLE_KERNEL31
else
K31
=
endif
ifeq
($(ENABLE_K32),YES)
K32
=
-DENABLE_KERNEL32
else
K32
=
endif
ifeq
($(ENABLE_K33),YES)
K33
=
-DENABLE_KERNEL33
else
K33
=
endif
ifeq
($(ENABLE_K34),YES)
K34
=
-DENABLE_KERNEL34
else
K34
=
endif
ifeq
($(ENABLE_K35),YES)
K35
=
-DENABLE_KERNEL35
else
K35
=
endif
ifeq
($(ENABLE_K36),YES)
K36
=
-DENABLE_KERNEL36
else
K36
=
endif
ifeq
($(ENABLE_K37),YES)
K37
=
-DENABLE_KERNEL37
else
K37
=
endif
ifeq
($(ENABLE_K38),YES)
K38
=
-DENABLE_KERNEL38
else
K38
=
endif
ifeq
($(ENABLE_K39),YES)
K39
=
-DENABLE_KERNEL39
else
K39
=
endif
ifeq
($(ENABLE_K40),YES)
K40
=
-DENABLE_KERNEL40
else
K40
=
endif
ifeq
($(ENABLE_K41),YES)
K41
=
-DENABLE_KERNEL41
else
K41
=
endif
ifeq
($(ENABLE_K42),YES)
K42
=
-DENABLE_KERNEL42
else
K42
=
endif
ifeq
($(ENABLE_K43),YES)
K43
=
-DENABLE_KERNEL43
else
K43
=
endif
ifeq
($(ENABLE_K44),YES)
K44
=
-DENABLE_KERNEL44
else
K44
=
endif
ifeq
($(ENABLE_K45),YES)
K45
=
-DENABLE_KERNEL45
else
K45
=
endif
ifeq
($(ENABLE_K46),YES)
K46
=
-DENABLE_KERNEL46
else
K46
=
endif
ifeq
($(ENABLE_K47),YES)
K47
=
-DENABLE_KERNEL47
else
K47
=
endif
ifeq
($(ENABLE_K48),YES)
K48
=
-DENABLE_KERNEL48
else
K48
=
endif
# =============================
# Reproduce result (remove randomness)
# =============================
...
...
@@ -162,7 +558,8 @@ FIPO_FLAG = $(FIPOCO_FLAG) \
#CLFLAGS:= --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s
#CLFLAGS:= --xp "param:compiler.version=31" --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s
#CLFLAGS:= --xp "param:compiler.version=31" --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s -I./ -I../ -I./device
CLFLAGS
:=
--xp
"param:compiler.version=31"
--xp
"param:compiler.preserveHlsOutput=1"
--xp
"param:compiler.generateExtraRunData=true"
-s
-I
./
-I
../
-I
./device
$(REP)
$(FIPO_FLAG)
#CLFLAGS:= --xp "param:compiler.version=31" --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s -I./ -I../ -I./device $(REP) $(FIPO_FLAG)
CLFLAGS
:=
--xp
"param:compiler.version=31"
--xp
"param:compiler.preserveHlsOutput=1"
--xp
"param:compiler.generateExtraRunData=true"
-s
-g
-I
./
-I
../
-I
./device
$(REP)
$(FIPO_FLAG)
ifneq
($(REPORT),none)
...
...
ofdock_taskpar_xl/Makefile
View file @
8686b14a
...
...
@@ -634,5 +634,7 @@ include $(COMMON_REPO)/utility/rules.mk
# Automate test
# "exe" and "xclbin" are rules from "rules.mk"
emu
:
XCL_EMULATION_MODE
=
sw_emu ./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
1
-nev
100
-lsit
10
XCL_EMULATION_MODE
=
sw_emu ./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
1
-nev
100
-lsit
10
-psize
10
debug
:
XCL_EMULATION_MODE
=
sw_emu xgdb
-args
./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
1
-nev
100
-lsit
10
-psize
10
ofdock_taskpar_xl/device/Krnl_Conform.cl
View file @
8686b14a
...
...
@@ -169,9 +169,9 @@ while(active) {
#
endif
}
#
if
defined
(
DEBUG_ACTIVE_KERNEL
)
//
#
if
defined
(
DEBUG_ACTIVE_KERNEL
)
if
(
active
==
0x00
)
{printf
(
" %-20s: %s\n"
,
"Krnl_Conform"
,
"must be disabled"
)
;}
#
endif
//
#
endif
for
(
ushort
rotation_counter
=
0
; rotation_counter < DockConst_rotbondlist_length; rotation_counter++)
{
...
...
@@ -517,9 +517,9 @@ while(active) {
}
//
End
of
while
(
active
)
#
if
defined
(
DEBUG_ACTIVE_KERNEL
)
//
#if
defined
(
DEBUG_ACTIVE_KERNEL
)
printf
(
" %-20s: %s\n"
,
"Krnl_Conform"
,
"disabled"
)
;
#
endif
//
#endif
}
//
--------------------------------------------------------------------------
...
...
ofdock_taskpar_xl/device/Krnl_GA.cl
View file @
8686b14a
...
...
@@ -564,9 +564,9 @@ void Krnl_GA(
LocalEneCurr[pop_cnt] = energyIA_IC_rx + energyIE_IC_rx;
#if defined (DEBUG_KRNL_IC)
//
#if defined (DEBUG_KRNL_IC)
printf(", IC - rx pop: %u\n", pop_cnt);
#endif
//
#endif
}
// ------------------------------------------------------------------
...
...
@@ -662,9 +662,9 @@ void Krnl_GA(
LocalEneNext[0] = loc_energies[best_entity];
}
#if defined (DEBUG_KRNL_GA)
//
#if defined (DEBUG_KRNL_GA)
printf("Krnl_GA: %u\n", new_pop_cnt);
#endif
//
#endif
float local_entity_1 [ACTUAL_GENOTYPE_LENGTH];
float local_entity_2 [ACTUAL_GENOTYPE_LENGTH];
...
...
@@ -683,7 +683,7 @@ void Krnl_GA(
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
//printf("test point 1\n");
// Convert: float prng that must be still converted to short
float bt_tmp_uf0 = bt_tmp.s0;
float bt_tmp_uf1 = bt_tmp.s2;
...
...
@@ -741,6 +741,7 @@ void Krnl_GA(
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
//printf("test point 2\n");
uchar covr_point_low;
uchar covr_point_high;
...
...
@@ -765,6 +766,7 @@ void Krnl_GA(
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
//printf("test point 3\n");
for (uchar gene_cnt=0; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
/*
...
...
@@ -775,6 +777,7 @@ void Krnl_GA(
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
//printf("test point 4\n");
float tmp_offspring;
...
...
@@ -811,11 +814,12 @@ void Krnl_GA(
write_channel_altera(chan_GG2Conf_genotype, tmp_offspring);
*/
write_pipe_block(chan_GG2Conf_genotype, &tmp_offspring);
//printf("test point 5\n");
}
#if defined (DEBUG_KRNL_GG)
//
#if defined (DEBUG_KRNL_GG)
printf("GG - tx pop: %u", new_pop_cnt);
#endif
//
#endif
// Read energy
float energyIA_GG_rx;
...
...
@@ -849,13 +853,14 @@ void Krnl_GA(
*/
inter_valid = read_pipe(chan_Intere2StoreGG_intere, &energyIE_GG_rx);
}
//printf("intra_valid: %i, inter_valid: %i\n", intra_valid, inter_valid);
}
//printf("test point 5\n");
LocalEneNext[new_pop_cnt] = energyIA_GG_rx + energyIE_GG_rx;
#if defined (DEBUG_KRNL_GG)
//
#if defined (DEBUG_KRNL_GG)
printf(", GG - rx pop: %u\n", new_pop_cnt);
#endif
//
#endif
}
// ------------------------------------------------------------------
// LS: Local Search
...
...
@@ -876,6 +881,7 @@ void Krnl_GA(
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
printf("test point LS 1\n");
ushort entity_ls1 = entity_ls.s0;
ushort entity_ls2 = entity_ls.s1;
...
...
ofdock_taskpar_xl/device/Krnl_IGL_Arbiter.cl
View file @
8686b14a
This diff is collapsed.
Click to expand it.
ofdock_taskpar_xl/device/Krnl_InterE.cl
View file @
8686b14a
...
...
@@ -501,6 +501,10 @@ while(active) {
case
0x09:
write_pipe_block
(
chan_Intere2StoreLS_LS9_intere,
&final_interE
)
; break;
}
//
--------------------------------------------------------------
#
if
defined
(
DEBUG_KRNL_INTERE
)
printf
(
"AFTER Out INTERE CHANNEL\n"
)
;
#
endif
}
//
End
of
while
(
active
)
...
...
ofdock_taskpar_xl/device/Krnl_IntraE.cl
View file @
8686b14a
...
...
@@ -243,6 +243,10 @@ while(active) {
}
//
--------------------------------------------------------------
#
if
defined
(
DEBUG_KRNL_INTRAE
)
printf
(
"AFTER Out INTRAE CHANNEL\n"
)
;
#
endif
}
//
End
of
while
(
active
)
#
if
defined
(
DEBUG_ACTIVE_KERNEL
)
...
...
ofdock_taskpar_xl/device/Krnl_PRNG.cl
View file @
8686b14a
...
...
@@ -21,7 +21,8 @@ void Krnl_Prng_BT_ushort_float(unsigned int Host_seed1,
/*
while
(
!valid
)
{
*/
while
(
valid
==
0
)
{
while
(
valid
!=
0
)
{
bool
active
=
true
;
/*
active
=
read_channel_nb_altera
(
chan_Arbiter_BT_ushort_float_off,
&valid
)
;
...
...
@@ -54,14 +55,16 @@ void Krnl_Prng_BT_ushort_float(unsigned int Host_seed1,
/*
if
(
!valid
)
{
*/
if
(
valid
=
=
0
)
{
if
(
valid
!
=
0
)
{
float8
tmp
=
{*
(
float*
)
&u_tmp[0],
f_tmp[0],
*
(
float*
)
&u_tmp[1],
f_tmp[1],
*
(
float*
)
&u_tmp[2],
f_tmp[2],
*
(
float*
)
&u_tmp[3],
f_tmp[3]}
;
/*
success
=
write_channel_nb_altera
(
chan_PRNG2GA_BT_ushort_float_prng,
tmp
)
;
*/
success
=
write_pipe
(
chan_PRNG2GA_BT_ushort_float_prng,
&tmp
)
;
}
}
/*//
End
of
while
(
!valid
)
*/
...
...
@@ -86,7 +89,7 @@ void Krnl_Prng_GG_uchar(unsigned int Host_seed,
/*
while
(
!valid
)
{
*/
while
(
valid
=
=
0
)
{
while
(
valid
!
=
0
)
{
bool
active
=
true
;
/*
active
=
read_channel_nb_altera
(
chan_Arbiter_GG_uchar_off,
&valid
)
;
...
...
@@ -116,7 +119,7 @@ void Krnl_Prng_GG_uchar(unsigned int Host_seed,
/*
if
(
!valid
)
{
*/
if
(
valid
=
=
0
)
{
if
(
valid
!
=
0
)
{
/*
success
=
write_channel_nb_altera
(
chan_PRNG2GA_GG_uchar_prng,
utmp
)
;
*/
...
...
@@ -141,7 +144,7 @@ void Krnl_Prng_GG_float(unsigned int Host_seed,
/*
while
(
!valid
)
{
*/
while
(
valid
=
=
0
)
{
while
(
valid
!
=
0
)
{
bool
active
=
true
;
/*
...
...
@@ -164,7 +167,7 @@ void Krnl_Prng_GG_float(unsigned int Host_seed,
/*
if
(
!valid
)
{
*/
if
(
valid
=
=
0
)
{
if
(
valid
!
=
0
)
{
/*
success
=
write_channel_nb_altera
(
chan_PRNG2GA_GG_float_prng,
tmp
)
;
*/
...
...
@@ -211,7 +214,7 @@ void Krnl_Prng_LS123_ushort(unsigned int Host_seed1,
/*
while
(
!valid
)
{
*/
while
(
valid
=
=
0
)
{
while
(
valid
!
=
0
)
{
bool
active
=
true
;
/*
active
=
read_channel_nb_altera
(
chan_Arbiter_LS123_ushort_off,
&valid
)
;
...
...
@@ -269,7 +272,7 @@ void Krnl_Prng_LS123_ushort(unsigned int Host_seed1,
/*
if
(
!valid
)
{