Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch

Discussion Groups

Discussion Groups | Code-Composer | Real Time Implementation Help Needed

Technical discussions about Code Composer Studio.

  

Post a new Thread

Real Time Implementation Help Needed - bharath_imp - Apr 25 6:59:51 2008



Hi friends,

               I'm pretty new to the group and to CCS also.I have got
some basic doubt.I have one algorithm which is working on my TI320C6713 
DSK processor. But right now I'm doing it by using the text data input
that i have.

                  My problem is to implement it in real time environment.
I don't have any further data. But i guess i can generate the data
repeatedly and i will give it to my algo..

                    So,anybody has got ideas on this issue please let me
know   it is possible by means of  simulation or some other mode

                    Is there any option in CCS that will make my   static
or non-real time algo  into real time one.

                    Thanks in advance for answering.

  Regards
  Bharath.

------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



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

Re: Real Time Implementation Help Needed - Jeff Brower - May 1 5:11:21 2008

Bharath-

>                I'm pretty new to the group and to CCS also.I have got
> some basic doubt.I have one algorithm which is working on my TI320C6713
> DSK processor. But right now I'm doing it by using the text data input
> that i have.
>
>                   My problem is to implement it in real time environment.
> I don't have any further data. But i guess i can generate the data
> repeatedly and i will give it to my algo..
>
>                     So,anybody has got ideas on this issue please let me
> know   it is possible by means of  simulation or some other mode
>
>                     Is there any option in CCS that will make my   static
> or non-real time algo  into real time one.

Unfortunately there is not yet a "single button" that converts static implementation
(as is typically used in MATLAB)
into real-time implementation (as is typically used in embedded system).  So this is work you
have to do, as a DSP
engineer.  Here are some general guidelines:

1) First verify you can get your C/C++ code to compile.  There may be many issues in porting
code from MATLAB, Visual
Studio, etc.

2) Organize your c/C++ code as frame-based.  This means your code will process incoming data as
small 'chunks' of
data.  Chooose the frame size so it has a meaningful relationship with input data.  Some
examples of frame length:

  speech, 10 to 20 msec
  video, 33 msec (30 frames per sec)
  radar, from low usec to low msec

Many times -- especially if FFT or other frequency domain techniques will be used -- the frame
size is chosen as the
amount of time the input data can be more or less assumed to be stationary
("quasi-stationary").

3) Use the CCS simulator to figure out if your code is running in real-time.  Measure the
number of cycles used, and
especialy the leftover (unused) cycles for each frame.  Maintaining at least a 20%
"overhead" is a good idea, in case
some frames take more work.

4) Use file I/O during simulations.  At the start of each frame, the code can read another
chunk of file data.

5) Carefully and thoughtfully move to real-time operation.  Replace file I/O with actual analog
I/O (e.g. audio or
video A/D converter, high-speed digital interface, etc.).   Use DMA to "acquire"
frames into DSP memory.  Use a
step-by-step approach -- always include a "loopback" option where your code doesn't
do any processing, to isolate I/O
and hardware related issues.

6) Address real-time performance issues -- cache usage, specific sections of code that should
be optimized, etc.

-Jeff
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



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

Re: Real Time Implementation Help Needed - Jeff Brower - May 19 10:33:02 2008

Bharath-

>      I am implementing an algorithm in real time environment on C6713.I am giving a analog
signal as input.My
> algorithm take two samples of it every time and will do further calculations.I have the
code and input every
> thing.
>
>                          My doubt is, it takes analog values and digitize it and fed to
the algorithm.But in
> algorithm the constants are defined as numerical values.
>
>                                   So,will it work properly with digital inputs and numeric
values which are different
> in type??Can the dsp is able to do the calculations??
>
>                           Thanks in advance for answering

Please post to the group, not to me.

-Jeff

> Jeff Brower <j...@signalogic.com> wrote: Bharath-
>
>>                I'm pretty new to the group and to CCS also.I have got
>> some basic doubt.I have one algorithm which is working on my TI320C6713
>> DSK processor. But right now I'm doing it by using the text data input
>> that i have.
>>
>>                   My problem is to implement it in real time environment.
>> I don't have any further data. But i guess i can generate the data
>> repeatedly and i will give it to my algo..
>>
>>                     So,anybody has got ideas on this issue please let me
>> know   it is possible by means of  simulation or some other mode
>>
>>                     Is there any option in CCS that will make my   static
>> or non-real time algo  into real time one.
>
> Unfortunately there is not yet a "single button" that converts static
implementation (as is typically used in MATLAB)
> into real-time implementation (as is typically used in embedded system).  So this is work
you have to do, as a DSP
> engineer.  Here are some general guidelines:
>
> 1) First verify you can get your C/C++ code to compile.  There may be many issues in
porting code from MATLAB, Visual
> Studio, etc.
>
> 2) Organize your c/C++ code as frame-based.  This means your code will process incoming
data as small 'chunks' of
> data.  Chooose the frame size so it has a meaningful relationship with input data.  Some
examples of frame length:
>
>   speech, 10 to 20 msec
>   video, 33 msec (30 frames per sec)
>   radar, from low usec to low msec
>
> Many times -- especially if FFT or other frequency domain techniques will be used -- the
frame size is chosen as the
> amount of time the input data can be more or less assumed to be stationary
("quasi-stationary").
>
> 3) Use the CCS simulator to figure out if your code is running in real-time.  Measure the
number of cycles used, and
> especialy the leftover (unused) cycles for each frame.  Maintaining at least a 20%
"overhead" is a good idea, in case
> some frames take more work.
>
> 4) Use file I/O during simulations.  At the start of each frame, the code can read another
chunk of file data.
>
> 5) Carefully and thoughtfully move to real-time operation.  Replace file I/O with actual
analog I/O (e.g. audio or
> video A/D converter, high-speed digital interface, etc.).   Use DMA to "acquire"
frames into DSP memory.  Use a
> step-by-step approach -- always include a "loopback" option where your code
doesn't do any processing, to isolate I/O
> and hardware related issues.
>
> 6) Address real-time performance issues -- cache usage, specific sections of code that
should be optimized, etc.
>
> -Jeff
> ---------------------------------
>  Download prohibited? No problem. CHAT from any browser, without download.
------------------------------------

OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x



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