Microprocessor Design/Performance

From testwiki
Revision as of 02:15, 3 January 2008 by imported>DavidCary (benchmarking)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Microprocessor Design

Clock Cycles

The clock signal is a 1-bit signal that oscillates between a "1" and a "0" with a certain frequency. When the clock transitions from a "0" to a "1" it is called the positive edge, and when the clock transitions from a "1" to a "0" it is called the negative edge.

The time it takes to go from one positive edge to the next positive edge is know as the clock period, and represents one clock cycle.

The number of clock cycles that can fit in 1 second is called the clock frequency. To get the clock frequency, we can use the following formula:

Clock Frequency=1Clock Period

Clock frequency is measured in units of cycles per second.

Cycles per Instruction

In many microprocessor designs, it is common for multiple clock cycles to transpire while performing a single instruction. For this reason, it is frequently useful to keep a count of how many cycles are required to perform a single instruction. This number is known as the cycles per instruction, or CPI of the processor.

Because all processors may operate using a different CPI, it is not possible to accurately compare multiple processors simply by comparing the clock frequencies. It is more useful to compare the number of instructions per second, which can be calculated as such:

Instructions per Second=Clock FrequencyCPI

One of the most common units of measure in modern processors is the "MIPS", which stands for millions of instructions per second. A processor with 5 MIPS can perform 5 million instructions every second. Another common metric is "FLOPS", which stands for floating point operations per second. MFLOPS is a million FLOPS, BFLOPS is a billion FLOPS, and TFLOPS is a trillion FLOPS.

CPU Time

CPU Time is the amount of time it takes the CPU to complete a particular program. CPU time is a function of the amount of time it takes to complete instructions, and the number of instructions in the program:

CPU time=Instruction Count×CPI×Clock Cycle Time

Performance

Amdahls Law

Template:Wikipedia

Amdahl's Law is a law concerned with computer performance and optimization. Amdahl's law states that an improvement in the speed of a single processor component will have a comparatively small effect on the performance of the overall processor unit.

In the most general sense, Amdahl's Law can be stated mathematically as follows:

Δ=1k=0n(PkSk)

where:

  • Δ is the factor by which the program is sped up or slowed down,
  • Pk is a percentage of the instructions that can be improved (or slowed),
  • Sk is the speed-up multiplier (where 1 is no speed-up and no slowing),
  • k represents a label for each different percentage and speed-up, and
  • n is the number of different speed-up/slow-downs resulting from the system change.

For instance, if we make a speed improvement in the memory module, only the instructions that deal directly with the memory module will experience a speedup. In this case, the percentage of load and store instructions in our program will be P0, and the factor by which those instructions are sped up will be S0. All other instructions, which are not affected by the memory unit will be P1, and the speed up will be S1 Where:

P1=1P0
S1=1

We set S1 to 1 because those instructions are not sped up or slowed down by the change to the memory unit.

benchmarking