logic design computer architecture and design lecture 1

17
Logic Design Computer Architecture and Design Lecture 1

Upload: felicity-greer

Post on 12-Jan-2016

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Logic Design Computer Architecture and Design Lecture 1

Logic Design

Computer Architecture and Design

Lecture 1

Page 2: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Computer Architecture?

Instruction set operation encoding, memory addressing techniques

Data representations signed magnitude, floating-point

Addressing direct, indirect, relative

I/O mechanisms memory mapped, I/O mapped

So, it is a mixture of hardwares and softwares.

2

Page 3: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

HW & SW for Computers

Hardware : Electronic components & electromechanical devices

that comprise the physical entity of the device

Software : Programs composed of a sequence of instructions System Software

Programs to make use of the core function of computers Example: Operating systems, Compilers

Application Software Programs for various users application Example: Games, Word-processor

Firmware Programs directly related to hardware control Example: Device driver

3

Page 4: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Computer Hardware

We have learned hardware design in digital logic design courses.

Brief review on digital logic design follows.

4

MemoryMemory

Central processingUnit

Central processingUnit

Input-Output processor

Input-Output processor

Input devices

Input devices

Output devices

Output devices

Page 5: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Transistors : Basic Elements for HW

Logic gates are physically implemented by Transistors.

If N & P transistors in a single semiconductor place, it is called CMOS

technology.

5

N - type

VCA

nSC

B

A-

+

P - type

VBC

pSC

B

A

-

+

Source

Drain

GateC

B

A

C

B

A

Source

DrainGateC

B

A

C

B

A

Switch Transistor Logic Symbol

Page 6: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

voutC

B

A

C

B

A

VDD

vin

x z

Details on transistors are covered in semiconductor & integrated circuit

design courses.

Our design ground is digital logic as follows.

Inverter Gate

6

Page 7: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Boolean Algebra

Boolean algebra is an algebra that deals with binary variables and logic operations.

Three representations for a function.

Boolean Function ( = Logic Expression) Algebraic expression with binary variables, logic operation symbols, parenthesis &

equal sign

Truth Table A relationship between the function and its variables

Logic Diagram Expression of Boolean function using logic gates

7

Page 8: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Examples

8

Truth Tablex

y

z

F

Logic Diagram

x y z

0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1

F

F = x + y’z

Boolean Function

Page 9: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Logic Simplification

Why ? To minimize the number of logic gates, the propagation delay and the cost

while performing the same function

How? Using the basic identities of Boolean algebra or

Using the karnaugh-map simplification or

Using other approaches

9

Page 10: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Karnaugh-Map Simplification

10

11

1

1

11

110

0001

11

10

00

01

11AB

CD

F(A,B,C,D) = (0,1,2,6,8,9,10)

F = BD’ + B’C’ + A’CD’

1

1

1 1

10

1

0

00 01 11A

BC

F(A,B,C) = (3,4,6,7)

F = BC + AC’

1 1 1

1 1

10

10

00 01 11ABCF(A,B,C) = (0,2,4,5,6)

F = C’ + AB’

Page 11: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Combinational Logic (= Circuit)

Outputs are determined by current inputs only. (No memory in combinational logic.)

11

Combinational

Circuit

m outputvariables

n inputvariables

Problem statement

Assign letter symbols to I/O

Build a truth table

Simplification for each output

Logic Diagram

Circuit Design Procedure

Page 12: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Half Adder Example

12

x y

0 0

C S

0 0

0 1

1 0

0 1

0 1

1 1 1 0

Truth Table S = x’y + xy’ = x y

C = xy

Boolean Function

xy

C

S

Logic Diagram

Page 13: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Sequential Logic

Outputs are determined by current inputs and the memory contents.

Basic unit of memory is flip-flop that stores 1 bit information.

You need to understand the concept of latch, register and RAM.

13

Page 14: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Flip-Flops

14

Q(t) Q(t+1)

0 0

S R

0 x0 11 0

1 00 1

1 1 x 0

SR Flip-Flop

Q(t) Q(t+1)

0 0

D

00 11 0

10

1 1 1

D Flip-Flop

Q(t) Q(t+1)

0 0

J K

0 x0 11 0

1 xx 1

1 1 x 0

JK Flip-Flop

Q(t) Q(t+1)

0 0

D

00 11 0

11

1 1 0

T Flip-Flop

Page 15: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Sequential Circuit Configuration

15

Combinational

Circuit

inputs outputs

Flip-Flops

clock

Page 16: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Sequential Circuit Design Flow

16

Draw a State Transition Diagram

Assign state Variables to the states

Determine the types of flip-flops to use

Translate state diagram to State Table with

current states, inputs, outputs, next states

Extend state table to Excitation Table including

inputs to flip-flops

Determine Boolean functions for the outputs

and for the inputs of flip-flops

Draw a Logic Diagram

Page 17: Logic Design Computer Architecture and Design Lecture 1

Youpyo Hong & Kangwoo Lee @ DGU

Sequential Circuit Example

17

J Q

K

J Q

K

A

B

clock

x

JA = Bx JB = x

KB = xKA = Bx

State Diagram

Variables

Flip-flop types

State Table

Excitation Table

Boolean function

Logic Diagram

Procedure