![scratchpad memory vs cache scratchpad memory vs cache](https://techreport.com/r.x/2017_04_24_Intel_s_32GB_Optane_Memory_storage_accelerator_reviewed/Boot.png)
This contrasts with the stream based approach of modern GPUs which has more in common with a CPU cache in function. Many past 3D accelerators and games machines (including the PS2) have used DSPs for vertex transformations. * Many other processors allow L1 cache lines to be locked. It is expected this benefit will become more noticeable as the number of processors scales into the "many-core" future.
![scratchpad memory vs cache scratchpad memory vs cache](http://sandsoftwaresound.net/wp-content/uploads/2017/10/SWP70_Interfaces-300x146.jpg)
#Scratchpad memory vs cache update
In this instance, additional benefit is derived from the lack of hardware to check and update coherence between multiple caches: the design takes advantage of the assumption that each processor's workspace is separate and private. * The Cell's SPEs are restricted purely to working in their "local-store", relying on DMA for transfers from/to main memory and between local stores, much like a Scratchpad. * Sony's PS2's customized R5000 employed a 16KiB Scratchpad, to and from which DMA transfers could be issued to its GS, and main memory. It was possible to place the CPU stack here, an example of the temporary workspace usage. * The Sony PS1's R3000 had a Scratchpad instead of an L1 cache. * SH2, SH4 used in Sega's consoles could lock cachelines to an address outside of main memory, for use as a Scratchpad.
#Scratchpad memory vs cache software
They are suited to embedded systems, special-purpose processors and games consoles, where chips are often manufactured as MPSoC, and where software is often tuned to one hardware configuration. Scratchpads are not used in mainstream desktop processors where generality is required for legacy software to run from generation to generation, in which the available on-chip memory size may change. Another difference is that scratchpads are explicitly manipulated by applications. The same issues of locality of reference apply relating to efficiency of use although some systems allow strided DMA to access rectangular data sets. They are most suited to storing temporary results (such as would be found in the CPU stack for example) that typically wouldn't always need committing to main memory however when fed by DMA, they can also be used in place of a cache for mirroring the state of slower main memory. Scratchpads are employed for simplification of caching logic, and to guarantee a unit can work without main memory contention in a system employing multiple processors, especially in multiprocessor system-on-chip for embedded systems. Another contrast with a system that employs caches is that a scratchpad does commonly not contain a copy of data that is also stored in the main memory. In contrast with a system that uses caches, a system with scratchpads is a system with Non-Uniform Memory Access latencies, because the memory access latencies to the different scratchpads and the main memory vary. It can be considered as similar to an L1 cache in that it is the memory next closest to the ALU's after the internal registers, with explicit instructions to move data from and to main memory, often usingÄMA-based data transfer. In reference to a microprocessor (" CPU"), scratchpad refers to a special high-speed memory circuit used to hold small items of data for rapid retrieval. Scratchpad memory (SPM), also known as scratchpad, scatchpad RAM or local store in computer terminology, is a high-speed internal memory used for temporary storage of calculations, data, and other work in progress.