Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void BlockBasedFIR(double[256], double[256], double[256], int, int);
- void BlockBasedFIR(double y[256], double x[256], double c[256], int BLOCK,
- int NTAP) {
- // *********************************
- // SCoP null
- // - Parameters [BLOCK, NTAP]
- //
- int i;
- int j;
- { // FSM 0
- // FSM declarations
- int done = 0, s, j, i;
- // FSM initialization
- if (BLOCK - 1 >= 0) {
- s = 0;
- j = 0;
- i = 0;
- } else
- done = 1;
- while (!done) {
- // FSM Commands
- if (((s - 1 == 0) && (j - 1 >= 0) && (-j + NTAP - 1 >= 0))
- || ((j == 0) && (s - 1 == 0) && (NTAP - 1 >= 0))) {
- #pragma ignore_memory_dependency for y,x,c
- S0: y[i] = y[i] + (x[i - j] * c[j]);
- }
- if ((j == 0) && (s == 0)) {
- #pragma ignore_memory_dependency for
- S1: y[i] = 0;
- }
- // FSM transitions
- if ((i - BLOCK + 1 == 0) && (j == 0) && (s == 0)
- && (NTAP - 1 >= 0)) {
- s = 1;
- j = 0;
- i = 0;
- } else if ((i - BLOCK + 1 == 0) && (s - 1 == 0)
- && (-j + NTAP - 2 >= 0) && (-j + BLOCK - 2 >= 0)) {
- s = 1;
- j = j + 1;
- i = j + 1;
- } else if ((j == 0) && (s == 0) && (-i + BLOCK - 2 >= 0)) {
- s = 0;
- j = 0;
- i = i + 1;
- } else if ((s - 1 == 0) && (-j + NTAP - 1 >= 0)
- && (-i + BLOCK - 2 >= 0)) {
- s = 1;
- i = i + 1;
- } else
- done = 1;
- }
- }
- // *********************************
- }
Add Comment
Please, Sign In to add comment