DSPRelated.com
Forums

Regarding TMS320C6727 DSP Help

Started by Chsekhar Prattipati August 29, 2008
Hi
This is chandrasekhar prattipati from BEl, Chennai, India. my card is having TMS320C6727 DSP processor in it. i created 10 tasks in DSP/BIOS environment. i allocated SDRAM for all DSP/BIOS sections, parameters. i tried to create .ais file for my .out file in i2cmaster mode using
genAIS tool. it is occupying more space(3,60,000 bytes) and giving a warning

"AIS File size exceeds SPI/I2C Master Boot limit of 64KBytes". then i removed all my tasks and created a simple project with 2 tasks with simple "printf" statements. i generated .ais file for this project. but
that itself occupying 24,000 bytes. if this is the case, i can't accomodate my original application in flash. how to reduce the size?
thanks and regards
Chandrasekhar
Prattipati,

Bringing in the printf function brings in the whole floating point library.
the floating point library is huge.
The elimination of all floating point references will greatly shrink the size of
your application.

Also, the 64k boot is for just that, booting.
I would place all the other items, like the task generation, etc (in fast your
whole application) in the rest of flash.
Then the code in the boot section of flash will have a simple job..
initialize the hardware, copy the reset of flash to ram(to a known location),
jump to the start address of the program just copied to ram.

R. Williams

---------- Original Message -----------
From: Chsekhar Prattipati
To: c...
Sent: Thu, 28 Aug 2008 19:41:50 -0700 (PDT)
Subject: [c6x] Regarding TMS320C6727 DSP Help

> Hi
> This is chandrasekhar prattipati from BEl, Chennai, India. my card
> is having TMS320C6727 DSP processor in it. i created 10 tasks in
> DSP/BIOS environment. i allocated SDRAM for all DSP/BIOS sections,
> parameters. i tried to create .ais file for my .out file in i2cmaster
> mode using genAIS tool. it is occupying more space(3,60,000 bytes) and
> giving a warning "AIS File size exceeds SPI/I2C
> Master Boot limit of 64KBytes". then i removed all my tasks and
> created a simple project with 2 tasks with simple "printf" statements.
> i generated .ais file for this project. but that itself occupying 24,
> 000 bytes. if this is the case, i can't accomodate my original
> application in flash. how to reduce the size? thanks and regards Chandrasekhar
------- End of Original Message -------
Hi Richard,

I can see that it is rather difficult to give a full explanation of an
optimizer actions in a short email. The points you listed below are
supposedly a citation, could you post a reference to a document where
the list was taken from?

Thanks,
Andrew

> Subject: Re: Regarding TMS320C6727 DSP Help
> Posted by: "Richard Williams" r...@lewiscounty.com rkwill98356
> Date: Thu Sep 18, 2008 7:28 am ((PDT))
>
> The -o1 optimization level performs the following
> --control-flow-graph simplification
> --variables actually in registers
> --loop rotation
> --removal of 'dead' code
> --expression and statement simplification
> --expansion of calls to 'inline' functions
> --local copy and constant propagation
> --remove unused assignments
> --remove local common expressions
>
> Of the several actions listed above, the usual problems develop when...
> --a wait loop is removed from the code
> --a variable referenced across multiple tasks is placed in a register
> --code in interrupt functions is seen as 'dead' code and removed
> --code only referenced by a jump table is seen as 'dead' code and removed
> --the simplification of an expression results in significant bits being lost
> --the 'interrupt' modifier missing from a function used as the target of an interrupt vector
> --local variables those value is needed on multiple passes through a section of code not listed as 'static'
> --'inline' functions that contain 'static' modifiers
> --variables used across different tasks missing the 'volatile' modifier
> --'critical' code or variables missing any semaphore protection.
> --any code that is 'timing' dependent not being marked as NOT to be optimized
> --repeating lines of code being optimized into a single or no lines of code.
> --indexing loops 'for (x=0. x < 20, x++)', where the final value of 'x' is used
> after the loop, often will result in the wrong value in 'x' after 'loop
> rotation' is performed.
>
> Subject: Re: Regarding TMS320C6727 DSP Help
> Posted by: "Richard Williams" r...@lewiscounty.com rkwill98356
> Date: Thu Sep 18, 2008 6:41 pm ((PDT))
>
> All the details about optimization (and much more) are in the TI document
> spru024e.pdf The title is:
> TMS320C2x/C2xx/C5x
> Optimizing C Compiler
> Users Guide

P.S. Found this :) I am reading the digest. Thanks, Andrew.
Andrew,

Here is the full URL to another very helpful TI document, other than the one I
suggest yesterday:
http://focus.ti.com/lit/ug/spru187o/spru187o.pdf

R. Williams
---------- Original Message -----------
From: Andrew Nesterov
To: c...
Cc: Richard Williams
Sent: Fri, 19 Sep 2008 10:19:10 -0700
Subject: [c6x] Re: Regarding TMS320C6727 DSP Help

> Hi Richard,
>
> I can see that it is rather difficult to give a full explanation of an
> optimizer actions in a short email. The points you listed below are
> supposedly a citation, could you post a reference to a document where
> the list was taken from?
>
> Thanks,
> Andrew
>
> > Subject: Re: Regarding TMS320C6727 DSP Help
> > Posted by: "Richard Williams" r...@lewiscounty.com rkwill98356
> > Date: Thu Sep 18, 2008 7:28 am ((PDT))
> >
> > The -o1 optimization level performs the following
> > --control-flow-graph simplification
> > --variables actually in registers
> > --loop rotation
> > --removal of 'dead' code
> > --expression and statement simplification
> > --expansion of calls to 'inline' functions
> > --local copy and constant propagation
> > --remove unused assignments
> > --remove local common expressions
> >
> > Of the several actions listed above, the usual problems develop when...
> > --a wait loop is removed from the code
> > --a variable referenced across multiple tasks is placed in a register
> > --code in interrupt functions is seen as 'dead' code and removed
> > --code only referenced by a jump table is seen as 'dead' code and removed
> > --the simplification of an expression results in significant bits being lost
> > --the 'interrupt' modifier missing from a function used as the target of an
interrupt vector
> > --local variables those value is needed on multiple passes through a section
of code not listed as 'static'
> > --'inline' functions that contain 'static' modifiers
> > --variables used across different tasks missing the 'volatile' modifier
> > --'critical' code or variables missing any semaphore protection.
> > --any code that is 'timing' dependent not being marked as NOT to be optimized
> > --repeating lines of code being optimized into a single or no lines of code.
> > --indexing loops 'for (x=0. x < 20, x++)', where the final value of 'x' is used
> > after the loop, often will result in the wrong value in 'x' after 'loop
> > rotation' is performed.
> >
------- End of Original Message -------