Commit 30f521d9 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

#43, ga-sdx174: all pipe have names in alphanumeric lowercase

parent 261c5d57
......@@ -63,7 +63,7 @@ while(active) {
float3 loc_coords [MAX_NUM_OF_ATOMS];
char actmode;
read_pipe_block(chan_IGL2Conform_actmode, &actmode);
read_pipe_block(pipe00igl2conform00actmode, &actmode);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -79,8 +79,8 @@ while(active) {
for (uchar i=0; i<DockConst_num_of_genes; i++) {
float fl_tmp;
switch (mode) {
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(pipe00ic2conf00genotype, &fl_tmp); break;
case 'G': read_pipe_block(pipe00gg2conf00genotype, &fl_tmp); break;
}
if (i > 2) {
......@@ -238,8 +238,8 @@ while(active) {
LOOP_FOR_CONFORM_WRITE_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
if (pipe_cnt == 0) {
write_pipe_block(chan_Conf2Intere_actmode, &mode);
write_pipe_block(chan_Conf2Intrae_actmode, &mode);
write_pipe_block(pipe00conf2intere00actmode, &mode);
write_pipe_block(pipe00conf2intrae00actmode, &mode);
}
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......@@ -258,8 +258,8 @@ while(active) {
tmp.s0 = tmp_coords[0].x; tmp.s1 = tmp_coords[0].y; tmp.s2 = tmp_coords[0].z; //tmp.s3
tmp.s4 = tmp_coords[1].x; tmp.s5 = tmp_coords[1].y; tmp.s6 = tmp_coords[1].z; //tmp.s7
write_pipe_block(chan_Conf2Intere_xyz, &tmp);
write_pipe_block(chan_Conf2Intrae_xyz, &tmp);
write_pipe_block(pipe00conf2intere00xyz, &tmp);
write_pipe_block(pipe00conf2intrae00xyz, &tmp);
}
// --------------------------------------------------------------
......
......@@ -21,49 +21,49 @@ typedef int nb_pipe_status;
// Send active signal to IGL_Arbiter
// Resized to valid SDAccel depths: 16, 32, ...
pipe int chan_GA2IGL_IC_active __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int chan_GA2IGL_GG_active __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00ga2igl00ic00active __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00ga2igl00gg00active __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
// Send genotypes from producers (IC, GG, LSs) to Conform
pipe float chan_IC2Conf_genotype __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe float chan_GG2Conf_genotype __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe float pipe00ic2conf00genotype __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe float pipe00gg2conf00genotype __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
// Send ligand-atom positions from Conform to InterE & IntraE
// Resized to valid SDAccel depths: 16, 32, ...
pipe float8 chan_Conf2Intere_xyz __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe char chan_Conf2Intere_actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float8 pipe00conf2intere00xyz __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe char pipe00conf2intere00actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float8 chan_Conf2Intrae_xyz __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe char chan_Conf2Intrae_actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float8 pipe00conf2intrae00xyz __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe char pipe00conf2intrae00actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
// Send energy values from InterE & IntraE to genotype-senders (IC, GG, LSs)
// Resized to valid SDAccel depths: 16, 32, ...
pipe float chan_Intere2StoreIC_intere __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float chan_Intere2StoreGG_intere __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float pipe00intere2storeic00intere __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float pipe00intere2storegg00intere __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float chan_Intrae2StoreIC_intrae __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float chan_Intrae2StoreGG_intrae __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float pipe00intrae2storeic00intrae __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float pipe00intrae2storegg00intrae __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
// Send PRNG outputs from generators to consumers
// Resized to valid SDAccel depths: 16, 32, ...
pipe float8 chan_PRNG2GA_BT_ushort_float_prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe uchar2 chan_PRNG2GA_GG_uchar_prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float chan_PRNG2GA_GG_float_prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
pipe float8 pipe00prng2ga00bt00ushort00float00prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe uchar2 pipe00prng2ga00gg00uchar00prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe float pipe00prng2ga00gg00float00prng __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_64)));
// Turn-off signals to PRNG generators
// Resized to valid SDAccel depths: 16, 32, ...
pipe int chan_GA2PRNG_BT_ushort_float_off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int chan_GA2PRNG_GG_uchar_off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int chan_GA2PRNG_GG_float_off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00ga2prng00bt00ushort00float00off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00ga2prng00gg00uchar00off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00ga2prng00gg00float00off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
// Send genotype-producer-pipe selector and genotype
// from IGL_Arbiter to Conform
// Resized to valid SDAccel depths: 16, 32, ...
pipe char chan_IGL2Conform_actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16))); // active, mode
pipe char pipe00igl2conform00actmode __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16))); // active, mode
// Turn-off signal to IGL_Arbiter, Conform, InterE, IntraE
// Resized to valid SDAccel depths: 16, 32, ...
pipe int chan_IGLArbiter_Off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
pipe int pipe00iglarbiter00off __attribute__((xcl_reqd_pipe_depth(PIPE_DEPTH_16)));
// --------------------------------------------------------------------------
// Map the argument into the interval 0 - 180, or 0 - 360
......@@ -155,7 +155,7 @@ void Krnl_GA(
for (ushort pop_cnt = 0; pop_cnt < DockConst_pop_size; pop_cnt++) {
// Calculate energy
const int tmp_int_zero = 0;
write_pipe_block(chan_GA2IGL_IC_active, &tmp_int_zero);
write_pipe_block(pipe00ga2igl00ic00active, &tmp_int_zero);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -166,7 +166,7 @@ void Krnl_GA(
tmp_ic = GlobPopCurrInitial[pop_cnt*ACTUAL_GENOTYPE_LENGTH + gene_cnt];
LocalPopCurr[pop_cnt][gene_cnt & MASK_GENOTYPE] = tmp_ic;
write_pipe_block(chan_IC2Conf_genotype, &tmp_ic);
write_pipe_block(pipe00ic2conf00genotype, &tmp_ic);
}
#if defined (DEBUG_KRNL_IC)
......@@ -185,10 +185,10 @@ void Krnl_GA(
while( (intra_valid != PIPE_STATUS_SUCCESS) || (inter_valid != PIPE_STATUS_SUCCESS)) {
if (intra_valid != PIPE_STATUS_SUCCESS) {
intra_valid = read_pipe(chan_Intrae2StoreIC_intrae, &energyIA_IC_rx);
intra_valid = read_pipe(pipe00intrae2storeic00intrae, &energyIA_IC_rx);
}
else if (inter_valid != PIPE_STATUS_SUCCESS) {
inter_valid = read_pipe(chan_Intere2StoreIC_intere, &energyIE_IC_rx);
inter_valid = read_pipe(pipe00intere2storeic00intere, &energyIE_IC_rx);
}
}
......@@ -302,7 +302,7 @@ void Krnl_GA(
// Get ushort binary_tournament selection prngs (parent index)
// Get float binary_tournament selection prngs (tournament rate)
float8 bt_tmp;
read_pipe_block(chan_PRNG2GA_BT_ushort_float_prng, &bt_tmp);
read_pipe_block(pipe00prng2ga00bt00ushort00float00prng, &bt_tmp);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -367,7 +367,7 @@ void Krnl_GA(
// get uchar genetic_generation prngs (gene index)
// get float genetic_generation prngs (mutation rate)
uchar2 prng_GG_C;
read_pipe_block(chan_PRNG2GA_GG_uchar_prng, &prng_GG_C);
read_pipe_block(pipe00prng2ga00gg00uchar00prng, &prng_GG_C);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -390,7 +390,7 @@ void Krnl_GA(
bool crossover_yes = (DockConst_crossover_rate > bt_tmp_f0);
const int tmp_int_zero = 0;
write_pipe_block(chan_GA2IGL_GG_active, &tmp_int_zero);
write_pipe_block(pipe00ga2igl00gg00active, &tmp_int_zero);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -400,7 +400,7 @@ void Krnl_GA(
LOOP_FOR_GA_INNER_CROSS_MUT:
for (uchar gene_cnt=0; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
float prngGG;
read_pipe_block(chan_PRNG2GA_GG_float_prng, &prngGG);
read_pipe_block(pipe00prng2ga00gg00float00prng, &prngGG);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -437,7 +437,7 @@ void Krnl_GA(
// Calculate energy
LocalPopNext [new_pop_cnt][gene_cnt & MASK_GENOTYPE] = tmp_offspring;
write_pipe_block(chan_GG2Conf_genotype, &tmp_offspring);
write_pipe_block(pipe00gg2conf00genotype, &tmp_offspring);
//printf("test point 5\n");
}
......@@ -457,10 +457,10 @@ void Krnl_GA(
while( (intra_valid != PIPE_STATUS_SUCCESS) || (inter_valid != PIPE_STATUS_SUCCESS)) {
if (intra_valid != PIPE_STATUS_SUCCESS) {
intra_valid = read_pipe(chan_Intrae2StoreGG_intrae, &energyIA_GG_rx);
intra_valid = read_pipe(pipe00intrae2storegg00intrae, &energyIA_GG_rx);
}
else if (inter_valid != PIPE_STATUS_SUCCESS) {
inter_valid = read_pipe(chan_Intere2StoreGG_intere, &energyIE_GG_rx);
inter_valid = read_pipe(pipe00intere2storegg00intere, &energyIE_GG_rx);
}
//printf("intra_valid: %i, inter_valid: %i\n", intra_valid, inter_valid);
......@@ -510,16 +510,16 @@ void Krnl_GA(
// Turn off PRNG kernels
const int tmp_int_one = 1;
write_pipe_block(chan_GA2PRNG_BT_ushort_float_off, &tmp_int_one);
write_pipe_block(chan_GA2PRNG_GG_uchar_off, &tmp_int_one);
write_pipe_block(chan_GA2PRNG_GG_float_off, &tmp_int_one);
write_pipe_block(pipe00ga2prng00bt00ushort00float00off, &tmp_int_one);
write_pipe_block(pipe00ga2prng00gg00uchar00off, &tmp_int_one);
write_pipe_block(pipe00ga2prng00gg00float00off, &tmp_int_one);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
// Turn off IGL_Arbiter, Conform, InterE, IntraE kernerls
write_pipe_block(chan_IGLArbiter_Off, &tmp_int_one);
write_pipe_block(pipe00iglarbiter00off, &tmp_int_one);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......
This diff is collapsed.
......@@ -52,16 +52,16 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
(IC_valid != PIPE_STATUS_SUCCESS) &&
(GG_valid != PIPE_STATUS_SUCCESS)
){
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);
Off_valid = read_pipe(pipe00iglarbiter00off, &Off_active);
IC_valid = read_pipe(pipe00ga2igl00ic00active, &IC_active);
GG_valid = read_pipe(pipe00ga2igl00gg00active, &GG_active);
}
// Send "mode" to Conform
active = (Off_valid == PIPE_STATUS_SUCCESS)? 0x00 :
(IC_valid == PIPE_STATUS_SUCCESS)? 'I' : 'G';
write_pipe_block(chan_IGL2Conform_actmode, &active);
write_pipe_block(pipe00igl2conform00actmode, &active);
//printf("IGL Simplif sent!\n");
} // End of while (active)
}
......
......@@ -51,7 +51,7 @@ while(active) {
// --------------------------------------------------------------
char actmode;
read_pipe_block(chan_Conf2Intere_actmode, &actmode);
read_pipe_block(pipe00conf2intere00actmode, &actmode);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -62,7 +62,7 @@ while(active) {
LOOP_FOR_INTERE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
float8 tmp;
read_pipe_block(chan_Conf2Intere_xyz, &tmp);
read_pipe_block(pipe00conf2intere00xyz, &tmp);
float3 tmp1 = {tmp.s0, tmp.s1, tmp.s2};
float3 tmp2 = {tmp.s4, tmp.s5, tmp.s6};
......@@ -290,8 +290,8 @@ while(active) {
float final_interE = interE;
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(pipe00intere2storeic00intere, &final_interE); break;
case 'G': write_pipe_block(pipe00intere2storegg00intere, &final_interE); break;
}
// --------------------------------------------------------------
......
......@@ -73,7 +73,7 @@ while(active) {
// --------------------------------------------------------------
char actmode;
read_pipe_block(chan_Conf2Intrae_actmode, &actmode);
read_pipe_block(pipe00conf2intrae00actmode, &actmode);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -84,7 +84,7 @@ while(active) {
LOOP_FOR_INTRAE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
float8 tmp;
read_pipe_block(chan_Conf2Intrae_xyz, &tmp);
read_pipe_block(pipe00conf2intrae00xyz, &tmp);
float3 tmp1 = {tmp.s0, tmp.s1, tmp.s2};
float3 tmp2 = {tmp.s4, tmp.s5, tmp.s6};
......@@ -237,8 +237,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(pipe00intrae2storeic00intrae, &intraE); break;
case 'G': write_pipe_block(pipe00intrae2storegg00intrae, &intraE); break;
}
// --------------------------------------------------------------
......
......@@ -29,7 +29,7 @@ void Krnl_Prng_BT_ushort_float(
bool active = true;
*/
int active;
valid = read_pipe(chan_GA2PRNG_BT_ushort_float_off, &active);
valid = read_pipe(pipe00ga2prng00bt00ushort00float00off, &active);
uint u_tmp[4]; // used as short in GA
float f_tmp[4];
......@@ -67,7 +67,7 @@ void Krnl_Prng_BT_ushort_float(
u_tmp_float_2, f_tmp[2],
u_tmp_float_3, f_tmp[3]};
success = write_pipe(chan_PRNG2GA_BT_ushort_float_prng, &tmp);
success = write_pipe(pipe00prng2ga00bt00ushort00float00prng, &tmp);
}
} // End of while(valid != PIPE_STATUS_SUCCESS)
}
......@@ -98,7 +98,7 @@ void Krnl_Prng_GG_uchar(
bool active = true;
*/
int active;
valid = read_pipe(chan_GA2PRNG_GG_uchar_off, &active);
valid = read_pipe(pipe00ga2prng00gg00uchar00off, &active);
uchar tmp[2];
......@@ -120,7 +120,7 @@ void Krnl_Prng_GG_uchar(
utmp.y = tmp[1];
if(valid != PIPE_STATUS_SUCCESS) {
success = write_pipe(chan_PRNG2GA_GG_uchar_prng, &utmp);
success = write_pipe(pipe00prng2ga00gg00uchar00prng, &utmp);
}
} // while(valid != PIPE_STATUS_SUCCESS)
}
......@@ -149,7 +149,7 @@ void Krnl_Prng_GG_float(
bool active = true;
*/
int active;
valid = read_pipe(chan_GA2PRNG_GG_float_off, &active);
valid = read_pipe(pipe00ga2prng00gg00float00off, &active);
__attribute__((xcl_pipeline_loop))
LOOP_FOR_PRNG_GG_FLOAT:
......@@ -164,7 +164,7 @@ void Krnl_Prng_GG_float(
nb_pipe_status success = PIPE_STATUS_FAILURE;
if(valid != PIPE_STATUS_SUCCESS) {
success = write_pipe(chan_PRNG2GA_GG_float_prng, &tmp);
success = write_pipe(pipe00prng2ga00gg00float00prng, &tmp);
}
}
} // End of while(valid != PIPE_STATUS_SUCCESS)
......
Markdown is supported
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