25
7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on data in register Bitwise AND, Bitwise OR …. Shift

7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Embed Size (px)

Citation preview

Page 1: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

7-5 MicrooperationAn elementary operations performed on

data stored in registers or in memory.Transfer ArithmeticLogic: perform bit manipulation on data in

registerBitwise AND, Bitwise OR ….

Shift

Page 2: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Arithmetic Microoperations

Page 3: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Arithmetic Microoperations

The control variable X selects the operation, and the control variable K1 loads the result in to R1.

211:1 RRRKX

1211:1 RRRKX

Fig. 7.6 Implementation

Page 4: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Logic Microoperationsmanipulate the bits stored in a registerconsider each bit in register separately

Page 5: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Logic MicrooperationsMask: allow us to deal with some specific bits

R1: 10101101 10101011 (data)R2: 00000000 11111111 (mask) 00000000 10101011 <=R1

←R1^R2

Page 6: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Logic Microoperations

R1: 10101101 10101011 (data)R2: 11111111 00000000 (mask) 11111111 10101011 <=R1

←R1ˇR2

R1: 10101101 10101011 (data)R2: 11111111 00000000 (mask) 01010010 10101011 <=R1

←R1 R2

Page 7: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Shift Microoperationsshift left/shift rightincoming bit/outgoing bit

Page 8: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

7-6 Microoperation on A single RegisterMultiplexer-based transferif (K1=1) then (R0 ← R1) else if (K2=1) then

(R0 ← R2)

K1: R0 ← R1, R0 ← R2:21KK

Page 9: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Multiplexer-based transfer

Page 10: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Multiplexer-based transfer •Generalization of Multiplexer selection for n sources

Page 11: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Shift RegistersSerial input (SI)Serial output (SO)

Page 12: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Shift Register with parallel load

Page 13: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Shift Register with Parallel Load

Page 14: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Bidirectional Shift Register

DQSS

QQSS

QQSS

:

sr:

sl:

01

01

01

One stage diagram

Page 15: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Bidirectional Shift Register

Page 16: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Ripple counterStructure similar to ripple adder

Page 17: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Synchronous Binary Counter -Serial gating

Page 18: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Synchronous Binary Counter -Parallel gating

Only one AND gate delay

Four AND gates delay

Page 19: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Up-Down Binary Counter

))((

))((

))((

21021033

101022

0011

00

ENSQQQSQQQQD

ENSQQSQQQD

ENSQSQQD

ENQD

A

A

A

A

Homework #1

Prove it and draw the logic diagram

S=0 up counter

S=1 down counter

Page 20: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Binary counter with parallel load

Fig. 7-14

It is a case of the up-down counter in the previous slide.

(why? what case?)

Page 21: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

BCD counterA divide-by-N counter (modulo-N counter)

is a counter goes through a repeated sequence of N states

Fig. 7-15

Page 22: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Another BCD counter

81

4218188

2144

8122

11

)(

QQCOY

QQQQQQD

QQQD

QQQD

QD

Page 23: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Modulo 6 counter

CBD

CD

BAD

C

B

A

Page 24: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Modulo 6 counter

Page 25: 7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on

Homework #2Problem 7-15 with modified sequence

0,3,2,1,5,4,7Run the simulation for the designed circuit

by using Quartus IIDeal with the unused state as don’t care Test the circuit when the unused state

occurs (on paper)