Page 131 - Anatomy of a Robot
P. 131
03_200256_CH03/Bergren 4/17/03 12:27 PM Page 116
116 CHAPTER THREE
When evaluating a processor, it can be difficult to determine just how many instruc-
tions it truly can execute per second. This can be accomplished in a few different ways:
Calculated speed Processors have a definitive clock speed that can be deter-
mined by an inspection of the PCB circuit. Usually, there will be a “crystal clock”
in a metal can immediately adjacent to the processor chip. The frequency marked
on that crystal is a starting point; it’s often about 50 MHz (50,000,000). It repre-
sents the external clock frequency of the processor. Often, the processor will mul-
tiply that external clock frequency by a factor to determine the internal clock
frequency. Once we know the internal clock frequency, we need only determine
the number of internal clock cycles that the average instruction consumes. Most
processors fix this number between 1 and 8. With these numbers in hand, we com-
pute the number of MIPS for the processor on that PCB.
Benchmarks Many people are curious about the speed and capability of differ-
ent processors and they’re eager to see comparisons. One of the difficulties
involved in making such comparisons is that each processor has its own strengths
and weaknesses. Even a wimpy 8-bit machine with the right instruction set can
whip a 32-bit machine in some tasks. It depends on what the processor designs
were optimized for.
Various organizations have proposed standardized programs (called benchmarks)
that can be executed on every machine. Generally, the benchmarks are simple pro-
grams for sorting, moving, or transforming data. Invariably, the benchmark then
rates the performance of the processor with some index, which can be compared
to that of the other processors. Since all the benchmark programs are different, it
is not unusual for processors to be rated at the top of a benchmark, but lower on
others.
If we want to determine from benchmark data how processors will do in our robot
design, we must find a benchmark that performs a task similar to the algorithms
in our robot design. If we choose a benchmark that performs tasks sufficiently dif-
ferent from our robot, we may be led astray. Generally, benchmarks are available
for downloading and execution, but they can take quite a bit of work to implement.
Here’s one (older) PDF file describing benchmark techniques. The data may be
obsolete, but the methods are still fairly modern: www.zilog.com/docs/z380/z380
bench.pdf.
These sites provide descriptions of a few benchmarks:
www.specbench.org/osg/cpu95/news/cpu95descr.html
http://spec.unipv.it/
http://www.eembc.org/
http://performance.netlib.org/performance/html/dhrystone.intro.html