Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Similar documents
EXPERIMENT #6 DIGITAL BASICS

EECS 140 Laboratory Exercise 7 PLD Programming

PHYS 3322 Modern Laboratory Methods I Digital Devices

Digital Circuits I and II Nov. 17, 1999

Experiment 8 Introduction to Latches and Flip-Flops and registers

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

Laboratory 10. Required Components: Objectives. Introduction. Digital Circuits - Logic and Latching (modified from lab text by Alciatore)

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

VU Mobile Powered by S NO Group

NEW MEXICO STATE UNIVERSITY Electrical and Computer Engineering Department. EE162 Digital Circuit Design Fall Lab 5: Latches & Flip-Flops

TMEL53, DIGITALTEKNIK. INTRODUCTION TO SYNCHRONOUS CIRCUITS, FLIP-FLOPS and COUNTERS

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

COE328 Course Outline. Fall 2007

CHAPTER 6 COUNTERS & REGISTERS

Chapter 4: One-Shots, Counters, and Clocks

EEC 116 Fall 2011 Lab #5: Pipelined 32b Adder

Unit 11. Latches and Flip-Flops

DEDICATED TO EMBEDDED SOLUTIONS

Scanned by CamScanner

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Synchronous Sequential Logic

Microprocessor Design

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

2.6 Reset Design Strategy

WINTER 15 EXAMINATION Model Answer

Logic Design Viva Question Bank Compiled By Channveer Patil

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Timing Pulses. Important element of laboratory electronics. Pulses can control logical sequences with precise timing.

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

Name: Date: Suggested Reading Chapter 7, Digital Systems, Principals and Applications; Tocci

Sequential Logic Basics

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Flip-Flops and Sequential Circuit Design

ELE2120 Digital Circuits and Systems. Tutorial Note 7

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2006

Introduction to Microprocessor & Digital Logic

DO NOT COPY DO NOT COPY

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

DIGITAL ELECTRONICS LAB MANUAL FOR 2/4 B.Tech (ECE) COURSE CODE: EC-252

Lecture 8: Sequential Logic

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Combinational vs Sequential

ELEN Electronique numérique

Introduction to Digital Electronics

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Chapter 5 Flip-Flops and Related Devices

Module -5 Sequential Logic Design

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Digital Electronics II 2016 Imperial College London Page 1 of 8


LAB 3 Verilog for Combinational Circuits

Synchronous Sequential Logic

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Chapter 7 Counters and Registers

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

UNIVERSITI TEKNOLOGI MALAYSIA

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

Asynchronous (Ripple) Counters

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Laboratory 7. Lab 7. Digital Circuits - Logic and Latching

Programmable Logic Design I

1. Convert the decimal number to binary, octal, and hexadecimal.

EET 1131 Lab #10 Latches and Flip-Flops

INTRODUCTION TO SEQUENTIAL CIRCUITS

ASYNCHRONOUS COUNTER CIRCUITS

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

MC9211 Computer Organization

COMP2611: Computer Organization. Introduction to Digital Logic

EE292: Fundamentals of ECE

Contents Circuits... 1

CHAPTER 4: Logic Circuits

Logic Design. Flip Flops, Registers and Counters

EE 367 Lab Part 1: Sequential Logic

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

D Latch (Transparent Latch)

EET 1131 Lab #12 - Page 1 Revised 8/10/2018

EL302 DIGITAL INTEGRATED CIRCUITS LAB #3 CMOS EDGE TRIGGERED D FLIP-FLOP. Due İLKER KALYONCU, 10043

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Chapter 2. Digital Circuits

Laboratory Sequential Circuits

Physics 120 Lab 10 (2018): Flip-flops and Registers

EE 200 Problem Set 3 Cover Sheet Fall 2015

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Experiment # 4 Counters and Logic Analyzer

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

Inside Digital Design Accompany Lab Manual

Laboratory 4. Figure 1: Serdes Transceiver

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Transcription:

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6. - Introductory Digital Systems Laboratory (Spring 006) Laboratory - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit) Introduction Issued: February 8, 006 Checkoff and Report Due in Class (PM) on: February, 006 This lab assignment introduces you to important tools and devices that we will be using throughout the term. You will be introduced to the following: Logic analyzer and digital scope. 74LS TTL series chips, including the 00, 04, 63, 393, 74 74HC00, a CMOS NAND gate.843 MHz Crystal Oscillator TTL and CMOS voltage levels Karnaugh Maps and Boolean Algebra Latches and Flip-flops, Simple Sequential and Asynchronous circuits Simple Verilog ModelSim (Verilog simulator), Xilinx FPGA labkit, Xilinx programming software The following are relevant handouts that you should be using in conjunction with this lab: Lectures -5 Safety Memo Procedure This lab is divided into several exercises to guide you through the design, construction, and debugging process. You will be asked to wire circuits for many of the exercises. Save all of these circuits until you have completed the lab as many of these circuits might be reused in subsequent parts of this lab.. Read and understand the whole assignment.. Design, build, test, debug, and fix each exercise in turn. Be sure to answer all the questions in the report template before you get checked off. You do NOT have to get checked-off on a exercise before proceeding to the next one. For each exercise, be sure to have the appropriate figures ready. Turn in the completed report template after your checkoff. 3. Do not use the power supply from the labkit to power the external proto board. Use the bench power supply. Problems -7 should not use the FPGA labkit and should be done on the external breadboard.

Exercise : TTL/CMOS Static DC Characteristics The logic values of and 0 are represented by voltage levels in the hardware implementation. The voltage levels and other electrical characteristics are not standardized from one logic family to another. 6. will use both TTL (Transistor-Transistor Logic) and CMOS (Complementary Metal-Oxide Semiconductor) logic. The voltage ranges for the two logic families are different. In this exercise, you will first measure the electrical characteristics of a TTL and CMOS gate using the circuit in Figure. Wire up this circuit using a 74LS00 part. Do not forget to wire power and ground! These connections are usually omitted from logic diagrams, as the power and ground of the 74LS series are generally the top-right and bottom-left pin, respectively. Typically, the top of the chip has a small semi-circular cutout, or a white dot next to pin. Ground the input of the inverter (the first NAND) and measure the output voltage using the oscilloscope. Be sure to be using the voltage markers on the oscilloscope. Connect the input to a logic and repeat the measurement. IN 3 OUT Ground 4 74LS00 7 8 Figure : (a) Logic Level Measurement (Measure voltage at OUT node). (b) Power Supply Wiring. Next, use a 74HC00 and wire up the same circuit and hook V CC to a V supply. Perform the same measurements and record your results. Look up the valid input and output voltage ranges using the datasheet for a 74LS00 and a 74HC00. For each experiment, do your output values satisfy the range specified in the datasheets? Consider interfacing a TTL inverter to a CMOS inverter and vice versa. Look at the datasheet titled HCMOS Family Characteristics. Based on the V supply you used, find out the recommended input voltage for HCMOS inputs. Discuss potential issues when interfacing TTL and CMOS components? Run the two experiments (interface TTL to CMOS and vice versa) and make voltage measurements.

Exercise : Build Your Own Ring Oscillator Important timing parameters associated with the speed of digital logic gates are the propagation delay time t PD, and the output signal rise and fall times, t r and t f. Propagation delay is a measure of how much time is required for a signal to change state. It is measured as the time from the 50% point of the input to the 50% point of the output (Figure ). It is often cited as the average of the high-to-low and low-to-high delays (corresponding to the two transitions). The rise and fall times represent the amount of time for a signal to change state. To measure rise and fall times, you should be using the 0% to the 90% point, or vice versa. In Out t fall t PD t rise Figure : Timing Characteristics (0%, 50%, 90% marked). Construct the ring oscillator shown in Figure 3 using a 74LS04 with as little wire as possible. From this circuit, determine the average propagation delay of a TTL inverter by measuring the period of oscillation by using the time markers on the oscilloscope. You can determine this by determining the number of gates a signal must travel through to complete a full period of oscillation. What should the period of oscillation be with 3 inverters in the ring? Rewire the circuit and measure the period. Comment on the new result. Insert a long piece of wire (about 3 feet) into the ring of 3 inverters. Observe how this extra length of circuit affects the signal. Can you explain the change? 3 4 5 6 3 0 Figure 3: Ring Oscillator (using a 74LS04). Finally, take a single inverter, and wire the output to the input. The voltage should be stable. If it isn t, connect a capacitor (0.0 µf) between this single node and ground to stabilize the voltage. Measure the voltage, and explain the significance of this voltage. 3

Exercise 3: Glitches Wire up the circuit in Figure 4 using a.843 MHz crystal oscillator and a 74LS00. Be sure to wire the crystal oscillator right side up. Pin should be marked with a dot. The output GLITCH is a purposely glitchy output caused by the circuit. Using the oscilloscope, measure the width of the glitch. Next, add CLK and GLITCH as signals to the logic analyzer and measure the width of the glitch. Is there a significant difference between your two different types of measurements? Why does this glitch occur, and what is the lesson learned from this exercise? Under what conditions is it a bad idea to use a glitchy signal as an input? 4.843 MHz 3 Xtal CLK 3 4 5 6 3 0 9 Figure 4: Glitch Measurement Circuit (74LS00). 8 GLITCH Exercise 4: Asynchronous Counters Wire up the.843 MHz clock from the previous exercise to an 8-bit ripple counter as shown in Figure 5. You do not need to disconnect the previous circuit. In this exercise, we are concerned with how each output bit changes with respect to other bits. Since this counter increments its count every falling edge of the clock, each output bit must have a period twice that of the next significant bit. Because of this characteristic, counters make good clock dividers; if you want a slower frequency clock, it may be helpful to use a counter or a series of counters. Verify the counter s operation using the oscilloscope. Trigger on either a rising or falling edge of the MSB, and measure the time between the fallingedge of CLK to edge of the MSB. Estimate the clk-to-q delay for each flip-flop in this chip. 0 9 8 A B C D 4 CLR 3.843 CLR CLK MHz 3 74LS393 Xtal CLK A B C D 3 4 5 6 Figure 5: Clock and Ripple Counter. 4

Exercise 5: Synchronous Counter One of the most useful of the 74LS series is the 74LS63. This is a 4-bit loadable synchronous counter with a synchronous reset. Wire two 74LS63s so that they count as continuously shown in Figure 6. Trigger your scope on the most significant bit (MSB) and verify its operation. Explain why the RCO and ENT are connected between the two counters, and explain how they work. What is the difference between the ENT and ENP inputs on a 74LS63? How long does it take, after the rising edge of the clock, for one of the flip-flops to change state? You should be triggering the oscilloscope on an appropriate output bit. Does it matter which output bit you choose? Use the logic analyzer to capture the A, B, C, D and RCO outputs of the low-order counter. Display the values of A, B, C and D as a 4-bit hex number. Look at the RCO output of the low-order counter. Use the Glitch Trigger feature of the logic analyzer to see if you can locate any RCO glitches. Do you observe any glitches on the carry output? Glitches like these are hard to see as they are very short. The carry output does not always have glitches, just sometimes for particular chips. Try using the oscilloscope as well to look for glitches. Be prepared to comment on the difference between the 74LS63 and the 74LS393 in terms of design and performance; in particular, the speed and area of the device. By area, we are asking you to consider how complicated it is to implement the counter. How many flip-flops and how much logic is required to implement each counter? 4 3 4 3 7 0 9 P Qa Qb Qc T LD 74LS63 CLR Qd RCO 5 7 0 9 P Qa Qb Qc T LD 74LS63 CLR Qd RCO 5 A B C D 3 4 5 6 A B C D 3 4 5 6 CLK =.843 MHz Figure 6: Synchronous Counter Wiring (RCO of the first chip is only connected to T, not ). 5

Exercise 6: Construct a Set-Reset Latch with NAND gates Build a clocked positive SR latch using NAND gates (use the setup shown in Figure 7). On a set, the output Q should be high, and Q should be low. On a reset, the output Q should be high, and Q should be low. However, since this is a clocked latch, the output can only change during the clk high phase; it is held at all other times. Explain how the SR latch works and demonstrate the functionality of the built circuit. Be prepared to explain what happens during the case when both S and R are high. V CC dipswitch 4.7k S V CC 4.7k R Q Q clk =.843 MHz Figure 7: Setup for SR Latch. Exercise 7: Setup Time Measurement of a D Edge-triggered Register This is an open-ended problem. If you find a solution, be descriptive in your measurement methodology. If you can t find a solution, explain the different methods you did try and other possibilities that you thought may work. Setup and hold times are important constraints to follow when implementing a digital system. With respect to a D edge-triggered register, explain what each of these constraints are, and explain types of failures that may occur if one of these constraints is violated. Using a 74LS74 part and any additional components necessary, develop a system that can measure the setup time of a D register. Remember that you need to test both when a D register should capture a 0 and when it should capture a. Be sure that the system only tests the setup time and does not change any other parameters, such as the rise and fall times of the inputs. You may use any method possible, but be sure to justify the method. Find the published setup time on the datasheet for a 74LS74 (this number will vary from manufacturer to manufacturer and across chips) and compare to your measured time. Provide possible reasons why they might not match. Be prepared to demonstrate how you measured the setup time using a circuit diagram and an oscilloscope. 6

Exercise 8: Writing Combinational Verilog code (introduction to ModelSim, Xilinx Software and the Labkit) In this exercise, you will design and implement a Verilog module that takes as input a 4-input binary coded decimal and outputs 7 bits that will properly illuminate a 7-segment display. Figure 8a (left) shows the 0 possible digits and Figure 8b shows the output mapping to segments. e f d a g c b Figure 8: (a) The ten segmented digits. (b) shows the mapping of outputs a-g to segments. Using Karnaugh Maps, design the combinational logic that encodes the 4-bit input to the 7-segment display. Fill out each Karnaugh Map, and make circles for either Minimal Sum-of-Products, or Minimal Product-of-Sums so that you minimize the required logic. Some segments will use MSP, and others will use MPS. In Verilog, program the combinational logic. You do not have to use the minimized equations for programming the logic. Synthesis tools are powerful and will automatically optimize your logic equations. Download three source files from the Labs Section. lab_labkit.v instantiates the seven_segment conversion module as well as other circuitry to drive the dot-matrix display on the labkit (appropriate wrapper logic is included to make the dot-matrix display on the labkit look like a 7-segment display. Please do not use the discrete 7-segment display chip given with the kit). For this exercise, you should only modify the seven_segment.v source code and assign the correct logic function to the outputs. Go to the labkit documentation on the course website, and follow through the Getting Started with ISE and Programming the Labkit tutorial. You can simulate your 7-segment decoder using ModelSim. Please read Simulating with ModelSim, which describes running ModelSim directly from Xilinx ISE.. You should now be able to create a new Xilinx project that includes lab_labkit.v, labkit.ucf, and seven_segment.v. Find where your segment_decoder module is instantiated under lab_labkit.v. Create a simple test bench called tb_7segment.v to verify that your 7-segment decoder works correctly (call the top level module tb_7segment). Simulate your 7-segment decoder using Model- Sim. Observe the outputs of your test vectors on the Wave window. After you have verified that the logic is correct, you will compile and program the FPGA to display the ten digits. After you 7

load your project on the FPGA, use the low four switches as the input. Verify that the correct digit appears on the LED display. You may also run ModelSim in stand alone mode for simulation (in general, we recommend you run ModelSim directly from the Xilinx ISE environment) 8