Hi,
I meet a very surprising problem increasing the DDR RAM amount, and any help
would be welcome
I'm working with the coldfire m5329 with a similar architecture to the EVM.
Everything works find with the DDR RAM MT46V16M16TG (same as on the EVM). As
I need more RAM space, I have changed it to MT46V32M16P.
I have modified dBug to take into account the 64 Mo.
When I build uClinux (2.6.17.7, build with LTIB of the BSP) with 64 Mo in
"Size Of RAM", my application run many slower.
To get evidence, I executed the following program on 2 different
configurations of uclinux, without changing either dBug or the hardware:
- With 32 Mo declared within uClinux (LTIB), it takes 2,5s to run.
- With 64 Mo declared within uClinux (LTIB), it takes more than 10s
to run !
In another test, I have also checked than the 64Mo of DDR are refreshed in
both cases.
Your help would be greatly welcome to understand how to work with 64 Mb
without losing so much execution speed.
Best regards
Philippe
Sample program:
#define MAX_ROW 1000
#define ROW_LENGTH 4000
short *pRow[MAX_ROW];
int main()
{
int i,j;
short * pWrite;
short * pRead;
struct timeval tv1, tv2;
struct timezone tz;
int t;
// Memory allocation
for (i=0; i<MAX_ROW; i++)
pRow[i]= (short *) malloc(ROW_LENGTH*sizeof (short));
// Read adress (FIFO access with FB_CS1)
pRead = (short *) 0x10080000;
gettimeofday(&tv1,&tz); // Read Start time
for (i=0; i<MAX_ROW; i++)
{
pWrite = pRow[i];
for (j=0; j<ROW_LENGTH; j++)
*pWrite++ = *pRead;
}
gettimeofday(&tv2,&tz); // Read End Time
t = (tv2.tv_usec- tv1.tv_usec) + (tv2.tv_sec - tv1.tv_sec)*1000000;
// display time duration
printf("Do %d Read/Write in %d ms\n",i*j,t/1000);
// Free allocated memory
for (i=0; i<MAX_ROW; i++)
free(pRow[i]);
}
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev