Altera_Forum
Honored Contributor
8 years agoshift register inferring
Hi,
I have a design which uses shift registers. But in the compilation report that memory is only inferred as normal register (I followed the format of inferring shift register). Moreover I had a shift register successfully inferred at a different part of my design using the same format. Below is the way I inferred shift register but failed
typedef struct {
float vector;
} vec;
typedef struct {
vec lane_data;
} input_lane;
some_kernel() {
input_lane data_in;
input_lane weight_in;
//more than one loop(nested)
for(......) {
......
# pragma unroll
for(uint j = TILE_SIZE - 1; j > 0; j--) {
data_shift_reg = data_shift_reg;
weight_shift_reg = weight_shift_reg;
}
......
}
}
I feel like in Altera OpenCL memory type some times don't get to be what I desired, and its type depends on the its position in the kernel (for example in which level of nested loops).