Skip to content
GitLab
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
62cdefaf
Commit
62cdefaf
authored
Sep 13, 2018
by
Leonardo Solis
Browse files
cleanup read_pipe comments
parent
fb4ece42
Changes
16
Hide whitespace changes
Inline
Side-by-side
ofdock_taskpar_xl/device/Krnl_Conform.cl
View file @
62cdefaf
...
...
@@ -93,9 +93,6 @@ while(active) {
float3
loc_coords
[MAX_NUM_OF_ATOMS]
;
#
endif
/*
char2
actmode
=
read_channel_altera
(
chan_IGL2Conform_actmode
)
;
*/
char
actmode
;
read_pipe_block
(
chan_IGL2Conform_actmode,
&actmode
)
;
/*
...
...
@@ -117,21 +114,8 @@ while(active) {
for
(
uchar
i=0
; i<DockConst_num_of_genes; i++) {
float
fl_tmp
;
switch
(
mode
)
{
/*
case
'I
'
:
fl_tmp
=
read_channel_altera
(
chan_IC2Conf_genotype
)
; break;
case
'G
'
:
fl_tmp
=
read_channel_altera
(
chan_GG2Conf_genotype
)
; break;
case
0x01:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS1_genotype
)
; break;
case
0x02:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS2_genotype
)
; break;
case
0x03:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS3_genotype
)
; break;
case
0x04:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS4_genotype
)
; break;
case
0x05:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS5_genotype
)
; break;
case
0x06:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS6_genotype
)
; break;
case
0x07:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS7_genotype
)
; break;
case
0x08:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS8_genotype
)
; break;
case
0x09:
fl_tmp
=
read_channel_altera
(
chan_LS2Conf_LS9_genotype
)
; break;
*/
case
'I
'
:
read_pipe_block
(
chan_IC2Conf_genotype,
&fl_tmp
)
; break;
case
'G
'
:
read_pipe_block
(
chan_GG2Conf_genotype,
&fl_tmp
)
; break;
case
'I
'
:
read_pipe_block
(
chan_IC2Conf_genotype,
&fl_tmp
)
; break;
case
'G
'
:
read_pipe_block
(
chan_GG2Conf_genotype,
&fl_tmp
)
; break;
case
0x01:
read_pipe_block
(
chan_LS2Conf_LS1_genotype,
&fl_tmp
)
; break;
case
0x02:
read_pipe_block
(
chan_LS2Conf_LS2_genotype,
&fl_tmp
)
; break;
case
0x03:
read_pipe_block
(
chan_LS2Conf_LS3_genotype,
&fl_tmp
)
; break;
...
...
ofdock_taskpar_xl/device/Krnl_GA.cl
View file @
62cdefaf
...
...
@@ -590,19 +590,12 @@ void Krnl_GA(
if (intra_valid == false) {
*/
if (intra_valid != 0) {
/*
energyIA_IC_rx = read_channel_nb_altera(chan_Intrae2StoreIC_intrae, &intra_valid);
*/
intra_valid = read_pipe(chan_Intrae2StoreIC_intrae, &energyIA_IC_rx);
}
/*
else if (inter_valid == false) {
*/
else if (inter_valid != 0) {
/*
energyIE_IC_rx = read_channel_nb_altera(chan_Intere2StoreIC_intere, &inter_valid);
*/
inter_valid = read_pipe(chan_Intere2StoreIC_intere, &energyIE_IC_rx);
}
}
...
...
@@ -716,9 +709,6 @@ void Krnl_GA(
// Get ushort binary_tournament selection prngs (parent index)
// Get float binary_tournament selection prngs (tournament rate)
/*
float8 bt_tmp = read_channel_altera(chan_PRNG2GA_BT_ushort_float_prng);
*/
float8 bt_tmp;
read_pipe_block(chan_PRNG2GA_BT_ushort_float_prng, &bt_tmp);
/*
...
...
@@ -784,9 +774,6 @@ void Krnl_GA(
// get uchar genetic_generation prngs (gene index)
// get float genetic_generation prngs (mutation rate)
/*
uchar2 prng_GG_C = read_channel_altera(chan_PRNG2GA_GG_uchar_prng);
*/
uchar2 prng_GG_C;
read_pipe_block(chan_PRNG2GA_GG_uchar_prng, &prng_GG_C);
/*
...
...
@@ -820,9 +807,6 @@ void Krnl_GA(
__attribute__((xcl_pipeline_loop))
LOOP_FOR_GA_INNER_CROSS_MUT:
for (uchar gene_cnt=0; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
/*
float prngGG = read_channel_altera(chan_PRNG2GA_GG_float_prng);
*/
float prngGG;
read_pipe_block(chan_PRNG2GA_GG_float_prng, &prngGG);
/*
...
...
@@ -889,18 +873,12 @@ void Krnl_GA(
if (intra_valid == false) {
*/
if (intra_valid != 0) {
/*
energyIA_GG_rx = read_channel_nb_altera(chan_Intrae2StoreGG_intrae, &intra_valid);
*/
intra_valid = read_pipe(chan_Intrae2StoreGG_intrae, &energyIA_GG_rx);
}
/*
else if (inter_valid == false) {
*/
else if (inter_valid != 0) {
/*
energyIE_GG_rx = read_channel_nb_altera(chan_Intere2StoreGG_intere, &inter_valid);
*/
inter_valid = read_pipe(chan_Intere2StoreGG_intere, &energyIE_GG_rx);
}
...
...
@@ -928,9 +906,6 @@ void Krnl_GA(
for (ushort ls_ent_cnt=0; ls_ent_cnt<DockConst_num_of_lsentities; ls_ent_cnt+=9) {
// Choose random & different entities on every iteration
/*
ushort16 entity_ls = read_channel_altera(chan_PRNG2GA_LS123_ushort_prng);
*/
ushort16 entity_ls;
read_pipe_block(chan_PRNG2GA_LS123_ushort_prng, &entity_ls);
/*
...
...
@@ -1038,81 +1013,54 @@ void Krnl_GA(
if
(
ls1_done
==
false
)
{
*/
if
(
ls1_done
!=
0
)
{
/*
evalenergy_tmp1
=
read_channel_nb_altera
(
chan_LS2GA_LS1_evalenergy,
&ls1_done
)
;
*/
ls1_done
=
read_pipe
(
chan_LS2GA_LS1_evalenergy,
&evalenergy_tmp1
)
;
}
/*
else
if
(
ls2_done
==
false
)
{
*/
else
if
(
ls2_done
!=
0
)
{
/*
evalenergy_tmp2
=
read_channel_nb_altera
(
chan_LS2GA_LS2_evalenergy,
&ls2_done
)
;
*/
ls2_done
=
read_pipe
(
chan_LS2GA_LS2_evalenergy,
&evalenergy_tmp2
)
;
}
/*
else
if
(
ls3_done
==
false
)
{
*/
else
if
(
ls3_done
!=
0
)
{
/*
evalenergy_tmp3
=
read_channel_nb_altera
(
chan_LS2GA_LS3_evalenergy,
&ls3_done
)
;
*/
ls3_done
=
read_pipe
(
chan_LS2GA_LS3_evalenergy,
&evalenergy_tmp3
)
;
}
/*
else
if
(
ls4_done
==
false
)
{
*/
else
if
(
ls4_done
!=
0
)
{
/*
evalenergy_tmp4
=
read_channel_nb_altera
(
chan_LS2GA_LS4_evalenergy,
&ls4_done
)
;
*/
ls4_done
=
read_pipe
(
chan_LS2GA_LS4_evalenergy,
&evalenergy_tmp4
)
;
}
/*
else
if
(
ls5_done
==
false
)
{
*/
else
if
(
ls5_done
!=
0
)
{
/*
evalenergy_tmp5
=
read_channel_nb_altera
(
chan_LS2GA_LS5_evalenergy,
&ls5_done
)
;
*/
ls5_done
=
read_pipe
(
chan_LS2GA_LS5_evalenergy,
&evalenergy_tmp5
)
;
}
/*
else
if
(
ls6_done
==
false
)
{
*/
else
if
(
ls6_done
!=
0
)
{
/*
evalenergy_tmp6
=
read_channel_nb_altera
(
chan_LS2GA_LS6_evalenergy,
&ls6_done
)
;
*/
ls6_done
=
read_pipe
(
chan_LS2GA_LS6_evalenergy,
&evalenergy_tmp6
)
;
}
/*
else
if
(
ls7_done
==
false
)
{
*/
else
if
(
ls7_done
!=
0
)
{
/*
evalenergy_tmp7
=
read_channel_nb_altera
(
chan_LS2GA_LS7_evalenergy,
&ls7_done
)
;
*/
ls7_done
=
read_pipe
(
chan_LS2GA_LS7_evalenergy,
&evalenergy_tmp7
)
;
}
/*
else
if
(
ls8_done
==
false
)
{
*/
else
if
(
ls8_done
!=
0
)
{
/*
evalenergy_tmp8
=
read_channel_nb_altera
(
chan_LS2GA_LS8_evalenergy,
&ls8_done
)
;
*/
ls8_done
=
read_pipe
(
chan_LS2GA_LS8_evalenergy,
&evalenergy_tmp8
)
;
}
/*
else
if
(
ls9_done
==
false
)
{
*/
else
if
(
ls9_done
!=
0
)
{
/*
evalenergy_tmp9
=
read_channel_nb_altera
(
chan_LS2GA_LS9_evalenergy,
&ls9_done
)
;
*/
ls9_done
=
read_pipe
(
chan_LS2GA_LS9_evalenergy,
&evalenergy_tmp9
)
;
}
}
...
...
@@ -1157,17 +1105,7 @@ void Krnl_GA(
__attribute__
((
xcl_pipeline_loop
))
LOOP_FOR_GA_LS_INNER_READ_GENOTYPE:
for
(
uchar
gene_cnt=0
; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
/*
LocalPopNext[entity_ls1][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS1_genotype
)
;
LocalPopNext[entity_ls2][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS2_genotype
)
;
LocalPopNext[entity_ls3][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS3_genotype
)
;
LocalPopNext[entity_ls4][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS4_genotype
)
;
LocalPopNext[entity_ls5][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS5_genotype
)
;
LocalPopNext[entity_ls6][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS6_genotype
)
;
LocalPopNext[entity_ls7][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS7_genotype
)
;
LocalPopNext[entity_ls8][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS8_genotype
)
;
LocalPopNext[entity_ls9][gene_cnt
&
MASK_GENOTYPE]
=
read_channel_altera
(
chan_LS2GA_LS9_genotype
)
;
*/
read_pipe_block
(
chan_LS2GA_LS1_genotype,
&LocalPopNext[entity_ls1][gene_cnt
&
MASK_GENOTYPE]
)
;
read_pipe_block
(
chan_LS2GA_LS2_genotype,
&LocalPopNext[entity_ls2][gene_cnt
&
MASK_GENOTYPE]
)
;
read_pipe_block
(
chan_LS2GA_LS3_genotype,
&LocalPopNext[entity_ls3][gene_cnt
&
MASK_GENOTYPE]
)
;
...
...
ofdock_taskpar_xl/device/Krnl_IGL_Arbiter.cl
View file @
62cdefaf
...
...
@@ -111,20 +111,6 @@ while(active) {
(
LS8_end_valid
!=
0
)
&&
(
LS9_end_valid
!=
0
)
)
{
/*
Off_active
=
read_channel_nb_altera
(
chan_IGLArbiter_Off,
&Off_valid
)
;
IC_active
=
read_channel_nb_altera
(
chan_GA2IGL_IC_active,
&IC_valid
)
;
GG_active
=
read_channel_nb_altera
(
chan_GA2IGL_GG_active,
&GG_valid
)
;
LS1_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS1_end,
&LS1_end_valid
)
;
LS2_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS2_end,
&LS2_end_valid
)
;
LS3_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS3_end,
&LS3_end_valid
)
;
LS4_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS4_end,
&LS4_end_valid
)
;
LS5_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS5_end,
&LS5_end_valid
)
;
LS6_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS6_end,
&LS6_end_valid
)
;
LS7_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS7_end,
&LS7_end_valid
)
;
LS8_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS8_end,
&LS8_end_valid
)
;
LS9_end_active
=
read_channel_nb_altera
(
chan_LS2Arbiter_LS9_end,
&LS9_end_valid
)
;
*/
Off_valid
=
read_pipe
(
chan_IGLArbiter_Off,
&Off_active
)
;
IC_valid
=
read_pipe
(
chan_GA2IGL_IC_active,
&IC_active
)
;
GG_valid
=
read_pipe
(
chan_GA2IGL_GG_active,
&GG_active
)
;
...
...
ofdock_taskpar_xl/device/Krnl_IGL_SimplifArbiter.cl
View file @
62cdefaf
...
...
@@ -110,20 +110,6 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
(
LS8_end_valid
!=
0
)
&&
(
LS9_end_valid
!=
0
)
)
{
/*
Off_active
=
read_channel_nb_intel
(
chan_IGLArbiter_Off,
&Off_valid
)
;
IC_active
=
read_channel_nb_intel
(
chan_GA2IGL_IC_active,
&IC_valid
)
;
GG_active
=
read_channel_nb_intel
(
chan_GA2IGL_GG_active,
&GG_valid
)
;
LS1_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS1_end,
&LS1_end_valid
)
;
LS2_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS2_end,
&LS2_end_valid
)
;
LS3_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS3_end,
&LS3_end_valid
)
;
LS4_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS4_end,
&LS4_end_valid
)
;
LS5_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS5_end,
&LS5_end_valid
)
;
LS6_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS6_end,
&LS6_end_valid
)
;
LS7_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS7_end,
&LS7_end_valid
)
;
LS8_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS8_end,
&LS8_end_valid
)
;
LS9_end_active
=
read_channel_nb_intel
(
chan_LS2Arbiter_LS9_end,
&LS9_end_valid
)
;
*/
Off_valid
=
read_pipe
(
chan_IGLArbiter_Off,
&Off_active
)
;
IC_valid
=
read_pipe
(
chan_GA2IGL_IC_active,
&IC_active
)
;
GG_valid
=
read_pipe
(
chan_GA2IGL_GG_active,
&GG_active
)
;
...
...
ofdock_taskpar_xl/device/Krnl_InterE.cl
View file @
62cdefaf
...
...
@@ -75,9 +75,6 @@ while(active) {
//
Wait
for
ligand
atomic
coordinates
in
channel
//
--------------------------------------------------------------
/*
char2
actmode
=
read_channel_altera
(
chan_Conf2Intere_actmode
)
;
*/
char
actmode
;
read_pipe_block
(
chan_Conf2Intere_actmode,
&actmode
)
;
/*
...
...
@@ -89,9 +86,6 @@ while(active) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_FOR_INTERE_READ_XYZ:
for
(
uchar
pipe_cnt=0
; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
float8
tmp
=
read_channel_altera
(
chan_Conf2Intere_xyz
)
;
*/
float8
tmp
;
read_pipe_block
(
chan_Conf2Intere_xyz,
&tmp
)
;
...
...
@@ -479,8 +473,8 @@ while(active) {
#
endif
switch
(
mode
)
{
case
'I
'
:
write_pipe_block
(
chan_Intere2StoreIC_intere,
&final_interE
)
;
break;
case
'G
'
:
write_pipe_block
(
chan_Intere2StoreGG_intere,
&final_interE
)
;
break;
case
'I
'
:
write_pipe_block
(
chan_Intere2StoreIC_intere,
&final_interE
)
; break;
case
'G
'
:
write_pipe_block
(
chan_Intere2StoreGG_intere,
&final_interE
)
; break;
case
0x01:
write_pipe_block
(
chan_Intere2StoreLS_LS1_intere,
&final_interE
)
; break;
case
0x02:
write_pipe_block
(
chan_Intere2StoreLS_LS2_intere,
&final_interE
)
; break;
case
0x03:
write_pipe_block
(
chan_Intere2StoreLS_LS3_intere,
&final_interE
)
; break;
...
...
ofdock_taskpar_xl/device/Krnl_IntraE.cl
View file @
62cdefaf
...
...
@@ -73,9 +73,7 @@ while(active) {
//
--------------------------------------------------------------
//
Wait
for
ligand
atomic
coordinates
in
channel
//
--------------------------------------------------------------
/*
char2
actmode
=
read_channel_altera
(
chan_Conf2Intrae_actmode
)
;
*/
char
actmode
;
read_pipe_block
(
chan_Conf2Intrae_actmode,
&actmode
)
;
/*
...
...
@@ -87,9 +85,6 @@ while(active) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_FOR_INTRAE_READ_XYZ:
for
(
uchar
pipe_cnt=0
; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
float8
tmp
=
read_channel_altera
(
chan_Conf2Intrae_xyz
)
;
*/
float8
tmp
;
read_pipe_block
(
chan_Conf2Intrae_xyz,
&tmp
)
;
...
...
@@ -283,8 +278,8 @@ while(active) {
//
Send
intramolecular
energy
to
channel
//
--------------------------------------------------------------
switch
(
mode
)
{
case
'I
'
:
write_pipe_block
(
chan_Intrae2StoreIC_intrae,
&intraE
)
;
break;
case
'G
'
:
write_pipe_block
(
chan_Intrae2StoreGG_intrae,
&intraE
)
;
break;
case
'I
'
:
write_pipe_block
(
chan_Intrae2StoreIC_intrae,
&intraE
)
; break;
case
'G
'
:
write_pipe_block
(
chan_Intrae2StoreGG_intrae,
&intraE
)
; break;
case
0x01:
write_pipe_block
(
chan_Intrae2StoreLS_LS1_intrae,
&intraE
)
; break;
case
0x02:
write_pipe_block
(
chan_Intrae2StoreLS_LS2_intrae,
&intraE
)
; break;
case
0x03:
write_pipe_block
(
chan_Intrae2StoreLS_LS3_intrae,
&intraE
)
; break;
...
...
ofdock_taskpar_xl/device/Krnl_LS.cl
View file @
62cdefaf
...
...
@@ -66,11 +66,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off1_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS1_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off1_active,
&active
)
;
valid_energy
=
read_pipe
(
chan_GA2LS_LS1_energy,
¤t_energy
)
;
}
...
...
@@ -95,17 +90,10 @@ while(valid) {
LOOP_FOR_LS_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS1)
/*
float tmp_gene = read_channel_altera(chan_GA2LS_LS1_genotype);
*/
float tmp_gene;
read_pipe_block(chan_GA2LS_LS1_genotype, &tmp_gene);
genotype [i] = fixedpt_fromfloat(tmp_gene);
#else
/*
genotype [i] = read_channel_altera(chan_GA2LS_LS1_genotype);
*/
read_pipe_block(chan_GA2LS_LS1_genotype, &genotype [i]);
#endif
}
...
...
@@ -189,9 +177,6 @@ while(valid) {
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS_float_prng);
*/
float tmp_prng;
read_pipe_block(chan_PRNG2GA_LS_float_prng, &tmp_prng);
/*
...
...
@@ -282,18 +267,12 @@ while(valid) {
if
(
intra_valid
==
false
)
{
*/
if
(
intra_valid
!=
0
)
{
/*
energyIA_LS_rx
=
read_channel_nb_altera
(
chan_Intrae2StoreLS_LS1_intrae,
&intra_valid
)
;
*/
intra_valid
=
read_pipe
(
chan_Intrae2StoreLS_LS1_intrae,
&energyIA_LS_rx
)
;
}
/*
else
if
(
inter_valid
==
false
)
{
*/
else
if
(
inter_valid
!=
0
)
{
/*
energyIE_LS_rx
=
read_channel_nb_altera
(
chan_Intere2StoreLS_LS1_intere,
&inter_valid
)
;
*/
inter_valid
=
read_pipe
(
chan_Intere2StoreLS_LS1_intere,
&energyIE_LS_rx
)
;
}
}
...
...
ofdock_taskpar_xl/device/Krnl_LS2.cl
View file @
62cdefaf
...
...
@@ -65,10 +65,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS2_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off2_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS2_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off2_active,
&active
)
;
valid_energy
=
read_pipe
(
chan_GA2LS_LS2_energy,
¤t_energy
)
;
}
...
...
@@ -93,17 +89,10 @@ while(valid) {
LOOP_FOR_LS2_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS2)
/*
float tmp_gene = read_channel_altera(chan_GA2LS_LS2_genotype);
*/
float tmp_gene;
read_pipe_block(chan_GA2LS_LS2_genotype, &tmp_gene);
genotype [i] = fixedpt_fromfloat(tmp_gene);
#else
/*
genotype [i] = read_channel_altera(chan_GA2LS_LS2_genotype);
*/
read_pipe_block(chan_GA2LS_LS2_genotype, &genotype [i]);
#endif
}
...
...
@@ -191,15 +180,11 @@ while(valid) {
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS2_float_prng);
*/
float tmp_prng;
read_pipe_block(chan_PRNG2GA_LS2_float_prng, &tmp_prng);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
#if defined (FIXED_POINT_LS2)
fixedpt fixpt_tmp_prng = *(fixedpt*) &tmp_prng;
...
...
@@ -283,18 +268,12 @@ while(valid) {
if
(
intra_valid
==
false
)
{
*/
if
(
intra_valid
!=
0
)
{
/*
energyIA_LS_rx
=
read_channel_nb_altera
(
chan_Intrae2StoreLS_LS2_intrae,
&intra_valid
)
;
*/
intra_valid
=
read_pipe
(
chan_Intrae2StoreLS_LS2_intrae,
&energyIA_LS_rx
)
;
}
/*
else
if
(
inter_valid
==
false
)
{
*/
else
if
(
inter_valid
!=
0
)
{
/*
energyIE_LS_rx
=
read_channel_nb_altera
(
chan_Intere2StoreLS_LS2_intere,
&inter_valid
)
;
*/
inter_valid
=
read_pipe
(
chan_Intere2StoreLS_LS2_intere,
&energyIE_LS_rx
)
;
}
}
...
...
ofdock_taskpar_xl/device/Krnl_LS3.cl
View file @
62cdefaf
...
...
@@ -66,10 +66,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS3_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off3_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS3_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off3_active,
&active
)
;
valid_energy
=
read_pipe
(
chan_GA2LS_LS3_energy,
¤t_energy
)
;
}
...
...
@@ -94,17 +90,10 @@ while(valid) {
LOOP_FOR_LS3_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS3)
/*
float tmp_gene = read_channel_altera(chan_GA2LS_LS3_genotype);
*/
float tmp_gene;
read_pipe_block(chan_GA2LS_LS3_genotype, &tmp_gene);
genotype [i] = fixedpt_fromfloat(tmp_gene);
#else
/*
genotype [i] = read_channel_altera(chan_GA2LS_LS3_genotype);
*/
read_pipe_block(chan_GA2LS_LS3_genotype, &genotype [i]);
#endif
}
...
...
@@ -192,15 +181,11 @@ while(valid) {
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS3_float_prng);
*/
float tmp_prng;
read_pipe_block(chan_PRNG2GA_LS3_float_prng, &tmp_prng);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
#if defined (FIXED_POINT_LS3)
fixedpt fixpt_tmp_prng = *(fixedpt*) &tmp_prng;
...
...
@@ -284,18 +269,12 @@ while(valid) {
if
(
intra_valid
==
false
)
{
*/
if
(
intra_valid
!=
0
)
{
/*
energyIA_LS_rx
=
read_channel_nb_altera
(
chan_Intrae2StoreLS_LS3_intrae,
&intra_valid
)
;
*/
intra_valid
=
read_pipe
(
chan_Intrae2StoreLS_LS3_intrae,
&energyIA_LS_rx
)
;
}
/*
else
if
(
inter_valid
==
false
)
{
*/
else
if
(
inter_valid
!=
0
)
{
/*
energyIE_LS_rx
=
read_channel_nb_altera
(
chan_Intere2StoreLS_LS3_intere,
&inter_valid
)
;
*/
inter_valid
=
read_pipe
(
chan_Intere2StoreLS_LS3_intere,
&energyIE_LS_rx
)
;
}
}
...
...
ofdock_taskpar_xl/device/Krnl_LS4.cl
View file @
62cdefaf
...
...
@@ -66,10 +66,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS4_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off4_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS4_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off4_active,
&active
)
;
valid_energy
=
read_pipe
(
chan_GA2LS_LS4_energy,
¤t_energy
)
;
}
...
...
@@ -94,17 +90,10 @@ while(valid) {
LOOP_FOR_LS4_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS4)
/*
float tmp_gene = read_channel_altera(chan_GA2LS_LS4_genotype);
*/
float tmp_gene;
read_pipe_block(chan_GA2LS_LS4_genotype, &tmp_gene);
genotype [i] = fixedpt_fromfloat(tmp_gene);
#else
/*
genotype [i] = read_channel_altera(chan_GA2LS_LS4_genotype);
*/
read_pipe_block(chan_GA2LS_LS4_genotype, &genotype [i]);
#endif
}
...
...
@@ -192,15 +181,11 @@ while(valid) {
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS4_float_prng);
*/
float tmp_prng;
read_pipe_block(chan_PRNG2GA_LS4_float_prng, &tmp_prng);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
#if defined (FIXED_POINT_LS4)
fixedpt fixpt_tmp_prng = *(fixedpt*) &tmp_prng;
...
...
@@ -284,9 +269,6 @@ while(valid) {
if
(
intra_valid
==
false
)
{
*/
if
(
intra_valid
!=
0
)
{
/*
energyIA_LS_rx
=
read_channel_nb_altera
(
chan_Intrae2StoreLS_LS4_intrae,
&intra_valid
)
;
*/
intra_valid
=
read_pipe
(
chan_Intrae2StoreLS_LS4_intrae,
&energyIA_LS_rx
)
;
}
/*
...
...
ofdock_taskpar_xl/device/Krnl_LS5.cl
View file @
62cdefaf
...
...
@@ -66,10 +66,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS5_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off5_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS5_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off5_active,
&active
)
;
valid_energy
=
read_pipe
(
chan_GA2LS_LS5_energy,
¤t_energy
)
;
}
...
...
@@ -94,17 +90,10 @@ while(valid) {
LOOP_FOR_LS5_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS5)
/*
float tmp_gene = read_channel_altera(chan_GA2LS_LS5_genotype);
*/
float tmp_gene;
read_pipe_block(chan_GA2LS_LS5_genotype, &tmp_gene);
genotype [i] = fixedpt_fromfloat(tmp_gene);
#else
/*
genotype [i] = read_channel_altera(chan_GA2LS_LS5_genotype);
*/
read_pipe_block(chan_GA2LS_LS5_genotype, &genotype [i]);
#endif
}
...
...
@@ -283,18 +272,12 @@ while(valid) {
if
(
intra_valid
==
false
)
{
*/
if
(
intra_valid
!=
0
)
{
/*
energyIA_LS_rx
=
read_channel_nb_altera
(
chan_Intrae2StoreLS_LS5_intrae,
&intra_valid
)
;
*/
intra_valid
=
read_pipe
(
chan_Intrae2StoreLS_LS5_intrae,
&energyIA_LS_rx
)
;
}
/*
else
if
(
inter_valid
==
false
)
{
*/
else
if
(
inter_valid
!=
0
)
{
/*
energyIE_LS_rx
=
read_channel_nb_altera
(
chan_Intere2StoreLS_LS5_intere,
&inter_valid
)
;
*/
inter_valid
=
read_pipe
(
chan_Intere2StoreLS_LS5_intere,
&energyIE_LS_rx
)
;
}
}
...
...
ofdock_taskpar_xl/device/Krnl_LS6.cl
View file @
62cdefaf
...
...
@@ -66,10 +66,6 @@ while(valid) {
__attribute__
((
xcl_pipeline_loop
))
LOOP_WHILE_LS6_ACTIVE:
while
(
(
valid_active
!=
0
)
&&
(
valid_energy
!=
0
))
{
/*
active
=
read_channel_nb_altera
(
chan_GA2LS_Off6_active,
&valid_active
)
;
current_energy
=
read_channel_nb_altera
(
chan_GA2LS_LS6_energy,
&valid_energy
)
;
*/
valid_active
=
read_pipe
(
chan_GA2LS_Off6_active,
&active
)
;