cmput329 - fall 2003

18
CMPUT 329 - Computer Org anization and Architectu re II 1 CMPUT329 - Fall 2003 TopicJ: Counters José Nelson Amaral

Upload: kirby-cardenas

Post on 31-Dec-2015

25 views

Category:

Documents


2 download

DESCRIPTION

CMPUT329 - Fall 2003. TopicJ: Counters José Nelson Amaral. Reading Material. Section 8.5 of Wakerly. Shift Registers. A shift register is an n-bit register that can shift its stored data by one bit position at each clock tick. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

1

CMPUT329 - Fall 2003

TopicJ: Counters

José Nelson Amaral

Page 2: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

2

Reading Material

Section 8.5 of Wakerly.

Page 3: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

3

Shift Registers

A shift register is an n-bit register that can shift its stored data by onebit position at each clock tick

A serial input (SERIN) specifies a new bit to be shifted in.

A serial output (SEROUT) has the value of the bit that is shifted out.

In a serial-in serial-out register only one bit is out at any clock cycle.

In a serial-in parallel-out register all stored bits are out at every clock cycle.

Page 4: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

4

Shift Registers

serial-in, serial-out serial-in, parallel-out

Page 5: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

5

Shift Registerparallel-in, serial-out

Page 6: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

6

MSI Shift Registers

Bidirectional

Page 7: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

7

Shift Registerparallel-in, parallel-out

Page 8: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

8

Quiz

Design a function table for a 4-bit shift register that at any clock cyclecan perform one of the four functions:

• Hold: keep the same value that it had in the previous cycle• Shift right: shift the values to the right, and shift in the value of an RIN input• Shift left: shift the values to the left, and shift in the value of an LIN input• Load: Load the values of inputs A, B, C, D, into flip-flops QA, QB, QC, QD.

If you were to specify this shift register as a finite state machine, how

many states your machine would have?

Page 9: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

9

74x194: 4-bit Universal Shift Register

Page 10: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

10

FSM for the 74x194

0000

00010010

0011

0100

0101

0111

0110

1000

1001

1010

1100

101111101101

1111

SL & LIN=1+ Load & ABCD=0001 SR & RIN=1+ Load & ABCD=1000

Hold + Load & ABCD=0000

Page 11: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

11

74x194: 4-bitUniversal Shift

Register

Page 12: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

12

74x194: 4-bitUniversal Shift

Register

Page 13: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

13

74x299: 8-bit UniversalShift Register

The 74x299 is an 8-bit version of the 74x194. It implementsbidirectional three-state lines for input and output to save pins.

Page 14: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

14

74x299: 8-bitUniversal Shift

Register

Page 15: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

15

Serial/Parallel ConversionsSYNC is a reference signal that indicates the beginning of a byte or word.

Page 16: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

16

Parallel-to-serial conversion frame

Page 17: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

17

Page 18: CMPUT329 - Fall 2003

CMPUT 329 - Computer Organization and Architecture II

18