Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
Hi, Greetings to the groups members. I am using BF561 to detect the lines in the image. I implemented C code for Sobel edge detection . But the code is slow when compared to assembly which is given in the example code. I would like to call that assembly routine from my program. I am new to Processor. Can anybody give guideline to do the same........? Regards, Mani mekalai
Hi Mani,
I hope following example code might help you.
Best Regards,
Ankush
---------------------------C Code --------------------------------------
#include "stdio.h"
extern int sum(int, int);
void main()
{
int y;
y = sum(10,20);
printf("\nsum = %d",y);
}
---------------------------ASM Code --------------------------------------
.global _sum;
.section L1_code;
_sum:
// R0 = first argument i.e. 10
// R1 = second argument i.e. 20
R0 = R0 + R1; // R0 always contain the return value
RTS;
_sum.END:
------------------------------------------------------------------------
j...@pricol.co.in wrote:
Hi,
Greetings to the groups members.
I am using BF561 to detect the lines in the image.
I implemented C code for Sobel edge detection .
But the code is slow when compared to assembly which is given in the example code.
I would like to call that assembly routine from my program.
I am new to Processor.
Can anybody give guideline to do the same........?
Regards,
Mani mekalai
Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now!
http://messenger.yahoo.com/download.php
Hey: I have called the ADI assembly sample sobel edge detector from a C program before for a BF 561. If you are using VisualDSP++ then check the "C/C++ assembly interface" section in the VisualDSP++ C/C++ Compiler and library manual. HTH, Chamira. j...@pricol.co.in wrote: Hi, Greetings to the groups members. I am using BF561 to detect the lines in the image. I implemented C code for Sobel edge detection . But the code is slow when compared to assembly which is given in the example code. I would like to call that assembly routine from my program. I am new to Processor. Can anybody give guideline to do the same........? Regards, Mani mekalai --------------------------------- Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
asm("nop;;nop;;nop;;");
maybe you can put your function in line.
your c Code
asm(" your asm code");
more c Code
j...@pricol.co.in wrote:
Hi,
Greetings to the groups members.
I am using BF561 to detect the lines in the image.
I implemented C code for Sobel edge detection .
But the code is slow when compared to assembly which is given in the example code.
I would like to call that assembly routine from my program.
I am new to Processor.
Can anybody give guideline to do the same........?
Regards,
Mani mekalai
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.