DSPRelated.com
Forums

Fwd: Re: memory reusabilty and real time

Started by Bernhard Holzmayer June 23, 2004

On Tuesday 22 June 2004 17:56, sandeep kumar wrote:
> Hi all
> i am working on SHARC 21060 using VDSP++ 3.5.i have reached a
> stage in my project,where i have to combine various modules which
> will be invoked in sequential manner, at differnt times, in real
> time. how memory can be reused which has been reserved for on
> particulae code.i want to free memory as soon as role of one code
> is over.what are the approaces?
> so far i was working in an offline mode by colecting
> dataand running my code on that data.what are the approaches to
> make it real time?i am trying by using Chained DMA? is there any
> other way?
>
> it will be very helpful to me if somebody can give clues about how
> to approach these problems.any literature or website on this?
>
> Thanks in adavnce
> sandeep Kumar

I'm not quite sure if I understood your issue...

If you are sure that your modules don't run at the same time,
I'd do either of two things:
in C or C++ I'd use the library functions to allocate/deallocate
memory from the heap. If you deal with huge memory portions, you'll
certainly want to increase heap range. This makes it more
transparent to the reader of the code, that memory is free
afterwards.

The easiest way to do so is to define variables locally (inside a
block) to the module.

If you're working in Assembler, you might define a global variable
like .var shared_memory[theSIZE];
Then, you can use this memory in every module, just making it visible
to each module with a .extern / .global declaration pair.

If it's not perfectly clear, that modules don't access memory at the
same time, you'd better secure the memory with a sort of access
semaphore and raise some error handling if constraints are hurt.

Regards

Bernhard Holzmayer




Hi sandeep,

I worked on this type of reusability of memory in fixed point
processors(218x) using overlay concepts.
i am not sure about overlays in SHARC processor.go to ADI's website you
will find some application notes on meory overlays and how to use them.

regards
surendra

>
> On Tuesday 22 June 2004 17:56, sandeep kumar wrote:
>> Hi all
>> i am working on SHARC 21060 using VDSP++ 3.5.i have reached a
>> stage in my project,where i have to combine various modules which
>> will be invoked in sequential manner, at differnt times, in real
>> time. how memory can be reused which has been reserved for on
>> particulae code.i want to free memory as soon as role of one code
>> is over.what are the approaces?
>> so far i was working in an offline mode by colecting
>> dataand running my code on that data.what are the approaches to
>> make it real time?i am trying by using Chained DMA? is there any
>> other way?
>>
>> it will be very helpful to me if somebody can give clues about how
>> to approach these problems.any literature or website on this?
>>
>> Thanks in adavnce
>> sandeep Kumar
>
> I'm not quite sure if I understood your issue...
>
> If you are sure that your modules don't run at the same time,
> I'd do either of two things:
> in C or C++ I'd use the library functions to allocate/deallocate
> memory from the heap. If you deal with huge memory portions, you'll
> certainly want to increase heap range. This makes it more
> transparent to the reader of the code, that memory is free
> afterwards.
>
> The easiest way to do so is to define variables locally (inside a
> block) to the module.
>
> If you're working in Assembler, you might define a global variable
> like .var shared_memory[theSIZE];
> Then, you can use this memory in every module, just making it visible
> to each module with a .extern / .global declaration pair.
>
> If it's not perfectly clear, that modules don't access memory at the
> same time, you'd better secure the memory with a sort of access
> semaphore and raise some error handling if constraints are hurt.
>
> Regards
>
> Bernhard Holzmayer > _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
> of this message will receive your answer. You need to do a "reply all" if
> you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3
>
> Yahoo! Groups Links >



hai sandeep,

i reused many of my memory again and
again(adsp218x fixed point processor).what i did is i
had splited the memory in two section one is for
variables which values shouldnot affect by another
module of my program(like constants and
filtercoefficients and so on i.e absolutely permenent
varaible).

and another one section is for all variable and
temporary storage.here u can trace out which section
using how much of memory and according to that u can
assign the memory area. with good regards
ayyams

--- wrote: > Hi sandeep,
>
> I worked on this type of reusability of memory
> in fixed point
> processors(218x) using overlay concepts.
> i am not sure about overlays in SHARC processor.go
> to ADI's website you
> will find some application notes on meory overlays
> and how to use them.
>
> regards
> surendra
>
> >
> > On Tuesday 22 June 2004 17:56, sandeep kumar
> wrote:
> >> Hi all
> >> i am working on SHARC 21060 using VDSP++
> 3.5.i have reached a
> >> stage in my project,where i have to combine
> various modules which
> >> will be invoked in sequential manner, at differnt
> times, in real
> >> time. how memory can be reused which has been
> reserved for on
> >> particulae code.i want to free memory as soon as
> role of one code
> >> is over.what are the approaces?
> >> so far i was working in an offline
> mode by colecting
> >> dataand running my code on that data.what are the
> approaches to
> >> make it real time?i am trying by using Chained
> DMA? is there any
> >> other way?
> >>
> >> it will be very helpful to me if somebody can
> give clues about how
> >> to approach these problems.any literature or
> website on this?
> >>
> >> Thanks in adavnce
> >> sandeep Kumar
> >
> > I'm not quite sure if I understood your issue...
> >
> > If you are sure that your modules don't run at the
> same time,
> > I'd do either of two things:
> > in C or C++ I'd use the library functions to
> allocate/deallocate
> > memory from the heap. If you deal with huge
> memory portions, you'll
> > certainly want to increase heap range. This makes
> it more
> > transparent to the reader of the code, that
> memory is free
> > afterwards.
> >
> > The easiest way to do so is to define variables
> locally (inside a
> > block) to the module.
> >
> > If you're working in Assembler, you might define a
> global variable
> > like .var shared_memory[theSIZE];
> > Then, you can use this memory in every module,
> just making it visible
> > to each module with a .extern / .global
> declaration pair.
> >
> > If it's not perfectly clear, that modules don't
> access memory at the
> > same time, you'd better secure the memory with a
> sort of access
> > semaphore and raise some error handling if
> constraints are hurt.
> >
> > Regards
> >
> > Bernhard Holzmayer
> >
> >
> >
> >
> >
> > _____________________________________
> > Note: If you do a simple "reply" with your email
> client, only the author
> > of this message will receive your answer. You
> need to do a "reply all" if
> > you want your answer to be distributed to the
> entire group.
> >
> > _____________________________________
> > About this discussion group:
> >
> > To Join: Send an email to
>
> >
> > To Post: Send an email to
> >
> > To Leave: Send an email to
>
> >
> > Archives: http://groups.yahoo.com/group/adsp
> >
> > Other Groups:
> http://www.dsprelated.com/groups.php3
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
> _____________________________________
> Note: If you do a simple "reply" with your email
> client, only the author of this message will receive
> your answer. You need to do a "reply all" if you
> want your answer to be distributed to the entire
> group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to > To Post: Send an email to
>
> To Leave: Send an email to > Archives: http://groups.yahoo.com/group/adsp
>
> Other Groups: http://www.dsprelated.com/groups.php3
>
> Yahoo! Groups Links >

________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
http://yahoo.shaadi.com/india-matrimony/