Computer Organization & Programming Chapter 5 Synchronous Components.

26
Computer Organization & Programming Chapter 5 Synchronous Components

Transcript of Computer Organization & Programming Chapter 5 Synchronous Components.

Page 1: Computer Organization & Programming Chapter 5 Synchronous Components.

Computer Organization & Programming

Chapter 5

Synchronous Components

Page 2: Computer Organization & Programming Chapter 5 Synchronous Components.

Clocks

Synchronization toolA clock allows separate circuits to do their work at precisely the same time.

Page 3: Computer Organization & Programming Chapter 5 Synchronous Components.

Set Reset Latch (SR Latch)

Page 4: Computer Organization & Programming Chapter 5 Synchronous Components.

Clocked latches

Control exactly when the S or R input is provided

Page 5: Computer Organization & Programming Chapter 5 Synchronous Components.

Clocked D latch

No need for separate variables R, S since they are mutually exclusive. D and D’ provide the same effect.

Page 6: Computer Organization & Programming Chapter 5 Synchronous Components.

Latch using Mux

Page 7: Computer Organization & Programming Chapter 5 Synchronous Components.

Standard representations

Latch loaded when clock is 1

Latch loaded when clock is 0(Note inversion bubble on CK)

Flip flop loaded when clock is changing from 0 to 1 (rising edge)

Flip flop loaded when clock is changing from 1 to 0 (falling edge)

Do we care? Not much. Just know that boxes that look like this hold a value

Page 8: Computer Organization & Programming Chapter 5 Synchronous Components.

8-bit register

Pin 1 drives clear on all the flip flopsPin 11 drives enable (CK) on all. Pin 11’s inverter serves as an amplifier also.

Page 9: Computer Organization & Programming Chapter 5 Synchronous Components.

FF with asynchronous Set & Reset

Page 10: Computer Organization & Programming Chapter 5 Synchronous Components.

Shift Register

Page 11: Computer Organization & Programming Chapter 5 Synchronous Components.

Right-Left Shift Register

Page 12: Computer Organization & Programming Chapter 5 Synchronous Components.

Synchronous Up-Counter

Page 13: Computer Organization & Programming Chapter 5 Synchronous Components.

Synchronous Up-Counter + Count Enable and Parallel Load

Page 14: Computer Organization & Programming Chapter 5 Synchronous Components.

Sequential Circuits

So far, all outputs have been determined completely by the current input.

Having a clock pulse allows us to determine the time at which each circuit fires.

Circuits that allow the output of a circuit to become an input to the next iteration of the circuit are called sequential circuits.

A sequential logic unit is also known as a Finite State Machine

Page 15: Computer Organization & Programming Chapter 5 Synchronous Components.

Finite State Machines

A finite state machine takes an input and a current state and produces an output and a next state

Page 16: Computer Organization & Programming Chapter 5 Synchronous Components.

Classical model of FSM

Abstraction of a delay mechanism. This will hold the value of the state output and release it as input in the next cycle.

Page 17: Computer Organization & Programming Chapter 5 Synchronous Components.

Example –Pseudo Random Numbers

Page 18: Computer Organization & Programming Chapter 5 Synchronous Components.

FSM for thePseudo Random Numbers

Page 19: Computer Organization & Programming Chapter 5 Synchronous Components.

FSM by a Graph

Page 20: Computer Organization & Programming Chapter 5 Synchronous Components.

FSM – Formal Definition

Page 21: Computer Organization & Programming Chapter 5 Synchronous Components.

State Transition Diagram

Page 22: Computer Organization & Programming Chapter 5 Synchronous Components.

Example

Look for the sequence ‘110’ (output ‘1’ when found)

Step 1 – Build the Graph

Page 23: Computer Organization & Programming Chapter 5 Synchronous Components.

Step 2 – write transition table

Page 24: Computer Organization & Programming Chapter 5 Synchronous Components.

Step 3 – Allocate State Values

Page 25: Computer Organization & Programming Chapter 5 Synchronous Components.

Step 4 – Get Functions

Page 26: Computer Organization & Programming Chapter 5 Synchronous Components.

Step 5 – Implement