This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RAM is not enough

Other Parts Discussed in Thread: TMS320C5515

(1) Create a Table buffer , the  szie is 96 Bytes.

(2) Why is used x4 buffer size at first time (SARAM or DARAM)?

(3) We are using many Table buffer (e.g. image) ,  Could you provide any suggestion for our coding?

 

example code : c55_csl_3.03

EVM : TMS320C5515

 

 

unsigned char g_TABLE_XX[] = {nnnnn}; // 16*6 Bytes

Uint16 abc1,abc2;

abc1=TABLE_XX[0];

abc2=TABLE_XX[1];

 

DARAM Used

SARAM Used

Not use Global g_TABLE_XX

00003df4

0000460b

1th use Global g_TABLE_XX (abc1)

00003f7a (390Bytes)

00004612 (7 Bytes)

2th use Global g_TABLE_XX

(abc2)

00003f7a

00004619 (7 Bytes)

 

 

 

  • Hi,

    Team will work on this and will provide an update on the same.

    Thanks & regards,

    Sivaraj K

  • Don't forget that a byte/char on C55x is 16 bits.  The linker accounts for everything with 8-bit addressable units, so the size will appear to be doubled.  How many elements are there in g_TABLE_XX?

    If possible, make this table const so that it can be placed in ROM.  Doing so will also cut down on the size of the boot-time initialization tables.

  • These table are examples for your reference.

    static unsigned char Table_A[]= {
    0xFF, 0x0F, 0x0F, 0x1E, 0xFF, 0x1C, 0xAA, 0x00, 0x00, 0x55, 0x03, 0xA0, 0xAF, 0x1F, 0x1F, 0xAF,
    0xFF, 0xF8, 0xF8, 0x7C, 0xFF, 0x3C, 0xFF, 0x78, 0xF0, 0xE5, 0xC0, 0x8A, 0xA0, 0xFC, 0xFC, 0xAC,

    };

    static unsigned char Table_Bl[]= {

    0x00, 0x00, 0x00, 0x03, 0x00, 0x10, 0x00, 0x07, 0x4A, 0x10, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40,
    0x40, 0x80, 0x81, 0x51, 0x81, 0x81, 0x81, 0x8A, 0x80, 0x45, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
    0x40, 0x20, 0x10, 0xA1, 0x0E, 0xA0, 0x00, 0x5A, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x64, 0x03, 0x40, 0x60, 0x80, 0x99, 0x00, 0x00,

    0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0xF0, 0x08, 0x64, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0xC0, 0x3C, 0x02, 0x01, 0x45, 0x00, 0x80, 0x80, 0xD0, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40,
    0x80, 0x80, 0x80, 0x43, 0x23, 0x60, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x54, 0x76, 0x94, 0x40,

    0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x0D, 0x00, 0x64, 0xFF, 0x40, 0x00, 0x00, 0x42, 0x25, 0x00, 0x00, 0x06, 0x60, 0x60, 0x00,
    0x00, 0xD0, 0x00, 0x60, 0x00, 0x50, 0x01, 0x01, 0x01, 0x01, 0x34, 0x21, 0x42, 0x42, 0x61, 0x01,
    0x00, 0xF0, 0x00, 0x30, 0x50, 0x70, 0x00, 0x00,

    0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x0D, 0x00, 0x64, 0xFF, 0x40, 0x00, 0x00, 0x42, 0x25, 0x00, 0x00, 0x06, 0x60, 0x60, 0x00,
    0x00, 0xD0, 0x00, 0x60, 0x00, 0x50, 0x01, 0x01, 0x01, 0x01, 0x34, 0x21, 0x42, 0x42, 0x61, 0x01,
    0x00, 0xF0, 0x00, 0x30, 0x50, 0x70, 0x00, 0x00,

    0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x0D, 0x00, 0x64, 0xFF, 0x40, 0x00, 0x00, 0x42, 0x25, 0x00, 0x00, 0x06, 0x60, 0x60, 0x00,
    0x00, 0xD0, 0x00, 0x60, 0x00, 0x50, 0x01, 0x01, 0x01, 0x01, 0x34, 0x21, 0x42, 0x42, 0x61, 0x01,
    0x00, 0xF0, 0x00, 0x30, 0x50, 0x70, 0x00, 0x00,

    0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x0D, 0x00, 0x64, 0xFF, 0x40, 0x00, 0x00, 0x42, 0x25, 0x00, 0x00, 0x06, 0x60, 0x60, 0x00,
    0x00, 0xD0, 0x00, 0x60, 0x00, 0x50, 0x01, 0x01, 0x01, 0x01, 0x34, 0x21, 0x42, 0x42, 0x61, 0x01,
    0x00, 0xF0, 0x00, 0x30, 0x50, 0x70, 0x00, 0x00,

    0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00,
    0x00, 0x0D, 0x00, 0x64, 0xFF, 0x40, 0x00, 0x00, 0x42, 0x25, 0x00, 0x00, 0x06, 0x60, 0x60, 0x00,
    0x00, 0xD0, 0x00, 0x60, 0x00, 0x50, 0x01, 0x01, 0x01, 0x01, 0x34, 0x21, 0x42, 0x42, 0x61, 0x01,
    0x00, 0xF0, 0x00, 0x30, 0x50, 0x70, 0x00, 0x00,
    };

  • Please note below points regarding memory allocations on C5515 DSP

    1. Character occupies 2 bytes of memory as byte addressing is not possible on C5515 DSP

    2. Initializing data buffers during declaration will increase the cinit section size, in addition to bss, as much as the buffer size 

    Due to first one, Buffer of n characters will occupy 2n bytes in memory and there is no workaround for this. Memory occupied by the initialized buffer will be further increased due to increase in cinit section. You can avoid increase in cinit section by defining the buffers as 'const'  

    - Pratap.