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.

C6415 Device cycle accurate simulator

Hi:

I 'm using C6415 Device cycle accurate simulator to cachetune my project,  I know if from datashit that the L1D of C6415 is 16KB, and I set L2 64 KB ram, when I place four arrays: char data0[0x1000] ,data1[0x1000] ,data2[0x1000] ,data3[0x1000] on DDR2, and cachetune it, it will be all L1D.miss.read form the graph, but when I place these four arrays on L2 RAM, it will have L1D.hit, why? Could you help me with this problem?

the code is as follows:

#define LEN 0x100

 #pragma DATA_SECTION(data1,".mydata")

#pragma DATA_SECTION(data2,".mydata")

#pragma DATA_SECTION(data3,".mydata")

 #pragma DATA_SECTION(data4,".mydata")

char data1[LEN];

char data2[LEN];

char data3[LEN];

char data4[LEN];

 int main()

 {

 int i,j,k;  

for( i = 0; i < LEN; i++ )  

{   data1[i] = 1;   data2[i] = 1;  }

 for( i = 0; i < LEN; i++ )  

{   data3[i] = 1;   data4[i] = 1;  }

 for( i = 0; i < LEN; i++ )  

{   data3[i] = 1;   data4[i] = 1;  }

  for( i = 0; i < LEN; i++ )  

 {    k = data1[i] ;    k = data2[i] ;    k = data3[i] ;    k = data4[i] ;   }

 for( i = 0; i < LEN; i++ )  

{   k = data1[i] ;   k = data2[i] ;   k = data3[i] ;   k = data4[i] ;  }

 return 0;

 }

and the cmd is :

MEMORY

 {

 L2RAM:     o = 0x00000000  l = 0x00010000 /* 64K L2 RAM */    

 DDR2:      o = 0x80000000    l = 0x10000000   /* 256 MBytes */

SECTIONS

{  

.vectors        >       DDR2    

 .text           >       DDR2    

.stack          >       DDR2   

  .far            >       DDR2    

.switch         >       DDR2    

  .data           >       DDR2    

.bss            >       DDR2    

 .const          >       DDR2    

 .sysmem         >    DDR2

.mydata         >       DDR2

}

  • Hi:

    Is there anyone who would like to help me with the problem?

    Besides,I have another problem, whether the cachetune tool can only display the hits/miss information about the code and data placed in L2 RAM?

  • Hi:

    I'm using C6415 Simulator to run my project, and I set L2 register CCFG separately to 0,1,2,3,7, to test the speed of running the program, and the build options is set to "no debug" and "-o3". There is  a fopen() function in my project.

    The problem is :When CCFG = 0,that is L2 is all ram, I select Debug-> Reset cpu,build project ,download the .out file,and then run, it will run correctly.

     But when CCFG = 1,2,3,7,that is L2 is configured to 32K ,64K,128K,256K cache ,and MAR96~103 =1, that is the address EMIFB_CE0 and EMIFB_CE1 is cachable, then repeat the seme operations,it comes to an error when call fopen(); but it is strange that when I don't select Debug-> Reset cpu, build project ,download the .out file directly, it will not warn me error. Could you help me analyse this problem?

    thank you!