Forum Discussion
Altera_Forum
Honored Contributor
22 years agosdram transfer
We have tested block transfer in sdram with memcpy() fonction on développement kit stratix 1S10 NIOS II with uclinux v1.1. The frequency CPU is 50Mhz. We obtained with nois ii /s (no data cac...
Altera_Forum
Honored Contributor
22 years agoKen,
(I am working with Fred, but on the software side ...) For 32bit transfers, we just use a hand-made loop with 32bit pointers (see below). With 8bit pointers (=8bit xfer), we get the same throughput as with memcpy(), so it seems there is no optimisation in memcpy(). Bruno. --------------- static void myMemcpyLong(const char *src, char *dest, int taille) { /* This code will fail when buffers or size are not properly aligned, * so it is not a plug-to-plug replacement for memcpy(). * (anyway 'src' and 'dest' parameters are swapped ...) */ register const long *mySrc = src; register long *myDest = dest; while (taille > 0) { *myDest++ = *mySrc++; taille -= sizeof(*mySrc); } } /* myMemcpyLong */