Commit 60cf6149 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

added fences in btw deeper block chan IC and GG + clean gmem in IC


Former-commit-id: c313d04c
parent 3f211e8f
......@@ -358,12 +358,28 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
mem_fence(CLK_CHANNEL_MEM_FENCE);
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_genes; pipe_cnt++) {
#if 0
#if defined(SINGLE_COPY_POP_ENE)
LocalPopCurr[pop_cnt][pipe_cnt & MASK_GENOTYPE] = GlobPopCurr[pop_cnt*ACTUAL_GENOTYPE_LENGTH + pipe_cnt];
#else
LocalPopCurr[pop_cnt][pipe_cnt & MASK_GENOTYPE] = GlobPopulationCurrent[pop_cnt*ACTUAL_GENOTYPE_LENGTH + pipe_cnt];
#endif
write_channel_altera(chan_IC2Conf_genotype, LocalPopCurr[pop_cnt][pipe_cnt & MASK_GENOTYPE]);
#endif
#if 1
float tmp_ic;
#if defined(SINGLE_COPY_POP_ENE)
tmp_ic = GlobPopCurr[pop_cnt*ACTUAL_GENOTYPE_LENGTH + pipe_cnt];
#else
tmp_ic = GlobPopulationCurrent[pop_cnt*ACTUAL_GENOTYPE_LENGTH + pipe_cnt];
#endif
LocalPopCurr[pop_cnt][pipe_cnt & MASK_GENOTYPE] = tmp_ic;
write_channel_altera(chan_IC2Conf_genotype, tmp_ic);
#endif
}
#if defined (DEBUG_KRNL_IC)
......@@ -371,7 +387,7 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
#endif
// Read energy
/*
#if 0
float energyIA_IC_rx;
float energyIE_IC_rx;
bool intra_valid = false;
......@@ -384,13 +400,14 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
energyIE_IC_rx = read_channel_nb_altera(chan_Intere2StoreIC_intere, &inter_valid);
}
}
*/
///*
#endif
#if 1
mem_fence(CLK_CHANNEL_MEM_FENCE);
float energyIA_IC_rx = read_channel_altera(chan_Intrae2StoreIC_intrae);
float energyIE_IC_rx = read_channel_altera(chan_Intere2StoreIC_intere);
mem_fence(CLK_CHANNEL_MEM_FENCE);
//*/
float energyIE_IC_rx = read_channel_altera(chan_Intere2StoreIC_intere);
#endif
LocalEneCurr[pop_cnt] = energyIA_IC_rx + energyIE_IC_rx;
#if defined (DEBUG_KRNL_IC)
......@@ -616,7 +633,7 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
#endif
// Read energy
/*
#if 0
float energyIA_GG_rx;
float energyIE_GG_rx;
bool intra_valid = false;
......@@ -629,13 +646,14 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
energyIE_GG_rx = read_channel_nb_altera(chan_Intere2StoreGG_intere, &inter_valid);
}
}
*/
///*
#endif
#if 1
mem_fence(CLK_CHANNEL_MEM_FENCE);
float energyIA_GG_rx = read_channel_altera(chan_Intrae2StoreGG_intrae);
float energyIE_GG_rx = read_channel_altera(chan_Intere2StoreGG_intere);
mem_fence(CLK_CHANNEL_MEM_FENCE);
//*/
float energyIE_GG_rx = read_channel_altera(chan_Intere2StoreGG_intere);
#endif
LocalEneNext[new_pop_cnt] = energyIA_GG_rx + energyIE_GG_rx;
#if defined (DEBUG_KRNL_GG)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment