Forum Discussion
Hi,
Cross-compiler vendors generally include a precompiled set of standard class libraries, including a basic implementation of memcpy() . Unfortunately, since this same code must run on hardware with a variety of processors and memory architectures, it can't be optimized for any specific architecture.
A variety of hardware and software factors might affect your decision about a memcpy() algorithm. These include the speed of your processor, the width of your memory bus, the availability and features of a data cache, and the size and alignment of the memory transfers your application will make.
An intimate knowledge of your target hardware and memory-transfer needs can help you write a much more efficient implementation of custom memcpy() functions.
You can also refer below link on memcpy and custom memcpy functions-
I suggest you to use the data reading using driver APIs i.e. alt_read_word();
Regards
Jeetesh