Embedded Software Optimization
Memory Optimization
In embedded system, memory is a very important and limited resource.
Therefore we are researching how to optimize the usage of memory in embedded system.
Cache and scratch-pad memory are very fast and small-size memory, and they are similar
but have different features.
Based on below features, we focus on that which, when and where data are loaded in SPM.
Cache VS. Scratch-Pad Memory
Cache
A cache is a block of memory for temporary storage of data likely to be used again.
It is managed by hardware - cache controller.
Compared to SPM(Scratch-Pad Memory)
Cache is transparent to the software, and SPM is visible to the software.
From the software viewpoint, accessing data in an SPM is the same as accessing
data in the main memory. (SPM has memory address.) Cache dosen't.
Therefore cache needs the process that compare index to tags.

Scratch-pad memory(spm)
A fast on-chip SRAM managed by software
Widely used in embedded systems
Compared to cache
SPM can be more efficient in performance, power and area cost.
SPM has the added advantage of better time predictability.
Using DMA channel, we can transfer data much faster.

