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

pipes converted into int (bool not valid for sdx)

parent 754508be
......@@ -631,10 +631,17 @@ CHECKS=check
include $(COMMON_REPO)/utility/rules.mk
kerswemu:
make TARGETS=sw_emu all
kerhwemu:
make TARGETS=hw_emu all
# 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 2 -nev 2000000
XCL_EMULATION_MODE=sw_emu ./hostbin -ffile input/1stp/derived/1stp_protein.maps.fld -lfile input/1stp/derived/1stp_ligand.pdbqt -nrun 2 -nev 2500000
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
......@@ -19,8 +19,14 @@
pipe bool chan_GA2IGL_IC_active;
pipe bool chan_GA2IGL_GG_active;
*/
/*
pipe bool chan_GA2IGL_IC_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2IGL_GG_active __attribute__((xcl_reqd_pipe_depth(16)));
*/
pipe int chan_GA2IGL_IC_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2IGL_GG_active __attribute__((xcl_reqd_pipe_depth(16)));
// Send genotypes from producers (IC, GG, LSs) to Conform
/*
......@@ -176,6 +182,7 @@ pipe bool chan_Arbiter_LS7_float_off;
pipe bool chan_Arbiter_LS8_float_off;
pipe bool chan_Arbiter_LS9_float_off;
*/
/*
pipe bool chan_Arbiter_BT_ushort_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_Arbiter_GG_uchar_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_Arbiter_GG_float_off __attribute__((xcl_reqd_pipe_depth(16)));
......@@ -189,6 +196,20 @@ pipe bool chan_Arbiter_LS6_float_off __attribute__((xcl_reqd_pipe_depth(16))
pipe bool chan_Arbiter_LS7_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_Arbiter_LS8_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_Arbiter_LS9_float_off __attribute__((xcl_reqd_pipe_depth(16)));
*/
pipe int chan_Arbiter_BT_ushort_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_GG_uchar_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_GG_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS123_ushort_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS2_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS3_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS4_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS5_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS6_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS7_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS8_float_off __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_Arbiter_LS9_float_off __attribute__((xcl_reqd_pipe_depth(16)));
// Send energy values and genotypes to LSs
// Resized to valid SDAccel depths: 16, 32, ...
......@@ -247,6 +268,7 @@ pipe bool chan_LS2Arbiter_LS7_end;
pipe bool chan_LS2Arbiter_LS8_end;
pipe bool chan_LS2Arbiter_LS9_end;
*/
/*
pipe bool chan_LS2Arbiter_LS1_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_LS2Arbiter_LS2_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_LS2Arbiter_LS3_end __attribute__((xcl_reqd_pipe_depth(16)));
......@@ -256,7 +278,16 @@ pipe bool chan_LS2Arbiter_LS6_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_LS2Arbiter_LS7_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_LS2Arbiter_LS8_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_LS2Arbiter_LS9_end __attribute__((xcl_reqd_pipe_depth(16)));
*/
pipe int chan_LS2Arbiter_LS1_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS2_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS3_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS4_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS5_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS6_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS7_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS8_end __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_LS2Arbiter_LS9_end __attribute__((xcl_reqd_pipe_depth(16)));
// Get LS-eval-count, new energy, new genotype from LSs
// Resized to valid SDAccel depths: 16, 32, ...
/*
......@@ -315,6 +346,7 @@ pipe bool chan_GA2LS_Off7_active;
pipe bool chan_GA2LS_Off8_active;
pipe bool chan_GA2LS_Off9_active;
*/
/*
pipe bool chan_GA2LS_Off1_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2LS_Off2_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2LS_Off3_active __attribute__((xcl_reqd_pipe_depth(16)));
......@@ -324,6 +356,16 @@ pipe bool chan_GA2LS_Off6_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2LS_Off7_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2LS_Off8_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe bool chan_GA2LS_Off9_active __attribute__((xcl_reqd_pipe_depth(16)));
*/
pipe int chan_GA2LS_Off1_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off2_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off3_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off4_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off5_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off6_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off7_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off8_active __attribute__((xcl_reqd_pipe_depth(16)));
pipe int chan_GA2LS_Off9_active __attribute__((xcl_reqd_pipe_depth(16)));
// Send genotype-producer-pipe selector and genotype
// from IGL_Arbiter to Conform
......@@ -340,7 +382,10 @@ pipe float chan_IGL2Conform_genotype __attribute__((xcl_reqd_pipe_depth(5
/*
pipe bool chan_IGLArbiter_Off;
*/
/*
pipe bool chan_IGLArbiter_Off __attribute__((xcl_reqd_pipe_depth(16)));
*/
pipe int chan_IGLArbiter_Off __attribute__((xcl_reqd_pipe_depth(16)));
#if defined (FIXED_POINT_CONFORM) || \
defined (FIXED_POINT_LS1) || \
......@@ -500,17 +545,25 @@ void Krnl_GA(
// ------------------------------------------------------------------
// Initial Calculation (IC) of scores
// ------------------------------------------------------------------
__attribute__((xcl_pipeline_loop))
LOOP_GA_IC:
for (ushort pop_cnt = 0; pop_cnt < DockConst_pop_size; pop_cnt++) {
// Calculate energy
/*
write_channel_altera(chan_GA2IGL_IC_active, true);
*/
/*
const bool tmp_bool_true = true;
write_pipe_block(chan_GA2IGL_IC_active, &tmp_bool_true);
*/
const int tmp_int_zero = 0;
write_pipe_block(chan_GA2IGL_IC_active, &tmp_int_zero);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
__attribute__((xcl_pipeline_loop))
LOOP_GA_IC_WRITE_GENOTYPE:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_genes; pipe_cnt++) {
#if defined(SINGLE_COPY_POP_ENE)
LocalPopCurr[pop_cnt][pipe_cnt & MASK_GENOTYPE] = GlobPopCurr[pop_cnt*ACTUAL_GENOTYPE_LENGTH + pipe_cnt];
......@@ -539,6 +592,8 @@ void Krnl_GA(
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
__attribute__((xcl_pipeline_loop))
LOOP_GA_IC_READ_ENERGY:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
......@@ -773,8 +828,12 @@ void Krnl_GA(
/*
write_channel_altera(chan_GA2IGL_GG_active, true);
*/
/*
const bool tmp_bool_true = true;
write_pipe_block(chan_GA2IGL_GG_active, &tmp_bool_true);
*/
const int tmp_int_zero = 0;
write_pipe_block(chan_GA2IGL_GG_active, &tmp_int_zero);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -1200,6 +1259,7 @@ void Krnl_GA(
write_channel_altera(chan_Arbiter_LS8_float_off, false);
write_channel_altera(chan_Arbiter_LS9_float_off, false);
*/
/*
const bool tmp_bool_false = false;
write_pipe_block(chan_Arbiter_BT_ushort_float_off, &tmp_bool_false);
write_pipe_block(chan_Arbiter_GG_uchar_off, &tmp_bool_false);
......@@ -1214,6 +1274,21 @@ void Krnl_GA(
write_pipe_block(chan_Arbiter_LS7_float_off, &tmp_bool_false);
write_pipe_block(chan_Arbiter_LS8_float_off, &tmp_bool_false);
write_pipe_block(chan_Arbiter_LS9_float_off, &tmp_bool_false);
*/
const int tmp_int_one = 1;
write_pipe_block(chan_Arbiter_BT_ushort_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_GG_uchar_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_GG_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS123_ushort_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS2_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS3_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS4_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS5_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS6_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS7_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS8_float_off, &tmp_int_one);
write_pipe_block(chan_Arbiter_LS9_float_off, &tmp_int_one);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -1230,6 +1305,7 @@ void Krnl_GA(
write_channel_altera(chan_GA2LS_Off8_active, false);
write_channel_altera(chan_GA2LS_Off9_active, false);
*/
/*
write_pipe_block(chan_GA2LS_Off1_active, &tmp_bool_false);
write_pipe_block(chan_GA2LS_Off2_active, &tmp_bool_false);
write_pipe_block(chan_GA2LS_Off3_active, &tmp_bool_false);
......@@ -1239,6 +1315,16 @@ void Krnl_GA(
write_pipe_block(chan_GA2LS_Off7_active, &tmp_bool_false);
write_pipe_block(chan_GA2LS_Off8_active, &tmp_bool_false);
write_pipe_block(chan_GA2LS_Off9_active, &tmp_bool_false);
*/
write_pipe_block(chan_GA2LS_Off1_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off2_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off3_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off4_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off5_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off6_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off7_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off8_active, &tmp_int_one);
write_pipe_block(chan_GA2LS_Off9_active, &tmp_int_one);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......@@ -1247,7 +1333,10 @@ void Krnl_GA(
/*
write_channel_altera(chan_IGLArbiter_Off, false);
*/
/*
write_pipe_block(chan_IGLArbiter_Off, &tmp_bool_false);
*/
write_pipe_block(chan_IGLArbiter_Off, &tmp_int_one);
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
*/
......
......@@ -58,18 +58,18 @@ while(active) {
int LS8_end_valid = 1;
int LS9_end_valid = 1;
bool Off_active;
bool IC_active;
bool GG_active;
bool LS1_end_active;
bool LS2_end_active;
bool LS3_end_active;
bool LS4_end_active;
bool LS5_end_active;
bool LS6_end_active;
bool LS7_end_active;
bool LS8_end_active;
bool LS9_end_active;
/*bool Off_active;*/ int Off_active;
/*bool IC_active;*/ int IC_active;
/*bool GG_active;*/ int GG_active;
/*bool LS1_end_active;*/ int LS1_end_active;
/*bool LS2_end_active;*/ int LS2_end_active;
/*bool LS3_end_active;*/ int LS3_end_active;
/*bool LS4_end_active;*/ int LS4_end_active;
/*bool LS5_end_active;*/ int LS5_end_active;
/*bool LS6_end_active;*/ int LS6_end_active;
/*bool LS7_end_active;*/ int LS7_end_active;
/*bool LS8_end_active;*/ int LS8_end_active;
/*bool LS9_end_active;*/ int LS9_end_active;
/*
while (
......
......@@ -26,8 +26,10 @@ void Krnl_LS(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active= false;
*/
......@@ -47,13 +49,18 @@ while(valid) {
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, &current_energy);
}
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -145,14 +152,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS1_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS1_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS1_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS1_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS1_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS1_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS2(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -52,7 +54,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -148,14 +154,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS2_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS2_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS2_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS2_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS2_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS2_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS3(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -149,14 +155,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS3_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS3_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS3_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS3_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS3_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS3_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS4(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -149,14 +155,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS4_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS4_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS4_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS4_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS4_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS4_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS5(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -149,16 +155,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS5_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS5_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS5_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS5_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool= (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS5_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS5_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS6(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -148,14 +154,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS6_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS6_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS6_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS6_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS6_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS6_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS7(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -149,14 +155,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS7_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (fixpt_rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS7_end, &tmp_bool);
*/
int tmp_int = (fixpt_rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS7_end, &tmp_int);
#else
/*
write_channel_altera(chan_LS2Arbiter_LS7_end, (rho < DockConst_rho_lower_bound)?true:false);
*/
/*
bool tmp_bool = (rho < DockConst_rho_lower_bound)?true:false;
write_pipe_block(chan_LS2Arbiter_LS7_end, &tmp_bool);
*/
int tmp_int = (rho < DockConst_rho_lower_bound)?0:1;
write_pipe_block(chan_LS2Arbiter_LS7_end, &tmp_int);
#endif
/*
mem_fence(CLK_CHANNEL_MEM_FENCE);
......
......@@ -26,8 +26,10 @@ void Krnl_LS8(
bool valid = true;
while(valid) {
/*
bool active;
*/
int active;
/*
bool valid_active = false;
*/
......@@ -53,7 +55,11 @@ while(valid) {
/*
valid = active || valid_energy;
*/
/*
valid = active || (valid_energy == 0);
*/
// (active == 1) means stop LS
valid = (active != 1) || (valid_energy == 0);
if (valid) {
......@@ -148,14 +154,22 @@ while(valid) {
/*
write_channel_altera(chan_LS2Arbiter_LS8_end, (fixpt_rho < DockConst_rho_lower_bound)?true:false);