The following are a series of math problems common to computer systems. Work out each problem. Do the work on a separate piece of paper with a pencil and show your work. Typed/computer printed assignments not accepted. Include units of measurement in the conversion.
Base 10 - Clock speeds
Ex. 1 MHz = 1 * 10^6 cycles/sec.
Remember : 1 Hertz = 1 Hz = 1 cycle/sec.
To determine the length of a clock cycle, divide clock speed into 1.
One clock cycle is 1 / ( 1 * 10^6 cycles/sec. ) or 1/1 * 1/(10^6 cycles/sec).
1 over a power flips the units and the sign is inverted, so 1/10^6 cycles/sec becomes 10^-6 secs/cycle.
or 1 * 10^-6 secs/cycle * 1 uSec/10^-6 sec = 1 uSec/cycle
Clock lengths for other clock speeds.
Clock speed | Length of clock cycle |
1 THz TeraHertz 10^12 cycles/sec | 1 psec picosecond 1 * 10^-12 sec. |
1 GHz GigaHertz 10^9 cycles/sec | 1 ns nanosecond 10^-9 sec. |
1 MHz MegaHertz 10^6 cycles/sec | 1 us microsecond 10^-6 sec. Note u is actually greek mu. μ |
1 KHz KiloHertz 10^3 cycles/sec | 1 ms millisecond 10^-3 sec. |
See http://faculty.cs.niu.edu/~berezin/463/lec/04/units1.html
Use 6 digits precision for answers.
1. Given the following clock speeds, give the time of a single clock cycle in the units specified in the "Clock Time" column.
.
Clock speed | Cycle Time | |
A. | 25 MHz | in ns. (nanoseconds) |
B. | 200 baud (200 Hertz) | in ms. (milliseconds) |
C. | 500 MHz | in ns. (nanoseconds) |
D. | 2 GHz | in ps. (picoseconds) |
E. | 4 KHz | in us. (microseconds) |
Example : size of individual cycle in 33 MHz in ns. time. 33 MHz * (1*10^6 cycles/sec) / (1 MHz) = 33 * 10^6 cycles/sec. 1 / (33 * 10^6 cycles/sec) = 1/33 * 1/(10^6) sec./cycle. .030303 * 10^-6 sec./cycle. = (30.303 * 10^-3) * (10^3 * 10^-9) sec./cycle. 30.303 * 10^-9 sec./cycle * 1 ns/10^-9 sec. = 30.303 ns/cycle.
2. Given the following time for a single clock cycle, give the speed of the
clock in cycles/sec.
See : http://faculty.cs.niu.edu/~berezin/463/lec/04/pipelineA.html
Cycle Time | In terms of | |
A. | 1 ns. (nanoseconds) | GHz |
B. | 10 ms. (milliseconds) | Hertz |
C. | 8 us. (microsecond) | MHz |
D. | 25 us. (microseconds) | MHz |
E. | 40 ps. (picoseconds) | GHz |
Example : number of 5ns. length cycles in MHz. 5 ns./cycle * 1 * 10^-9 sec./1 ns. = 5 * 10^-9 sec./cycle 1/ ( 5 * 10^-9 sec./cycle ) 1/5 * 1/10^-9 cycles/sec. .2 * 10^9 cycles/sec. = .2 * 10^3 * 10^6 cycles/sec = 200 * 10^6 cycles/sec 20 * 10^6 cycles/sec * 1 MHz/1*10^6 cycles/sec = 200MHz.
3.,4.,5. Pipelines and Parallel architecture.
Working with units :
1 cycle/sec. * 1 inst./cycle = 1 inst./sec.
1 inst./sec. * 1 sec/cycle. = 1 inst./cycle.
Example :
Instruction takes 1 uS (microsecond) to complete : If 1 inst. / 10-6 sec.,
then 1 inst./usec. * 10^6 usec./sec. = 10^6 inst./sec.
Given a datapath with a fetch (fi), decode (de), fetch operand (fo) execute(ex), and a writeback(wb) stage.
Given a 1 GHz cpu, the cycle time is 1 ns per clock cycle.
This table presents 3 instruction types with their timing signature for each step of a fetch/execute pipeline.
Carry the number out to 6 significant digits if needed.
Problem | Type | Fetch opcode |
Decode | Fetch operands |
Execute | Write back |
3. | A | 1 clock | 1 clocks | 1 clocks | 1 clocks | 1 clock |
4. | B | 1 clock | 1 clocks | 4 clocks | 10 clocks | 4 clock |
5. | C | 1 clock | 1 clock | 4 clocks | 4 clock | 0 clock |
For each instruction type, find the following. Work all parts for one type at a time.
A. Give the time it takes to process one instruction.
B. If pipelining not supported, calculate number of instructions per second.
C. If pipeline supported and full, how often is an instruction completed.
D. Calculate number of instructions per second.
E. If the execution step is paralleled, calculate the number of instructions per second.