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.

关于cache view的问题



我有这么一个程序:

#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);
}

然后在CCS 5中debug。我发现在cache view中能看到全局变量x和y的缓存情况,但却看不到局部变量a和b的缓存情况。请问是什么原因?