cpe229_lec07 - CPE 229 Course Notes: Lecture 7 Copyright:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CPE 229 Course Notes: Lecture 7 Copyright: 2005 Bryan Mealy Yet Another Real Story FSMs are primarily used to control other circuits. It is possible to make a FSM that will output a desired counting sequence (namely counters) but that is more an academic exercise rather than a real-world application. The end product in CPE 229 is to be able to implement real-world applications; specifically a controller for the datapath circuitry of a computer. The problem below attempts to present a real design problem that you’ll need or want to use a FSM to solve. The application is somewhat corny, but the underlying design and the steps required to implement the design could almost be considered real. Problem Statement: Design a circuit that drives an 8-LED display (similar to the ones in on the development boards in the CPE 269 lab) in the following manner. The display should have only one LED at a time lit. The lit LED should shift towards the left with on the system clock edge until it arrives as the left-most LED. At this point, the lit LED should then start shifting towards the right until it hits the right- most LED and starts shifting left again. The circuit is controlled by a shift enable input DE. When this input is asserted, the circuit resets itself (the right-most LED lit) and initiates the shifting sequence. When the DE input is not asserted, the LED output stops shifting and remains in the final state it was in before the DE input was unasserted. Implement the design using less than four flip-flops. The Long-Winded Solution: The obvious solution to this problem is to use a one-hot encoded FSM and use the state variables to drive the output displays. But that would be too simple which is why there is a limit placed on the number of flip-flops you can use in this design. The better solution is to continue with the theme of CPE 229 and fit the design into the model previously presented and shown again in Figure 1 (although this time, we’re not designing a CPU, the model is still valid). The approach we’ll take for solving this problem is to first design the circuit for the datapath and then design a circuit that will control it. Figure 1: The basic model used much too often in CPE 229. The first step is to pull from your vast digital knowledge and come up with some circuitry for the datapath that will be able to implement the given problem. If you think about it, the moving back and forth of the lit LED could be characterized as a shifting action. And since this shifting action is synchronized with the clock, the design cries out heavily for being centered around a shift register. But didn’t shift registers only shift in one direction? First, there is a device known as a universal shift register that can handle most of the listed functions required by this problem: it shifts left or right, it has a parallel data loading inputs, or it holds the current value (does not shift at all). Let’s work with this device first. The universal shift register is actually based on a simple concept. In other words, we can decompose a shift
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/27/2009 for the course CPE 229 taught by Professor Smith during the Spring '09 term at Cal Poly.

Page1 / 9

cpe229_lec07 - CPE 229 Course Notes: Lecture 7 Copyright:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online