1: custom data segments
# Pragma data_section (symbol, ". Section ")
Int32 symbol [length];
2: I encountered a problem a few days ago. The DSP executes an algorithm for over 100 ms. After this time, we will set some optimization options for CCS. Reduced to 42 Ms. This still cannot meet our needs. Later I learned that I did not open the cache. Therefore, the execution takes a long time.
I have been searching for it online for a long time and there is no definite way to open the cache. So here I will detail how to open the cache. Hope to help cainiao. I am also a cainiao. Everyone makes progress together. If not, please correct the old birds. Thank you.
# Define l2cfg * (unsigned int *) (0x01840000) // 6747 L2 configuration buffer register macro definition
# Define l1pcfg * (unsigned int *) (0x01840020) // 6747 L1 program configuration buffer register macro definition
# Define l1dcfg * (unsigned int *) (0x01840040) // 6747 L1 Data configuration buffer register macro definition
Void init_cache (void)
{
L1pcfg = 4;
L1dcfg = 4;
L2cfg = 0x01010002;
}
CMD file
-L rts64plus. Lib
-L c6747bsl. Lib
-Stacks 0x00001000/* stack size */
-Heap 0x00001000/* heap size */
Memory
{
VECs: O = 0x80000000 L = 0x00000f00
Armram: O = 0xffff0080 L = 0x00001f80
Dspl2ram: O = 0x00800000 L = 0x00040000
Dspl1pram: O = 0x00e00000 L = 0x00008000
Dspl1dram: O = 0x00f000l = 0x00008000
Dspl2ram2: O = 0x11800000 L = 0x0003ffff
Dspl1pram2: O = 0x11e00000 L = 0x00008000
Dspl1dram2: O = 0x11f00000 L = 0x00008000
Sharedram: O = 0x80000f00 L = 0x0001ffff
SDRAM: O = 0xc0000000 L = 0x20000000
}
Sections
{
". Vectors"> VECs
. BSS> dspl2ram
. Cinit> dspl2ram
. CIO> dspl2ram
. Const> dspl2ram
. Stack> dspl2ram
. Sysmem> dspl2ram
. Text> dspl2ram
. Switch> dspl2ram
. Far> dspl2ram
. Calcbuffer> dspl2ram
. Compxbuf> dspl2ram
. Bufs> sharedram
. Audiobuffer> SDRAM
. Buffertemp> SDRAM
. Compxbuffer> SDRAM
}
3: Questions
1: I define an array in the program to the dspl2ram segment. I don't know what's going on. The values of this array are always 0. It is normal to define sharedram or SDRAM.
2: the same program. The Algorithm Execution time yesterday was 6 ms. Today, we ran for 18 ms. Very strange. Who can help me explain it?