+ All Categories
Home > Documents > CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the...

CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the...

Date post: 19-Jan-2016
Category:
Upload: wilfrid-farmer
View: 226 times
Download: 0 times
Share this document with a friend
Popular Tags:
31
CBP 2006 Comp 4070 Concepts and Ph ilosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
Transcript
Page 1: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

1

Wrestling with Complex Stuff.

With the Correct Approach, even the smallest guy will succeed!

Page 2: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

2

Data Memory

Code Memory

ALU

X

Y

W

X Y

W

0

1

7

Digital Logic Where?

Control Circuits – CPU control path - system board

(later)ALU Structure – add, sub, and, or, not

MUXES

Address Decoder

Page 3: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

3

Boolean Notation, Truth Tables

A and B

AB

A or B

A + B

NOT A

A_

A B C

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

Easy Way to write truth tables - count in binary !

AB

O

AB

O

A O

A B O

0 0 0

0 1 0

1 0 0

1 1 1

A B O

0 0 0

0 1 1

1 0 1

1 1 1

A O

0 1

1 0

Page 4: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

4

D in

Control

D out

D inControl

D out

0 0 0

0 1 0

1 0 0

1 1 1

Page 5: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

5

Digi Logic Design 1 - use Gates

AB

O

A B O

0 0 1

0 1 0

1 0 0

1 1 1

Comparator Circuit – outputs a ‘1’ if A and B are equal, else ouput a ‘0’

111

100

Make each individual term

2.

Combine the terms with OR gate

3.

Look for lines with out = ‘1’

1.

Page 6: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

6

… again with Boolean Algebra

A B O

0 0 1

0 1 0

1 0 0

1 1 1 A.B

A.B__

A.B + A.B__

A.B

A.B_ _

B

AA

B

_

_

“Not A and Not B”

“A and B”

Page 7: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

7

Address Decoder Exercise

A BO1

O2

O3

O4

0 0 1 0 0 0

0 1 0 1 0 0

1 0 0 0 1 0

1 1 0 0 0 1

AB

O1O2O3O4 O1 = A.B

__

1 2

aU1

1

23

aU2

3 4

bU1

A

B

Page 8: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

8

r0

Decoder Application

r1

r2

r0X

Y

W

X Y

W

Selecting Registers, e.g, add r2,r1,r0

MIPS has 5-bit fields for registers, so are 32

add rd rs rt unused

0

csr0r0

Registers

decoder

Page 9: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

9

A B CGeneral Product

. .A BC

Page 10: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

10

MUX Exercise

C A B O

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 1

A

BOp

C

A

B O

C = 0

A

B O

C = 1

What is MUX doing here ?

Page 11: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

11

MUX is a Selector

A

BOp

C

C A B O

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 1

Page 12: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

12

1

23

aU1

4

56

bU1

1

23

aU2

12

aU

3

A

B

C

Page 13: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

13

Multibit MUX

A

BO

C

A

B

C

1

23

aU1

4

56

bU1

1

23

aU2

12

aU

3

9

108

cU1

12

1311

dU1

4

56

bU2

Page 14: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

14

MUX Application

ALU

Y’

Y

Selection of Datapath into one ALU input.

Datapath Y from instruction add r2,r0,r1

Datapth Y’ from instruction addi r2,r0,4

Sam has been designed so all immediate constants come in via Y’

add rd rs rt unused

Immediate bit of op-code

Page 15: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

15

Digi design 2 - use MUXes

A B O

0 0 I1

0 1 I2

1 0 I3

1 1 I4

A B

Op

In 0

In 1

In 2

In 3

A B O

0 0 0

0 1 1

1 0 1

1 1 0

A B

Op

0 0

0 1

1 0

1 1

0

1

1

0

“ Muxes can be used to implement arbitrary combinatorial circuits “

1

2

3

0

Page 16: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

16

MUX Design Exercise

3 input parity detector

A B C O

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

Page 17: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

17

Programmable Logic Arrays

Fuse

Page 18: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

18

Extending da Number of Bits

A B

Out

0 0

0 1

1 0

1 1

0

1

1

1

A B

Out1

0 0

0 1

1 0

1 1

0

1

1

0

Some function

A B

Out2

N-bits

( = N wires)

1

2

3

0

1

2

3

0

Page 19: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

19

Designing Using ROM/RAM

A B

Out2

0 0

0 1

1 0

1 1

0

1

1

1

A B

Out1

0 0

0 1

1 0

1 1

0

1

1

01 1 1 00 1 1 0

decoder

A B

Out 1

Out 2

Several MUX’es fed with the same A,B input produces a multibit output. This looks like a ROM

1

2

3

0

1

2

3

0

123 0

Page 20: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

20

Let’s Build an ALU

+

B

A

Carry In

Carry Out S1 S0

1

2

1

3

1. Logical Functions

2. Arithmetic Functions

3. MUX – Selection of Function.

Page 21: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

21

Sequential Circuits

Traffic Lights

Washing Machines

Fetch-Execute Cycle

Page 22: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

22

Circuits with Memory

1

1

A B O

0 0 1

0 1 1

1 0 1

1 1 0

1

1

Page 23: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

23

Set

Reset

Q

Page 24: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

24

Counters

T0 T1 T2 T3 T4

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

Clock

4-bit

Counter

0 1 0 0 (4)

Reset

How to get this to sequence 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 ?

Page 25: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

25

Traffic Light Sequencing

Clock

4-bit

Counter

0 1 0 0 (4)

Reset

T0 T1 T2 T3

Combinatorial

Logic

T2

T3T0

T1

Page 26: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

26

Fetch Execute SequencingT1 T2 T3 T4 T5

Fetch Decode, Reg Op

ALU OpMem Access

Reg Write

ALU31

+

--

+

--ALU

Counter

Decoder

Clock

Data Memory

Code Memory AL

U

X

Y

W

X Y

W

0

1

7

Page 28: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

28

N-MOS

in

P-MOS

in

CMOS : Complementary

Transistors

Page 29: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

29

N-MOS

In = 0 In = 1

P-MOS

In = 1In = 0

Transistors are Switches

Page 30: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

30

1

0

in out

Transistor Symbols

Logic Gate Symbol

Inverter

Page 31: CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!

CBP 2006 Comp 4070 Concepts and Philosophy of Computing

31

1

0

B

A B

A

out

1

0

A B O

0 0

0 1

1 0

1 1

What’s this?


Recommended