Summer'04 ECE 238 Labs






Lecture Notes





Old Labs






 



Lab 4 Lecture Notes - Introduction to Sequence Detectors and Coolrunner CPLDs

Sequence Detectors

Sequence detection is the act of recognizing a predefined series of inputs. You are looking for a series of specific data. In our case, we are looking for very simple things very slowly. We are looking for a series of ones and zeros similar to 1011. The overwhelming beauty to programmable logic is its ability to work with DSP (digital signal processing). The capability of processing a great deal of information quickly can not be overemphasized. Suppose you were working at the VLA in Socorro and you wanted to scan thousands of bits of digital information looking for a series of bits that represents an RF signal from a distant galaxy. Or, suppose you wanted to scan a digital image of a human lung looking for a digital signature that would represent a cancerous cell. These are very broad interpretations but I believe you can see where the benefits come in with being able to recognize a specific sequence.

Our sequence detector is going to be driven by a clock. Since we do not have a clock built onto our XCR board, we will use the slowest clock we have - your finger.

CPLD (Complex Programmable Logic Device)

This lab is where you will begin to transfer from the smaller plastic chips into programmable logic. A CPLD is a major piece of programmable logic in the electronics industry today. It is greatly praised for its nonvolatile characteristics and it's low power consumption. You can remove the power but when you return it, the program will still be there. Here is a small idea of why we are using programmable logic. Suppose you were to design an alarm system. When you did all your final crunching, you determined that you were going to need 34 NAND gates, 22 OR gates, 77 AND gates, and 23 XOR gates. Using the hardware that you have developed projects with up to this point, you can see what an enormous amount of work it would be to wire all of this up. The thought behind programmable logic is that this entire design could be created with just one CPLD. Also, since it is programmable, if you have a minor change from your user, you could easily reconfigure the chip without having to do major rewiring. We will spend more time on CPLDs in later labs. This is just an overview.

In this portion of the lab, let's ignore your 7400 family of chips and work exclusively with programmable logic. The programmable logic chip will be the Xilinx Coolrunner XPLA device. The actual device is a XCR3064XL 44pin 3.3volt CPLD. The basic overview of this project is that we are going to take VHDL code for a sequence detector and it's test bench. We are then going to transfer this entire project onto a programmable chip. You will begin to see the benefit of VHDL. It can be easily transfered to a multitude of different types of hardware. The tutorial will take a step-by-step approach through the entire project from start to completion. Here is the device you will be using.



Here are a few slides by Xilinx that depict some basic theory about CPLD and their use.

Our XCR3064 CPLD has 1,500 system gates. A system gate is a standard for representing the number of two input NAND gates that can be emulated using this device. Remembering that the NAND gate is the "universal" gate and that any logic device can be built with enough of them, this is another way of saying that this device can make any project that can be made with 1,500 NAND gates. Imagine having to wire all of them up on a protoboard. To take that one step further, Xilinx has just released a programmable device with six million system gates. The CoolRunner family of devices are perfect for battery powered, portable applications.



Before we get into the tutorial for this lab, let's spend a few minutes with familiarization. Somewhere in front of you is a black plastic board with two circuit board looking devices on it. There should be labels. One should say FPGA and the other CPLD. The CPLD one is the one we will be using today. We are using a Coolrunner XPLA CPLD mounted on a Digilent demo board like the one in the picture above. The CPLD is the square 44-pin chip in the middle of the board. Locate the power strip for the two boards and switch the power on. If the CPLD was previously programmed, you may see some lights begin to flash. These power strips should be left off when the boards are not in use to avoid unnecessary wear and tear. Next locate the A/B switch box on top of the computer and ensure it is set to CPLD. Now that you know where your hardware is, proceed to the lab and the tutorial

 

alnz - Last update: June 21, 2004