Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Organization

Similar presentations


Presentation on theme: "Computer Organization"— Presentation transcript:

1 Computer Organization
CSC 405 Sequential Circuit Design

2 Sequential Circuit A sequential logic circuit is one whose outputs depend not only on its current inputs, but also on the past sequence of inputs, possibly arbitrarily far back in time. The next output pattern to be presented can be defined in terms of the current input and the current state (internal gate values) of the circuit. Current State sequential circuit input output clock If the sequential circuit is to be synchronized with other circuitry, it will include a clock input to control when the output changes.

3 Latches and Flip-Flops
Latches and flip-flops are the building blocks of sequential circuits. They use feedback to hold information (digital values) from a previous input. The S-R latch shown below is made of a pair of NOR gates. The circuit has two inputs R and S and two outputs Q and not-Q. When both inputs are zero (0) the circuit maintains whatever output pattern it has. S R Q Q’ R S Q If S (set) is switched high (1) and then back to zero (0) the Q output will go high (1). If the R (reset) input is cycled high and back to zero, the Q output will go low (0). Setting both inputs high forces both outputs low. (This pattern is not used for the latch operation.)

4 We can synchronize (control when the output changes) the S-R latch by adding a clock to our circuit.
Q Clk S-R Latch with Enable Finally, since we want to use the latch to hold a binary value we will always be presenting opposite values to the S and R inputs. We can eliminate one of the input by presenting S’ to R using an inverter. D Latch D Q Clk D Q Q’ Clk

5 State Transition Diagram
The first step of sequential circuit design is the development of a state transition diagram that defines the desired circuit. Lets say you wanted to build a sequential circuit that recognized (switched its output to high) when the sequence of bits 1110 was input (right to left order). 1. Since we are attempting to recognize a 4-bit string, we will need 4 states in our diagram. 2. We will label one of the states as the start state and show the transitions from one state to the next for the desired input. 1 1 start 1 As soon as we recognize the goal bit-string, we return to the start state on the last transition to get ready for the next bit.

6 3. We also know that our output should be 0 until we get the last (4th) bit show we show the desired output for each of these transitions using the input/output notation. 0/0 1/0 1/0 start 1/1 4. Since we may get any bit-string, we need to include transitions for both 1 and 0 inputs from each state. 1/0 0/0 1/0 1/0 start 0/0 0/0 0/0 1/1

7 5. Next we need to label each of the states
5. Next we need to label each of the states. These labels must be base two numbers since the flip-flop of the sequential circuit will be used to indicate which state we are in as we read bits from the input bit-string. For N states we will need log2N digits in our state labels. 1/0 0/0 1/0 1/0 start 00 01 10 11 0/0 0/0 0/0 1/1 This is the completed state transition diagram for the 1110 bit-string recognizer (right-to-left reading direction). Notice that when a (0) bit is read we always go to state (01), since the (0) is the first bit in the string we are trying to recognize. When we read a (1) from the start state (00) we stay in the start state since a (1) is not the first bit of the desired string. The only way to get a (1) output from the start state is to receive a (0) (1) (1) and (1) in that order.


Download ppt "Computer Organization"

Similar presentations


Ads by Google