On-chip memory

Some form of on-chip memory is essential if a microprocessor is to deliver its best performance. With today's clock rates, only on-chip memory can support zero wait state access speeds, and it will also give better power-efficiency and reduced electromagnetic interference than off-chip memory.

On-chip memory benefits[edit | edit source]

In many embedded systems simple on-chip RAM is preferred to cache for a number of reasons :

  • It is simpler, cheaper, and uses less power. We will see in the following sections that cache memory carries a significant overhead in terms of the logic that is required to enable it to operate effectively. It also incurs a significant design cost if a suitable off-the-shelf cache is unavailable.
  • It has more deterministic behaviour. Cache memories have complex behaviours which can make difficult to predict how well they will operate under particular circumstances. In particular, it can be hard to guarantee interrupt response time. The drawback with on-chip RAM vis-d-vis cache is that it requires explicit management by the programmer, whereas a cache is usually transparent to the programmer.

Where the program mix is well-defined and under the control of the program- mer, on-chip RAM can effectively be used as a software-controlled cache. Where the application mix cannot be predicted this control task becomes very difficult. Hence a cache is usually preferred in any general-purpose system where the application mix is unknown.

One important advantage of on-chip RAM is that it enables the programmer to allocate space in it using knowledge of the future processing load. A cache left to its own devices has knowledge only of past program behaviour, and it can there- fore never prepare in advance for critical future tasks. Again, this is a difference which is most likely to be significant when critical tasks must meet strict real- time constraints.

The system designer must decide which is the right approach for a particular system, taking all these factors into account. Whatever form of on-chip memory is chosen, it must be specified with great care. It must be fast enough to keep the processor busy and large enough to contain critical routines, but neither too fast (or it will consume too much power) nor too large (or it will occupy too much chip area).

 PreviousNext