Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

execution speed on Embedded Linux and Without OS

$
0
0

To whom it may concern,

We use TI product,Zoom AM1808 eXperimenter Kit-Logic PD,

Have some problem,I hope to get some advice ,

We write a simple program (just try calling 3x3 mean filter 500 times for a 192x192 gray level image) to test execution time in following two environment embedded Linux and without OS,

The result let we confused, almost 9 times slower than on the embedded linux.

embedded Linux OS (arm2009-q1 compiler in embedded Linux) spend 6.57 sec,

Without OS                    (use CCS 4.2 compiler)                                   spend 57.16 sec,

Is there any further setting is required in CCS?

Could you give me some advice,thank you.


///////Source Code////////////////

void main_filter(BYTE *imgIn,BYTE *imgOut,int w,int h){
int i,j,offset_j,offset,tmp;
offset_j=0;
for(j=0;j<h-1;j++){
         for(i=0;i<w-1;i++){
                    offset=offset_j+i;
                   tmp=imgIn[offset]
                          +imgIn[offset-w]
                          +imgIn[offset-w-1]
                          +imgIn[offset-w+1]
                          +imgIn[offset+w]
                          +imgIn[offset+w-1]
                          +imgIn[offset+w+1]
                          +imgIn[offset-1]
                          +imgIn[offset+1];
                          tmp/=9;
                          imgOut[offset]=tmp;

          }
offset_j+=w;
}
}


int main(void) {

uint32_t results = 0;

uint32_t rtn;

int i;

EVMAM1808_init();

EVMAM1808_initRAM();

USTIMER_init();

I2C_init(I2C0, I2C_CLK_400K);

rtn = UART_init(DEBUG_PORT, 115200);

UART_txString(DEBUG_PORT, "\r\n\r\n********** Start **********\r\n\r\n");

for(i=0;i<500;i++){

main_filter(image,image2,192,192);

}

UART_txString(DEBUG_PORT, "\r\n\r\n********** Sucess **********\r\n\r\n"); }

BR


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>