The attached file contains replacement functions for the following SDK
library functions: void * memCopyXtoP (void *pDest, const void *pSrc, ssize_t Count); void * memCopyPtoX (void *pDest, const void *pSrc, ssize_t Count); void * memCopyPtoP (void *pDest, const void *pSrc, ssize_t Count); void * memMemset (void *dest, int c, ssize_t count); void * memMemcpy (void *dest, const void *src, ssize_t count); void * memMemsetP (void *dest, int c, ssize_t count); Three of these are aliased as follows in the file "mempx.h": #define memset memMemset #define memSetP memMemsetP #define memcpy memMemcpy So, you may be using these functions in your applications if you include the file "mempx.h", either directly or indirectly. These replacement functions will, of course, take longer to execute than the original SDK library functions, because the loops are now implemented in software. This is not an issue in any of our applications. There are 3 advantages which may be important in your applications: 1) there is no possibility of causing a program crash from the Hardware Stack Overflow (Vector number 5, Address X:$000A), because there are no 'do' loops anymore; 2) interrupt latency will be improved because the 'rep' loop has been removed from the memMemset() function; and 3) there is no possibility of an ASSERT being generated if you try to move or set a large block of memory. It is our opinion here, that the above mentioned advantages are very significant, and outweigh the very small execution time increase caused by using software loops rather than hardware loops. Each of you can make your own decision in this respect. If you decide to use these replacement functions, they are located as follows (for the 807 chip): ...\src\dsp56807evm\nos\sys where "..." is the place where you installed the SDK (C:\Development\DSP568xx\Moto_SDK in our systems here). I hope you find this to be useful. Regards, Art Johnson Senior Systems Analyst PMC Prime Mover Controls Inc. 3600 Gilmore Way Burnaby, B.C., Canada V5G 4R8 Phone: 604 433-4644 FAX: 604 433-5570 Email: http://www.pmc-controls.com | |||
|
SDK memory functions with 'do' and 'rep' loops removed
Started by ●October 10, 2002