在调memory test 的例程,之前都还好,现在仔细研究的时候,发现计时器突然不对了。
代码中TSCL=0;用来启动tsc中午开始不起作用了。
tscl=TSCL;
tsch=TSCH;
printf("Memory TEst start at %lld cycle\n",_itoll(tsch,tscl));
之前这里应该是从1cycle开始
现在TSCL=0 不起作用了,从寄存器里看断点到这里,都没有改变,之后计时的时间也是一个非常大的数基础上增加
tscl 清零不起作用了,但我没改动程序啊。
xing wang1:
对了,应该是说错了。之前是在仿真模式下,从1cycle开始,但是实际加载到板子上后,timer却没起作用
xing wang1:
回复 xing wang1:
求解答啊,没头绪啊
xing wang1:
回复 xing wang1:
继续求助啊,实在不明白仿真模式和连接板子加载程序这个计时器有什么区别
程序如下;
int i,j;
unsigned int* testaddress;
testaddress=(unsigned int*)DDR_TEST_START_ARRD;
KeyStone_main_PLL_init (10, 1);//for 100MHz input clock
//DDR speed = 66.67*20/1= 1333
KeyStone_DDR_PLL_init (20, 1);
//Shannon_VDB_DDR_Init(666.667);//for 1333Mbps
Shannon_EVM_DDR_Init(666.667);//for 1333Mbps
//EDMA_init_for_mem_test();
if(NYQUIST==Get_dsp_type())
/**/{
//Nyquist has 1MB LL2/core, 2MB SL2
uiLL2EndAddress= 0x00900000;
uiSL2EndAddress= 0x0C200000;
uiRemappedSL2EndAddress= REMAPPED_SL2_TEST_START_ARRD+0x200000;
uiDDREndAddress= 0xA0000000;
}
else if(SHANNON==Get_dsp_type())
{
//Shannon has 0.5MB LL2/core, 4MB SL2
uiLL2EndAddress= 0x00880000;
uiSL2EndAddress= 0x0C400000;
uiRemappedSL2EndAddress= REMAPPED_SL2_TEST_START_ARRD+0x400000;
uiDDREndAddress= 0xA0000000;
}
else
{
puts("Unknown DSP type!");
uiLL2EndAddress= 0x00840000;
uiSL2EndAddress= 0x0C040000;
uiRemappedSL2EndAddress= REMAPPED_SL2_TEST_START_ARRD+0x40000;
uiDDREndAddress= 0x81000000;
}
/**/
uiLL2StartAddress= get_unused_L2_address();
TSCL = 0; //start TSC
tscl= TSCL;
tsch= TSCH;
printf("Memory Test Start at %lld cycle\n", _itoll(tsch, tscl));
for(j=0;j<100;j++)
{
testaddress[j]=(unsigned int)j;
}
tscl= TSCL;
tsch= TSCH;
printf("Memory Test Start at %lld cycle\n", _itoll(tsch, tscl));
xing wang1:
回复 xing wang1:
仿真模式下: TSCL=0会使TSC归零,而连接板子加载后却不会归零