Commit ff9cb6f0 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

added pipeline-loop attributes

parent 5470d1a7
......@@ -48,11 +48,13 @@ void Krnl_Conform(
__local int rotlist_localcache [MAX_NUM_OF_ROTATIONS];
__attribute__((xcl_pipeline_loop))
LOOP_FOR_CONFORM_ROTBONDLIST:
for (ushort c = 0; c < DockConst_rotbondlist_length; c++) {
rotlist_localcache [c] = KerConstStatic_rotlist_const [c];
}
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_CONFORM_MAIN:
while(active) {
char mode;
......@@ -110,6 +112,7 @@ while(active) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_CONFORM_READ_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
float fl_tmp;
......@@ -175,6 +178,7 @@ while(active) {
if (active == 0x00) {printf(" %-20s: %s\n", "Krnl_Conform", "must be disabled");}
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_CONFORM_MAIN:
for (ushort rotation_counter = 0; rotation_counter < DockConst_rotbondlist_length; rotation_counter++)
{
......@@ -465,6 +469,7 @@ while(active) {
}
*/
__attribute__((xcl_pipeline_loop))
LOOP_FOR_CONFORM_WRITE_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
if (pipe_cnt == 0) {
......
......@@ -37,6 +37,7 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
uint LS3_eval = 0;
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_IGL_MAIN:
while(active) {
/*
......@@ -94,6 +95,7 @@ while(active) {
(LS8_end_valid == false) &&
(LS9_end_valid == false)
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_IGL_INNER:
while (
(Off_valid != 0) &&
......@@ -1373,6 +1375,7 @@ while(active) {
uchar bound = active ? bound_tmp : 1;
// Send "mode" to Conform
__attribute__((xcl_pipeline_loop))
LOOP_FOR_IGL_WRITE_MODE:
for (uchar j=0; j<bound; j++) {
#if 0
......
......@@ -37,6 +37,7 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
uint LS3_eval = 0;
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_IGL_MAIN:
while(active) {
/*
......@@ -93,6 +94,7 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
(LS8_end_valid == false) &&
(LS9_end_valid == false)
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_IGL_INNER:
while (
(Off_valid != 0) &&
......@@ -166,6 +168,7 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
} // End if (active == 0x01)
// Send "mode" to Conform
__attribute__((xcl_pipeline_loop))
LOOP_FOR_IGL_WRITE_MODE:
for (uchar j=0; j<9; j++) {
bool enable_write_channel = false;
......
......@@ -52,6 +52,7 @@ void Krnl_InterE(
__global const float* GlobFgrids2 = & GlobFgrids [Host_mul_tmp2];
__global const float* GlobFgrids3 = & GlobFgrids [Host_mul_tmp3];
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_INTERE_MAIN:
while(active) {
......@@ -85,6 +86,7 @@ while(active) {
active = actmode;
mode = actmode;
__attribute__((xcl_pipeline_loop))
LOOP_FOR_INTERE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
......
......@@ -45,11 +45,14 @@ void Krnl_IntraE(
char active = 0x01;
__local char3 intraE_contributors_localcache [MAX_INTRAE_CONTRIBUTORS];
__attribute__((xcl_pipeline_loop))
LOOP_FOR_INTRAE_CONTRIBUTORS:
for (ushort i=0; i<MAX_INTRAE_CONTRIBUTORS; i++) {
intraE_contributors_localcache [i] = KerConstStatic_intraE_contributors_const [i];
}
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_INTRAE_MAIN:
while(active) {
char mode;
......@@ -81,6 +84,7 @@ while(active) {
active = actmode;
mode = actmode;
__attribute__((xcl_pipeline_loop))
LOOP_FOR_INTRAE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
......@@ -95,7 +99,6 @@ while(active) {
loc_coords[pipe_cnt+1] = tmp2;
}
// --------------------------------------------------------------
//printf("AFTER In INTRA CHANNEL\n");
......
......@@ -42,7 +42,8 @@ void Krnl_LS(
bool valid = true;
LOOP_WHILE_LS_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS_MAIN:
while(valid) {
/*
bool active;
......@@ -62,6 +63,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -89,6 +91,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS1)
......@@ -119,6 +122,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS_ITERATION_RHO:
#if defined (FIXED_POINT_LS1)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -196,6 +200,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -289,6 +294,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -393,6 +399,7 @@ while(valid) {
#endif
// write back data to GA
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
......
......@@ -42,7 +42,8 @@ void Krnl_LS2(
bool valid = true;
LOOP_WHILE_LS2_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS2_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS2_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -87,6 +89,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS2)
......@@ -121,6 +124,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS2_ITERATION_RHO:
#if defined (FIXED_POINT_LS2)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -198,6 +202,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -291,6 +296,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS2_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -327,6 +333,7 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -344,6 +351,7 @@ while(valid) {
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
......@@ -360,6 +368,7 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -375,6 +384,7 @@ while(valid) {
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
......@@ -395,6 +405,7 @@ while(valid) {
#endif
// write back data to GA
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS2_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
......
......@@ -42,7 +42,8 @@ void Krnl_LS3(
bool valid = true;
LOOP_WHILE_LS3_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS3_MAIN:
while(valid) {
/*
bool active;
......@@ -62,6 +63,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS3_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -88,6 +90,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS3)
......@@ -122,6 +125,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS3_ITERATION_RHO:
#if defined (FIXED_POINT_LS3)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -199,6 +203,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -292,6 +297,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS3_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -327,7 +333,7 @@ while(valid) {
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -343,7 +349,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
......@@ -360,7 +366,7 @@ while(valid) {
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -375,7 +381,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
......@@ -396,6 +402,7 @@ while(valid) {
#endif
// write back data to GA
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS3_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
......
......@@ -42,7 +42,8 @@ void Krnl_LS4(
bool valid = true;
LOOP_WHILE_LS4_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS4_MAIN:
while(valid) {
/*
bool active;
......@@ -62,6 +63,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS4_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -88,6 +90,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS4)
......@@ -122,6 +125,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS4_ITERATION_RHO:
#if defined (FIXED_POINT_LS4)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -199,6 +203,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -292,6 +297,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS4_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -322,9 +328,10 @@ while(valid) {
#if defined (FIXED_POINT_LS4)
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -341,7 +348,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
......@@ -355,9 +362,10 @@ while(valid) {
}
#else
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -372,7 +380,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
......@@ -393,6 +401,7 @@ while(valid) {
#endif
// write back data to GA
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS4_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
......
......@@ -42,7 +42,8 @@ void Krnl_LS5(
bool valid = true;
LOOP_WHILE_LS5_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS5_MAIN:
while(valid) {
/*
bool active;
......@@ -62,6 +63,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS5_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -88,6 +90,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS5)
......@@ -122,6 +125,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS5_ITERATION_RHO:
#if defined (FIXED_POINT_LS5)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -198,6 +202,7 @@ while(valid) {
*/
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -291,6 +296,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS5_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -324,9 +330,10 @@ while(valid) {
#if defined (FIXED_POINT_LS5)
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -343,7 +350,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
......@@ -357,9 +364,10 @@ while(valid) {
}
#else
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -374,7 +382,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
......@@ -395,6 +403,7 @@ while(valid) {
#endif
// write back data to GA
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS5_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
......
......@@ -42,7 +42,8 @@ void Krnl_LS6(
bool valid = true;
LOOP_WHILE_LS6_MAIN:
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS6_MAIN:
while(valid) {
/*
bool active;
......@@ -62,6 +63,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS6_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
......@@ -88,6 +90,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS6)
......@@ -121,6 +124,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS6_ITERATION_RHO:
#if defined (FIXED_POINT_LS6)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
......@@ -198,6 +202,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
......@@ -291,6 +296,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_WHILE_LS6_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -326,7 +332,7 @@ while(valid) {
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -343,7 +349,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
......@@ -359,7 +365,7 @@ while(valid) {
if (candidate_energy < current_energy) {
// updating offspring_genotype
// updating genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -374,7 +380,7 @@ while(valid) {
}
else {
// updating (halving) genotype_bias
__attribute__((xcl_pipeline_loop))
LOOP_FOR_LS6_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
......@@ -395,6 +401,7 @@ while(valid) {
#endif
// write back data to GA