Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | Re: Need C programs

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

Need C programs - kapildevrathan55 - Jan 21 5:31:00 2006



Hi All,

I am using ADSP 2186 and ADSP 2187 processors, the project is already
written in DSP asseambly, my task is to re-write in C,

pls give me some examples of C code for DSPs,

thanking you,

kapil





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Need C programs - Mike Rosing - Jan 21 15:16:00 2006

On Sat, 21 Jan 2006, kapildevrathan55 wrote:

> Hi All,
>
> I am using ADSP 2186 and ADSP 2187 processors, the project is already
> written in DSP asseambly, my task is to re-write in C,
>
> pls give me some examples of C code for DSPs,

Why??? If the assembler works, why screw everything up with C???

If you have to port to another processor, just figure out the algorithms,
then write the algorithm in C. If you have 2186 platforms, you can then
use them to test your implementation. Better to start from scratch rather
than try to go from assembler to C on something that might have a lot of
parallel enhancements to it.

Otherwise, you've been given a totally insane task!

Patience, persistence, truth,
Dr. mike




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Need C programs - eresrch - Jan 22 0:00:00 2006

          
         photo                                 ; photo2                ;             photo3




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Need C programs - Al Clark - Jan 22 0:17:00 2006

In spite of the fact that there is a C compiler for the 218x, i believe that writing a C program for the 218x is a very bad idea. The 218x architecture is very C unfriendly.

Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com

At 01:16 PM 1/21/2006, you wrote:

On Sat, 21 Jan 2006, kapildevrathan55 wrote:

> Hi All,
>
> I am using ADSP 2186 and ADSP 2187 processors, the project is already
> written in DSP asseambly, my task is to re-write in C,
>
> pls give me some examples of C code for DSPs,

Why???  If the assembler works, why screw everything up with C???

If you have to port to another processor, just figure out the algorithms,
then write the algorithm in C.  If you have 2186 platforms, you can then
use them to test your implementation.  Better to start from scratch rather
than try to go from assembler to C on something that might have a lot of
parallel enhancements to it.

Otherwise, you've been given a totally insane task!

Patience, persistence, truth,
Dr. mike
 



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

RE: Need C programs - Author Unknown - Jan 22 5:50:00 2006

hello all,
 
i just want to know that "can i use C programs in place of ASM programs in ADSP 21365 architecture?"
which one is better to use.
 
Thanks
Abhishek

From: a...@yahoogroups.com on behalf of Al Clark
Sent: Sun 1/22/2006 9:47 AM
To: a...@yahoogroups.com
Subject: Re: [adsp] Need C programs

In spite of the fact that there is a C compiler for the 218x, i believe that writing a C program for the 218x is a very bad idea. The 218x architecture is very C unfriendly.

Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com

At 01:16 PM 1/21/2006, you wrote:

On Sat, 21 Jan 2006, kapildevrathan55 wrote:

> Hi All,
>
> I am using ADSP 2186 and ADSP 2187 processors, the project is already
> written in DSP asseambly, my task is to re-write in C,
>
> pls give me some examples of C code for DSPs,

Why???  If the assembler works, why screw everything up with C???

If you have to port to another processor, just figure out the algorithms,
then write the algorithm in C.  If you have 2186 platforms, you can then
use them to test your implementation.  Better to start from scratch rather
than try to go from assembler to C on something that might have a lot of
parallel enhancements to it.

Otherwise, you've been given a totally insane task!

Patience, persistence, truth,
Dr. mike
 


  •  







(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

RE: Need C programs - Al Clark - Jan 22 17:40:00 2006

At 03:50 AM 1/22/2006, you wrote:
hello all,
 
i just want to know that "can i use C programs in place of ASM programs in ADSP 21365 architecture?"
which one is better to use.
 

Visual DSP includes a C compiler. It is certainly an option with the SHARC. The assembly language is similar to the 218x. It is a very easy assembly language to learn. I think that assembly for the SHARC is still the best choice, but there are plenty of people who disagree.

I do think that as with most DSPs, using C is not a good excuse for not learning the assembly language. You may still need to right the time critical code in assembly.

 Al Clark

Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com

Thanks
Abhishek

From: a...@yahoogroups.com on behalf of Al Clark
Sent: Sun 1/22/2006 9:47 AM
To: a...@yahoogroups.com
Subject: Re: [adsp] Need C programs

In spite of the fact that there is a C compiler for the 218x, i believe that writing a C program for the 218x is a very bad idea. The 218x architecture is very C unfriendly.

Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com

At 01:16 PM 1/21/2006, you wrote:
On Sat, 21 Jan 2006, kapildevrathan55 wrote:

> Hi All,
>
> I am using ADSP 2186 and ADSP 2187 processors, the project is already
> written in DSP asseambly, my task is to re-write in C,
>
> pls give me some examples of C code for DSPs,

Why???  If the assembler works, why screw everything up with C???

If you have to port to another processor, just figure out the algorithms,
then write the algorithm in C.  If you have 2186 platforms, you can then
use them to test your implementation.  Better to start from scratch rather
than try to go from assembler to C on something that might have a lot of
parallel enhancements to it.

Otherwise, you've been given a totally insane task!

Patience, persistence, truth,
Dr. mike




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

RE: Need C programs - Mike Rosing - Jan 22 18:36:00 2006

On Sun, 22 Jan 2006 abhishek.nema@abhi... wrote:

> hello all,
>
> i just want to know that "can i use C programs in place of ASM programs in ADSP 21365 architecture?"
> which one is better to use.

I think the real answer is "it depends". If you have MIPS to burn, you
might as well go with C (unless you are a purist like me who happens to
love assembler :-) If all your code is just squeezing out every ounce of
processing power, then stick with assembler all the way.

Most likely, you need some sections in assembler which really are time
critical, and some sections in C which are coasting most of the time.
What you want to trade off is programming time costs, maintainance costs,
and functionality. One way to figure it out is to start out with C,
make everything work, and then profile it. If it all works, and you
have time to spare, then leave it. If you are running into time
constraints, use the profiler to determine which subroutines will give
you the most improvement with the least amount of effort.

The problem with C on a DSP is that C is designed for serial
processors and DSP's like the 21365 are parallel devices. Compilers
have improved over the years, but it is very hard to make them
work well on DSP's.

Patience, persistence, truth,
Dr. mike





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: Need C programs - T - Jan 23 2:59:00 2006

My experience is that assemply routines run 3x faster than c routines on the SHARC, and even more when running SIMD code.
 
I use c for initialization and some non-timecritical main loop stuff (that would be a real mess in assembler, but could be done), but all time-critical stuff (interrupt code and processing) is done in assembler. 
 
Tom
 




(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

RE: Need C programs - Jaime Andres Aranguren Cardona - Jan 23 10:06:00 2006

Hi,

Let me see if I undestood it corrctly: you have an
algorithm already running on ADSP-218x, in assembly
language. Now you want to get it running on 3rd
generation SHARC, namely ADSP-21365.

If your project affords for a (maybe) more expensive
DSP, moving to the faster, more accurate (more bits)
and even floating point DSP is OK. In that case, my
recommendation would be (as Dr. Mike already pointed
out) to figure out the algorithm, and re-code it in C.
Your ADSP-218x version could serve you as a platform
to verify "compliance" of your C port.

Regards,

JaaC

--- abhishek.nema@abhi... wrote:

> hello all,
>
> i just want to know that "can i use C programs in
> place of ASM programs in ADSP 21365 architecture?"
> which one is better to use.
>
> Thanks
> Abhishek
>
> ________________________________
>
> From: adsp@adsp... on behalf of Al Clark
> Sent: Sun 1/22/2006 9:47 AM
> To: adsp@adsp...
> Subject: Re: [adsp] Need C programs > In spite of the fact that there is a C compiler for
> the 218x, i believe that writing a C program for the
> 218x is a very bad idea. The 218x architecture is
> very C unfriendly. >
> Al Clark
> Danville Signal Processing, Inc.
>
--------------------------------------------------------------------
> Purveyors of Fine DSP Hardware and other Cool Stuff
> Available at http://www.danvillesignal.com >
>
> <http://www.danvillesignal.com/> At 01:16 PM
> 1/21/2006, you wrote: > On Sat, 21 Jan 2006, kapildevrathan55 wrote:
>
> > Hi All,
> >
> > I am using ADSP 2186 and ADSP 2187 processors,
> the project is already
> > written in DSP asseambly, my task is to re-write
> in C,
> >
> > pls give me some examples of C code for DSPs,
>
> Why??? If the assembler works, why screw
> everything up with C???
>
> If you have to port to another processor, just
> figure out the algorithms,
> then write the algorithm in C. If you have 2186
> platforms, you can then
> use them to test your implementation. Better to
> start from scratch rather
> than try to go from assembler to C on something
> that might have a lot of
> parallel enhancements to it.
>
> Otherwise, you've been given a totally insane task!
>
> Patience, persistence, truth,
> Dr. mike Jaime Andrés Aranguren Cardona
jaime.aranguren@jaim...
jaime.aranguren@jaim... __________________________________________________
">http://mail.yahoo.com





(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )