42
Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Computer Architecture: IntroBeginnings

J. Schmalzel

S. Mandayam

Page 2: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

CourseIntroductionOverviewContent launch: Module 1

Page 3: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Structure & Conduct of the Course

Discussion v. LecturingInteraction: Question/Comment TicketTeam-learningIn-class labsOut-of-class labs, readings, problems

Page 4: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Introduction

Instructors: J. Schmalzel, S. MandayamCourse

Digital Foundations Introduction to Embedded Processors The Embedded Development Environment Interfacing to the Physical World Hardware and Software Trade-Offs

Page 5: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Course Goal

Goal: Impart knowledge of computer architecture to support informed decisions about the hardware, software, and the hardware/software trade-offs that underlie the computing paradigm.

Page 6: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Objectives, 1

Describe major functional elements of CISC, RISC architectures

Perform detailed analysis and synthesis of combinatorial and sequential subsystems using schematic and/or behavioral design capture w/ sim

Describe principles and applications of the three basic computing elements: CPU, MEM, I/O

Use an embedded system that includes diverse architectural features

Page 7: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Objectives, 2

Apply analytic and simulation techniques to predict and verify performance metrics

Design an example architecture using SOTA tools Identify opportunities for hardware and software

trade-offs (Insert your objectives here…) ( …and here)

Page 8: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Digital Foundations

The basic model of a computer system:

CPU MEM

I/O

Page 9: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Central Processing Unit (CPU)

ControlsExecutesComputes (Fixed- and/or Floating-

Point)

Page 10: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Memory

Program storeData storageHigh-speedLow-speedVolatile, Non-volatile

RAM, ROM, FLASH (EEPROM)

FastSlow

Page 11: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Input/Output (I/O)

Communication between CPU and outside world

FastSlowStandardized (e.g., IEEE 802.11b)Parallel (IEEE 1184)Serial (USB

2.0)

Page 12: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Hierarchical View of EP and Digital Systems

CPU MEM

I/O

GatesBoolean Algebra

Design Techniques

MSI Functions

State Machines

Interface Method

Computer Architecture

Operating System

HLLs

Page 13: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Number Systems

Binary Hexadecimal Octal

Page 14: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

For an n-bit binary number:Base notation. For a k-bit binary number with n-bits to the left of

the radix point and m-bits to the right of the radix point.

For example, 1101001.101 = ______________10

= (64 + 32 + 8 + 1) . (0.5 + 0.125)

= 105.625

Similarly, for hex:

mm

nn

nn bbbbbbbbb

2...222.222...22 33

22

11

00

11

22

22

11

...16.16...16 11

00

11

hhh nn

Page 15: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Conversions

11111111 ____________(10)(Fast way: 100000000 -1 = 255)

10101010.01 _____________ (10)(AA.416 = 10*16 + 10 + .25 = 170.25)

AB6C.D _________________________ (2) ___________(10)(1010101101101100.1101; 10*4096 + 11*256 + 6*16 + 12 + 13/16 = 43,884.8125)

Page 16: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Coding

Binary system must be used to accomplish many functions such as arithmetic and data transmission. A code defines the mapping between binary digits and the intended application.

Page 17: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Example Codes

Gray code: Only one bit change between adjacent codes (000010110100 101111011001000…)

Binary-Coded Decimal (BCD): Direct (but inefficient) coding of decimal numbers using 4 bits

Page 18: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

2’s ComplementNeed: A method to represent negative numbers. Can use a sign bit + magnitude; e.g., +5: 0 101, -5: 1 101, but there are better codes. The 2’s Complement is one.

1’s Complement: Complement each bit.1’s Complement of 11011 is 00100

2’s complement: 1’s complement + 1Example: Find 2’s complement of 1001100. _______________ (0110100.)

To check, sum of the positive and negative codes should sum to zero (ignore overflow out of msb). (“By inspection” trick: Working from right to left, write down all zeros until the first 1. Write it down, too, then complement every bit after that.)

Page 19: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Boolean Algebra

True/False High/Low On/Off +5 Vdc / 0 Vdc (+3.3 Vdc / 0 Vdc)

Notation Variable by itself is assumed “true” Variable with a symbol denotes

complementation: ¯ ~ * /

Page 20: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Boolean Identities X0=0 X1=X XX=X XX*=0 X+0=X X+1=1 X+X=X X+X*=1 X**=X

Commutative Laws:

X+Y=Y+X

XY=YX Associative Laws:

X+(Y+Z)=(X+Y)+Z

X(YZ)=(XY)Z Distributive Laws:

X(Y+Z)=XY+XZ DeMorgan’s Theorems:

(XY)*=X*+Y* (X+Y)*=X* Y*

Page 21: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Gates (p. 63 M&K)

AND ( ^ • & C: & )

OR ( + C: | )

NOT {Inverter} ( ¯ ~ * / C: ~ )

XOR ( C: )

NAND

NOR

XNOR

Page 22: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Combinatorial Design Process

Problem statementTruth table and describing Boolean AlgebraSimplificationImplementationVerification

Page 23: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Design Examples

Full Adder (Step 1: Design a device that performs binary addition, including carry input.)

FA

A

B

Ci

S

Co

Page 24: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Full Adder Truth Table (Step 2)

0 0 0 0 0

Ci A B S Co

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

Sum-of-Product Boolean expressions for S and Co:

S = Ci*A*B + Ci*AB* + CiA*B* + CiAB

Co = Ci*AB + CiA*B + CiAB* + CiAB

Page 25: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Graphical Simplification (Step 3)

0 1

0

1

00

01

11

10

Co

0

00

1

1 1

Ci

AB

BCi

AB

ACi

Co = AB + ACi + BCi

A Karnaugh-Map organizes truth table entries as a gray code--only one variable changes between adjacent cells. This lets you use the identities X+X*=1 and X*1=X to simplify by inspection. For example, the AB subcube: ABCi* + ABCi = AB(Ci*+Ci) = AB(1) = AB

Page 26: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Other Simplification Methods

Quine-McCluskey algorithm

“Espresso”http://www-cad.eecs.berkeley.edu:80/Software/software.html

http://cse.bellarmine.edu/espresso (C. Staley; Find it on download.com)

Page 27: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Espresso Demo

Simplify So and Co for FA

Page 28: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Implementation (Step 3)Translate the simplified BA to a network of gates:

&

&

&

+

CiA

CiB

AB

Co

Page 29: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Verification (Step 4)Verify the proper behavior of the design. Use simulation techniques to present test vectors and compare responses to predictions.

Exhaustive v. Statistical (Monte Carlo)

Page 30: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Combinatorial Function Blocks

DecodersMultiplexers

Page 31: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Digital Foundations, cont.

The basic model of a computer system:

CPU MEM

I/O

Page 32: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Real Gates

Logic levels are voltage levelsFinite current driveTiming diagrams Finite switching speedPropagation delaysNoise

Page 33: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Logic Levels are Voltage LevelsVdd

Vss

High

Low

VOHmin

VOLmax

VILmax

VIHmin

VOHtyp

VOLtyp

Page 34: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Finite Current Levels

VOH’/VOL’

+

RS

VOH/VOL

The electrical circuit model for a digital output (or input) includes a series impedance. This helps explain why a gate can’t source/sink unlimited amounts of current (mA v. A).

Page 35: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Finite Switching SpeedsExample: Switching speed of an inverter. A timing diagram shows behavior as it develops with time.

Input (Ideal)

Output

tr tf

Page 36: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Finite Propagation DelaysExample: Switching speed of an inverter.

Input (Ideal)

Output

tPDLH tPDHL

Page 37: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Noise

How well logic is able to reject noise is described by its Noise Immunity. The Noise Margin (NM) is the predicted ability of a device to handle noise on its inputs and still reliably determine the correct logic levels.

NML = VOLmax - VILmax

NMH = VOHmin - VIHmin

Page 38: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Logic Levels/Voltage Levels for 74HC138 w/ VCC=5 Vdc

Vdd

Vss

High

Low

VOHmin

VOLmax

VILmax

VIHmin

VOHtyp

VOLtyp

3.5 V (0.7*5.0)

1.5 V (0.3*5.0)

4.9 V (5.0-0.1)

4.999

@IOH = -20A

0.1 V (0.0+0.1)

0.001 @IOL = +20A

Page 39: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Variation in VOH and VOL

VOH or VOL

IOH

IOL This is reference direction--that’s why IOH is negative.

Ideal VOH or VOL

+

Rs

What is a typical Rs?

Page 40: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Calculation of Rs at IOL of 4 mA

VOH or VOL

IOH

IOL This is reference direction--that’s why IOH is negative.

Ideal VOH or VOL

+

Rs

Use 6 Vdc values: 0.26V/.004A = 65

Page 41: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Propagation delay (6 Vdc)

From A, B, or C to any Y output: Max 38 ns

From Enable to any Y output: Max 33 ns

Page 42: Computer Architecture: Intro Beginnings J. Schmalzel S. Mandayam

Questions, Comments, Discussion