Loop Unrolling - Microblaze C Programming

Is it possible to start a cycle in programming on Microblaze C using the EDK?

This is required because I need more performance. Traditionally, my C-code will be run in series, so using cyclic deployment using some compiler directive can speed up my application.
(for example, how we use openMP).

#pragma Unroll 
for (i = 0; i < 100; i++ ) {
    a[i] = fetch_data(i);
}

Is this possible for Microblaze? If so, is there one example on the same?

+3
source share
2 answers

, . , , Xilinx , 10-20 , .

3 4 , , fetch_data , , .

for (i = 0; i < 100; i+=10 ) { 
    a[i] = fetch_data(i); 
    a[i+1] = fetch_data(i+1); 
    a[i+2] = fetch_data(i+2); 
    a[i+3] = fetch_data(i+3); 
    a[i+4] = fetch_data(i+4); 
    a[i+5] = fetch_data(i+5); 
    a[i+6] = fetch_data(i+6); 
    a[i+7] = fetch_data(i+7); 
    a[i+8] = fetch_data(i+8); 
    a[i+9] = fetch_data(i+9); 
} 

, , , .

+3

Xilinx ( ):

http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Optimize-Options.html

-funroll-loops section

OO ( GUI SDK) , -floop-optimize, :

-floop-    : , , , .

-O, -O2, -O3, -Os.

0

All Articles