I wrote a program like the below:
#include <std.h>
#include <log.h>
#include <clk.h>
#include "L1DRAMcfg.h"
#define N 512
short x[256];
short y[256];
Void task();
/*
* ======== main ========
*/
Void main()
{
LOG_printf(&trace, "hello world!");
/* fall into DSP/BIOS idle loop */
return;
}
Void task()
{
int a[N], b[N];
int i, sum;
// Float timeout, milliSecsPerIntr, cycles;
LgUns start, stop, result;
LOG_printf(&trace, "This is the first task!");
sum = 0;
for(i = 0; i < N; i++)
{
a[i] = i;
b[i] = i;
}
for(i = 0; i < 256; i++)
{
x[i] = i;
y[i] = i;
}
start = CLK_gethtime();
for(i = 0; i < N; i++)
sum += a[i] * b[i];
for(i = 0; i < 256; i++)
sum += x[i] * y[i];
stop = CLK_gethtime();
result = stop - start;
LOG_printf(&trace, "The start time is: %d\n", start);
LOG_printf(&trace, "The stop time is: %d\n", stop);
LOG_printf(&trace, "The result is: %d\n", result);
LOG_printf(&trace, "The sum is: %d\n", sum);
}
I debug the program in emulation in CCS 5. I notice that in the task, when the program runs to the end, global variables, such as array x and y, are cached in the L1D. But local variables, such as array a and b, are not cached in any cache. I want to hnow how to change the configuration to cache the task local variables.

