Choosing a processor
So far , the main processor types used in embedded systems along with various examples have been dis-cussed. There are very many types available ranging in cost, processing power and levels of integration. The question then arises concerning how do you select a processor for an embedded system?
The two graphs show the major trends with processors. The first plots system cost against performance. It shows that for the highest performance discrete processors are needed and these have the highest system cost. For the lowest cost, microcontrollers are the best option but they do not offer the level of performance that integrated or discrete processors offer. Many use the 8 bit accumulator processor architecture which has now been around for over 20 years. In between the two are the integrated processors which offer medium performance with medium system cost.
The second graph shows the trend towards system integra-tion against performance. Microcontrollers are the most inte-grated, but as stated previously, they do not offer the best perform-ance. However, the ability to pack a whole system including memory, peripherals and processor into a single package is attrac-tive, provided there is enough performance to perform the work required.
The problem comes with the overlap areas where it be-comes hard to work out which way to move. This is where other factors come into play.
Does it have enough performance?
A simple question to pose but a difficult one to answer. The problem is in defining the type of performance that is needed. It may be the ability to perform integer or floating point arithmetic operations or the ability to move data from one location to another. Another option may be the interrupt response time to allow data to be collected or processed.
The problem is that unless the end system is understood it is difficult to know exactly how much performance is needed. Add to this the uncertainty in the software programming overhead, i.e. the performance loss in using a high level language compared to a low level assembler, and it is easy to see why the answer is not straightforward.
In practice, most paper designs assume that about 20–40% of the processor performance will be lost to overheads in terms of MIPs and processing. Interrupt latencies can be calculated to give more accurate figures but as will be explained in Chapter 7, this has its own set of problems and issues to consider.