Download presentation
Presentation is loading. Please wait.
Published byDustin Goodwin Modified over 8 years ago
1
1 Review Ellen Spertus MCS 111 December 3, 2002
2
2 Bedichek follow-up Guests –Rob Bedichek (rob@bedichek.org) –Annie Warren Bedichek (annie@bedichek.org) Topics –Clean rooms –Process technology
3
3 Clean rooms http://www.intel.com/education/teachtech/learning/chips/cleanroom.htm
4
4
5
5 Topics Fundamentals –Boolean functions –Binary arithmetic –Digital electronics Assembly language Processors Pipelining Caches
6
6 Boolean functions Functions: and, or, not, xor, nand, nor Truth tables –inputs –outputs Converting truth tables to functions –Line-by-line –Karnaugh maps Universality
7
7 Gates can be built from switches
8
8 Konrad Zuse’s Z1 (1938)
9
9 Components of early digital computers Mechanical relays –Z1 (1938) Electromagnetic relays –Z3 (1938-1941) –Mark 1 (1944) Vacuum tubes –ENIAC (1946) Transistor (1947)
10
10 Integrated circuits Integrating multiple components (resistors, transistors, and capacitors) onto a single semiconductor chip Inventors 1958-1959 –Jack Kilby, TI –Robert Noyce Fairchild Semiconductor Intel
11
11 Microprocessors Intel 4004 (1971) –2300 transistors –4-bit processor –108 KHz Intel Pentium 4 (2002) –55 million transistors –32-bit processor –2.4 GHz
12
12 Rules for Karnaugh maps Label each axis with a gray code, i.e., only change one bit at a time Regions can stretch horizontally or vertically Each side of a region must be a power of 2 (e.g., 1, 2, or 4). For simplest formula, choose biggest regions Regions may wrap around the edges
13
13 Binary arithmetic How to convert between base-2 and base-10 How to represent numbers in other bases How to express binary addition as a boolean function
14
14 Big picture Any number can be represented as 0s and 1s Functions can be represented as a table Any table of 0s and 1s can be interpreted as a truth table Any truth table can be converted into a boolean function We can implement boolean functions with switches, vacuum tubes, or transistors
15
15 Digital electronics: combinational logic Combinations of and, or, not, etc. There can be no cycles Outputs depend only on the current inputs Examples –adder –multiplexor –selector
16
16 Digital electronics: sequential logic Contains cycles Has state (memory) Outputs depend on current inputs and saved state
17
17 Digital electronics: clocks Timing diagrams Propagation delay Frequency vs. time Metric prefixes –G, M, K –m, , n
18
18 Assembly language MIPS assembly language Machine language Bytes vs. words Numbers –Signed and unsigned integers –Floating point numbers Mite
19
19 Assembly language: big picture
20
20 Bytes vs. words Which of the four bytes in a word is the most significant byte (MSB)? –Big-endian The “big end” (MSB) is at the lowest address IBM 370, PDP-10, Motorola –Little-endian The “little end” (LSB) is at the lowest address PDP-11, VAX, Intel
21
21 MIPS assembly language r-type instructions –three registers (two source, one destination) –examples: i-type instruction –one immediate source, one register source –examples: j-type instruction –26 bits for jump target
22
22 MIPS calling convention Callee-saved registers are placed on stack Arguments are placed in $a0..$a3 jal to subroutine puts PC+4 into $ra –Caller-saved registers are placed on stack –Result is computed and put in $v0 –Caller-saved registers are restored from stack –Return is made to address in $ra Callee-saved registers are restored from stack
23
23 Signed integers signed unsigned -128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 How to extend a number How to invert a number How to compare numbers
24
24 IEEE standard floating-point Single precision –32 bits sign: 1 bit exponent: 8 bits significand: 23 bits –Bias: 127 Double precision –64 bits sign: 1 bit exponent: 11 bits significand: 52 bits –Bias: 1023 Normalize number so that a single 1 is to the left of the point, e.g., 1.00100111 x 2 20
25
25 Processors Data path (where data flows) Control signals –Control multiplexers –Control ALU –Enable registers –Read or write memory units
26
26 Single-cycle datapath characteristics Every instruction takes the same amount of time (i.e., one cycle) Each set of instruction bits must be converted into a set of control bits Memory units and registers are only written at the end of each cycle (i.e., once per instruction)
27
27 Single-cycle data path
28
28 Multi-cycle datapath characteristics Different instructions take different numbers of cycles The same piece of hardware (ALU, memory unit) may be used more than once per instruction Each machine instruction must be converted into several sets of control signals
29
29 Multi-cycle datapath
30
30 Pipelining Pipelining is a way of speeding up programs by overlapping execution of their instructions Hazards are obstacles to pipelining –Structural hazards: add more hardware –Control hazards: stall if branch mispredicted –Data hazards: use bypasses and stall as needed Reorder code to minimize hazards
31
31 Pipelined datapath
32
32 Comparing MIPS with Mite
33
33 Pipelining Mite How to divide it? –Instruction fetch (100 ns) –Instruction decode (40 ns) –Register read/drive constant (15 ns) –ALU (60 ns) –Register write (20 ns) Do we have to worry about hazards? –Structural hazards –Data hazards –Control hazards
34
34
35
35 Branch hazard Sample code: 0: BEQ 10 1: A = 25 Change: If branch taken in previous instruction (0), don’t perform write in current instruction (1).
36
36 Caches Problem: Main memory is slow Solution: –Build small fast memory –Store in cache data likely to be requested temporal locality spatial locality
37
37 Cache variables Number of blocks n Block size: how much data to bring in at a time Degree of associativity –direct-mapped (1-way set associative) –k-way set-associative (k usually is 2 or 4) –fully associative (n-way set associative) Write policy –write back [when data is flushed from cache] –write through [to memory immediately]
38
38 Summary You know how to build a computer out of a sufficient number of nand gates You know how to make it run fast –multi-cycle datapath –pipelining –caches What next?
39
39 Moore’s Law The number of transistors that can be placed on the same area of a microprocessor doubles every 1-2 years – Gordon Moore, 1965/1973 Has held true ever since 1965! Note semi-log scale.
40
40 Ray Kurzweil, The Age of Spiritual Machines, p. 104
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.