important components, blocks and methodologies. to remember 1.exors 2.counters and generalized...

52
Important Components, Blocks and Methodologies

Upload: damon-francis

Post on 03-Jan-2016

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Important Components, Blocks and Methodologies

Page 2: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

To remember1. EXORS2. Counters and Generalized Counters3. State Machines (Moore, Mealy, Rabin-Scott)4. Controllers (FSM for control + Data Path)5. Iterative Circuits6. Generalized Register7. Pipelined8. Cellular Automata9. Oracle10.Data Flow Graph11.Butterfly12.Ping-Pong Architecture13.Trees14.Sequence Generators (permutations, selections, tree-search

strategies)15. Sequence Detectors16.Sequence Transformers

Page 3: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Useful tool for your creativity!

Cellular Automaton

Systolic Controller Ping-Pong Pipelined Combinational Hierarchical Iterative Circuit

Sorter X X X X X

Fast Fourier Butterfly

X X X X X

Max of N numbers

X X X X

Matrix – Vector Multiplication

X X X X X

Comparator of order

X X X X X X

Morphological Image Processing

X X X X X X

Other??

architecture

Design problem

Page 4: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

XORs and XORs and XNORsXNORs

Page 5: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

XOR

Page 6: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

XOR gates

A 0 = AA 1 = A’A A’ = 1A + B = A B ABAB’ + A’B = AB’ A’BA B’ = A’ B = (A B)’

Page 7: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Cascading XOR gates

Page 8: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Parity Parity GenerationGeneration

Page 9: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

74x280 9-bit odd/even parity 74x280 9-bit odd/even parity generatorgenerator

Page 10: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Tree and Tree and Iterative Iterative circuitscircuits

Page 11: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Fig.6.74. XORs in comparators

Always two choices:• Tree• Linear array (iterative)

Page 12: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Big OR functions

Page 13: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Sequence Sequence DetectorsDetectors

Page 14: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

14

Sequence DetectorOne-input/one-output sequence detector: produces output value 1 every

time sequence 0101 is detected, else 0• Example: 010101 -> 000101

State diagram and state table:

Transition and output tables:

A B C D0/0

0/0

1/1

1/0

0/00/0

1/0

1/0

Page 15: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

15

Sequence Detector (Contd.)Excitation and output maps:

Logic diagram:

1

1

1 11

y1y2

1

1

(b) Y1 map.

0 1

00

01

11

10

x

1

(a) z map.

0 1

00

01

11

10

x

1

(c) Y2 map.

0 1

00

01

11

10

xy1y2y1y2

z

y1Y1D

x

y2Y2D

z = xy1y2’y1 = x’y1y2 + xy1’y2 + xy1y2’y2 = y1y2’ + x’y1’ + y1’y2

Clock in D type synchronized FF is not shown

Page 16: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Sequence Detector (Contd.)Another state assignment:

z = xy1y2

Y1 = x’y1y2’ + xy2

Y2 = x’

State assignment is really important for iterative circuits

Page 17: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Big Big CountersCounters

Page 18: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

18

Binary CounterOne-input/one-output modulo-8 binary counter: produces output value 1 for

every eighth input 1 value

State diagram and state table:

0/0 0/01/1 1/0

0/0

0/0

1/0 1/0

S0

S3S5

S7

S6 S2

S4

S1

1/0

1/01/0

1/0

0/0

0/0

0/00/0

• This is different type of graph of counter that we discussed before.

• Earlier the graph had no input and changes to new states corresponded to clock

• This graph assumes asynchronous FFs.

Mealy tableStays in the same state

Page 19: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Binary Counter (Contd.)Transition and output tables:

Excitation table for T flip-flops and logic diagram:

T1 = xT2 = xy1

T3 = xy1y2

z = xy1y2y3

z

T1

1

0

x

y1

T3

1

0

y3

T2

1

0

y2

Realization with asynchronous FFs, no clock

Page 20: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Implementing the Counter with asynchronous SR Flip-flops

Transition and output tables:

Excitation table for SR flip-flops and logic diagram:

• Trivially extensible to modulo-16 counter

S1 = xy1’R1 = xy1

S2 = xy1y2’R2 = xy1y2

S3 = xy1y2y3’R3 = z = xy1y2y3

S3

R3

y30

1y3

y3

S1

R1

x

y10

1y1

y1

S2

R2

y20

1y2

y2

Cell 1 Cell 3Cell 2

z

Asynchronous FFs, no clock

Page 21: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Counter Problems to think about:

• Design a counter modulo 2k

• Design a counter modulo 12348

• Design a counter in Gray Code.

• Design a counter in arbitrary code.

• Design a switchable counter in two codes with two capacities

• Design a reversible counter that can count up or down

Page 22: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Sequential Sequential Parity Parity

GeneratorsGenerators

Page 23: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

23

Parity-bit GeneratorSerial parity-bit generator: receives coded messages and adds a parity bit

to every m-bit message• Assume m = 3 and even parity

State diagram and state table:

A

B C

D

0/0

0/00,1/0

1/0

0/0

0/0

1/0

1/0

E

F G

0/0

1/0

1/0

0,1/1

J1 = y2

K1 = y2’J2 = y1’K2 = y1

J3 = xy1’ + xy2

K3 = x + y2’ z = y2’y3

Page 24: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Controllers Controllers = =

(FSM+DataPath)(FSM+DataPath)

Page 25: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Sequential Circuit as a Control Element

Control element: streamlines computation by providing appropriate control signals

Example: digital system that computes the value of (4a + b) modulo 16• a, b: four-bit binary number• X: register containing four flip-flops• x: number stored in X• Register can be loaded with: either b or a + x• Addition performed by: a four-bit parallel adder• K: modulo-4 binary counter, whose output L equals 1 whenever the count

is 3 modulo 4

k2

L

ADD

Sequential circuit M

x

b

uInitiate

(4a + b)16

z

X

Kk1

a

4

4

444

Page 26: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

26

Example (Contd.)

Sequential circuit M: • Input u: initiates computation• Input L: gives the count of K• Outputs: , , , z• When = 1: contents of b transferred to X• When = 1: values of x and a added and transferred back to X• When = 1: count of K increased by 1• z = 1: whenever final result available in X

k2

L

ADD

Sequential circuit M

x

b

uInitiate

(4a + b)16

z

X

Kk1

a

4

4

444

Page 27: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Example (Contd.)Sequential circuit M:

• K, u, z: initially at 0• When u = 1: computation starts by setting = 1

– Causes b to be loaded into X• To add a to x: set = 1 and = 1 to keep track of the number of times a

has been added to x• After four such additions: z = 1 and the computation is complete• At this point: K = 0 to be ready for the next computation

State diagram:

k2

L

ADD

Sequential circuit M

x

b

uInitiate

(4a + b)16

z

X

Kk1

a

4

4

444A

B

u = 0

D

= 1

00

11

10

L = 0/ = 1

01

C

-/z = 1

u = 1

= 1

L = 1/ = 1

-/ = 1

Page 28: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

28

Example (Contd.)State assignment, transition table, maps and logic diagram:

A

B

u = 0

D

= 1

00

11

10

L = 0/ = 1

01

C

-/z = 1

u = 1

= 1

L = 1/ = 1

-/ = 1

z

u

y2Y2D2

Clock

L

D1

Clock

y2

y1

y1

Clock

Y1

,

0

1 11

(b) Maps for Y1 and Y2.

0 1y1

y2

0 0 u

1 L1

0 1y1

y2

0 0

Y1 Y2

PS NSy1y2 Y1Y2

00

00

1L

11

0u

10

11

01

(a) Transition table.

(c) Logic diagram.

= y1’y2

= = y1y2

z = y1y2’Y1 = y2

Y2 = y1’y2 + uy1’ + L’y2

Sequential circuit

Page 29: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Every student has to know (from ECE 271)

1. Realization of a state table from a state graph

2. Encoding of a state table

3. Realization of a state table with DD FFs.

4. Realization of a state table with JKJK FFs.

5. Realization of a state table with TT FFs.

• Realization of a state table with Iterative CircuitIterative Circuit

• Synchronous versus asynchronous FFs.

Page 30: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

30

Arithmetic Arithmetic CircuitsCircuits

Page 31: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

31

Topics

• Adder circuits

• How to subtract– Why complemented representation works out

so well

• Overflow

Page 32: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

32

Iterative Circuit

• Functional blocks per bit

Page 33: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

33

Adders

• Great example of this type of design• Design 1-bit circuit, then expand• Let’s look at

– Half adder – 2-bit adder, no carry in• Inputs are bits to be added• Outputs: result and possible carry

– Full adder – includes carry in, really a 3-bit adder

Page 34: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

34

Half Adder

• S = X Y

• C = XY

Page 35: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

35

Full Adder

• Three inputs. Third is Cin

• Two outputs: sum and carry

Page 36: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

36

Two Half Adders (and an OR)

From Truth Table at the left we get this

Page 37: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

37

Ripple-Carry Adder

• Straightforward – connect full adders

• Carry-out to carry-in chain– C0 in case this is part of larger chain, or just ‘0’

Page 38: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Iterative Iterative CircuitsCircuits

Page 39: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

39

Iterative Combinational CircuitsIterative network: cascade of identical cells

• Sequential: counter, shift register• Combinational

Every finite output sequence that can be produced sequentially by an FSM can also be produced spatially (or simultaneously) by a

combinational iterative network

Analogy between iterative networks and sequential machines:• Cell inputs/outputs• Input/output carries

Cell 1

x11 x1lx12

z11 z1mz12

Cell 2

x21 x2lx22

z21 z2mz22

Cell i

xi1 xilxi2

zi1 zimzi2

Y21

Y2k

Y22

yi1

yi2

yik

Yi1

Yik

Yi2

Page 40: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Iterative combinational Circuits

Another notation and names

Page 41: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Iterative Iterative ComparatorsComparators

Page 42: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Iterative comparator of Iterative comparator of equalityequality

Page 43: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

74x682 8-bit comparator74x682 8-bit comparator

Faster circuit

Page 44: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

44

Cell TableCell table: analogous to state table

Example: 0101 pattern detector• Assuming the same assignment for states (A: 00, B: 01, C: 11, D: 10):

each cell same as the combinational logic of the sequential circuit derived for the 0101 sequence detector earlier

0

0

1

0

1

1

0

0

1

0

1

1

1

1

0

0

0

1

1

1

0

0

0

1

Page 45: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

45

SynthesisExample: synthesize an n-cell iterative network

• Each cell has one cell input xi and one cell output zi

• zi = 1: if and only if either one or two of the cell inputs x1, x2, …, xi have value 1

• States A, B, C, D: 0, 1, 2, (3 or more) of the cell inputs to preceding cells have value 1

Cell table Cell Output-carries and cell-output tablexi

yi1

Yi2

yi2

Yi1

zi

Page 46: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Iterative comparator of orders Iterative comparator of orders and and equalityequality

1. Calculated last week2. Starts from graph3. Next table from graph4. Realize circuit combining identical

blocks5. Last block different6. Transition from combinational to

sequential circuit7. Main tradeoff of digital design –

parallel versus serial

Page 47: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

General General Iterative Iterative CircuitsCircuits

Page 48: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Structures of generalized

iterative circuits

Page 49: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Structures

Page 50: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Structures

• It seems to be a loop here, but there is no loop

• You cannot create a loop that would cause creation of a memory.

• Circuit can have a loop but no memory.

Page 51: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

• Students that do not understand iterative circuits will be severely penalized!

Page 52: Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers

Slides from

• Wakerly

• Montek Singh