CSE 352 Laboratory Assignment 3

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

Logic Design. Flip Flops, Registers and Counters

Asynchronous (Ripple) Counters

Counter dan Register

Computer Organization & Architecture Lecture #5

Counters

ASYNCHRONOUS COUNTER CIRCUITS

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

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

Digital Circuits I and II Nov. 17, 1999

Sequential Logic and Clocked Circuits

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Logic Design II (17.342) Spring Lecture Outline

Introduction. Serial In - Serial Out Shift Registers (SISO)

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Experiment # 4 Counters and Logic Analyzer

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Principles of Computer Architecture. Appendix A: Digital Logic

Digital Fundamentals: A Systems Approach

CHAPTER 4: Logic Circuits

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I

IT T35 Digital system desigm y - ii /s - iii

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

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Computer Systems Architecture

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Lecture 8: Sequential Logic

Registers and Counters

Chapter 2. Digital Circuits

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs

Registers and Counters

CHAPTER 4: Logic Circuits

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

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

First Name Last Name November 10, 2009 CS-343 Exam 2

Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010

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

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Computer Architecture and Organization

MODULE 3. Combinational & Sequential logic

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

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

Electrical & Computer Engineering ECE 491. Introduction to VLSI. Report 1

A Combined Combinational-Sequential System

WINTER 15 EXAMINATION Model Answer

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Experiment 8 Introduction to Latches and Flip-Flops and registers

(Refer Slide Time: 2:00)

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

Digital Logic Design ENEE x. Lecture 19

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

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

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Overview: Logic BIST

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

Chapter 3 Unit Combinational

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

MC9211 Computer Organization

CPS311 Lecture: Sequential Circuits

Scan. This is a sample of the first 15 pages of the Scan chapter.

CS150 Fall 2012 Solutions to Homework 4

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

Digital Circuits 4: Sequential Circuits

Logic. Andrew Mark Allen March 4, 2012

Efficient Architecture for Flexible Prescaler Using Multimodulo Prescaler

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

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

Chapter 4. Logic Design

6.S084 Tutorial Problems L05 Sequential Circuits

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Chapter 5 Flip-Flops and Related Devices

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Sequential Logic Basics

Chapter 7 Counters and Registers

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

CHAPTER 6 COUNTERS & REGISTERS

ASNT8140. ASNT8140-KMC DC-23Gbps PRBS Generator with the (x 7 + x + 1) Polynomial. vee. vcc qp. vcc. vcc qn. qxorp. qxorn. vee. vcc rstn_p.

Introduction to Microprocessor & Digital Logic

Vignana Bharathi Institute of Technology UNIT 4 DLD

VLSI System Testing. BIST Motivation

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Final Exam CPSC/ECEN 680 May 2, Name: UIN:

VLSI Technology used in Auto-Scan Delay Testing Design For Bench Mark Circuits

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

EE 367 Lab Part 1: Sequential Logic

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

FLIP-FLOPS AND RELATED DEVICES

A High-Resolution Flash Time-to-Digital Converter Taking Into Account Process Variability. Nikolaos Minas David Kinniment Keith Heron Gordon Russell

AC103/AT103 ANALOG & DIGITAL ELECTRONICS JUN 2015

Collections of flip-flops with similar controls and logic

Modeling Digital Systems with Verilog

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

Transcription:

CSE 352 Laboratory Assignment 3 Introduction to Registers The objective of this lab is to introduce you to edge-trigged D-type flip-flops as well as linear feedback shift registers. Chapter 3 of the Harris&Harris text covers registers and clocking. Unfortunately clock signals are generally much too fast to see what the registers are doing. Therefore, we will implement the clock in this lab using one of the push-buttons on your board to generate the clock. This will allow you to generate clock edges slowly and one at a time so you can see what happens to the registers. This lab consists of both lab check offs and a series of short answer questions. Please write your short answer questions on a separate sheet of paper and turn it in at the end of the lab. We will not check off these short answer questions. Part 1: D Flip-Flops 1. Find the '74 package, which has two positive-edge-triggered D flip-flops. You'll note each flip-flop has a data input (D), a clock input (CP), two outputs (Q and Q') and two additional inputs, SD and CD, which are active-low set and clear control inputs (they have effect when set to 0 and none when set to 1). 2. Insert the '74 chip into your breadboard and connect the D input to one of the switches, a button to the clock input, and Q to one of the LEDs. Make sure to also connect SD and CD to a logical 1. You do this by connecting these terminals to Vdd. 3. Spend some time experimenting with the flip-flop. Toggle your switch so that a value of 1 is on the D input to your flip-flop and press the button. What happens to the LED you connected to Q? Try changing the value of D and push the button again. Try changing D back and forth while not pushing the button wired up as your clock. Note how Q only changes when you press the push button. This is a positive edge-triggered flip-flop, so changes in the output only occur when a rising clock edge (recall that when you press the button, its output changes from 0 to 1. 4. We will experiment with clock skew by using even numbers of inverters to delay the propagation of the clock signal. Connect the second D flip-flop on the 74 package as follows: use the output from the first flip-flop as the input for the second flip-flop and wire your clock button to both clock inputs so that they share the same clock. Your circuit is now a 2-bit shift register. Try shifting in some bits and observe how the bits shift through the shift register each time the clock ticks. 5. Now, add a 04 inverter package to your breadboard and wire together two of the inverters in a chain back to back to implement a simple buffer. Connect the clock button to the clock of the first flip flop and to the input of the first inverter in the chain. Connect the inverter

output at the end of the inverter chain to the clock of the second flip-flop. The delay from the two inverters will now skew the clocks received by the two flip-flops. That is, the clock arrives at the second flip-flop slightly later than the clock at the first flip-flop. Does your shift register still work? 6. Now add four more inverters to the inverter chain, for a total of six inverters, adding even more delay to the second clock signal and skewing the second clock signal even further. Does your shift register still work? 7. Now reverse the clocks to the two flip-flops so that the clock arrives at the second flip-flop before the first flip-flop. Does your shift register still work? Short Answer #1: Explain the behavior of the shift register for all four different ways of connecting the clock (4, 5, 6, 7). Check Off Requirements 1. Show your TA a case where the two-bit shift register functions as expected. Briefly explain and justify how you know the circuit is functioning correctly. 2. Show your TA a case where the two-bit shift register is not working because of clock skew. Explain and justify how you know the circuit is functioning correctly. Part 2: Set and Clear 1. Now it is time to experiment with the set and clear control inputs. Connect these two inputs to two switches instead of Vdd. Make sure the switches are set to 1 so that your registers behave as they did. 2. Now, experiment with the asynchronous set and clear (SD and CD) inputs using the two switches. Make sure that the switches are initially set to output a 1. Now, set the value of Q to 0 using the D input and the push-button (clock). Flip the SD switch. What happens? Did you have to press the push button? Asynchronous inputs take effect immediately, without waiting for the next clock edge. Repeat the experiment with CS instead of SD. Try setting both SD and CS to 0 (set and clear at the same time): which dominates? Does the flip-flop set or clear? Short Answer #2: Complete the following timing diagram by drawing the signals Q and Q and turn this in.

Part 2: Linear Feedback Shift Registers (LFSRs) LFSRs are shift registers with feedback that causes the shift register value to cycle through a maximal length sequence of output values. In the case of a 4-bit shift register, a maximal length sequence would have 15 (16-1, since the all-zero pattern is not counted) different outputs. Since the function can be implemented efficiently, this means that an LFSR is much faster and cheaper than a binary counter, although it counts in a random order. This makes LFSRs very attractive when we need to count to large values but don't care about what the sequence is (that is, they don't have to be consecutive binary numbers). Variations of LFSRs are often used as random number generators as well - consecutive output patterns can be made to look quite different and are uniformly distributed over the space of all possible patterns. You can read a lot more about LFSRs at Wikipedia: you can find a list of functions that will generate maximal sequences for any number of bits from 4 to 32 and beyond. For example, a 4-bit LFSR with maximal length sequence can be implemented using the function: D1 = Q4 xor Q3, and a larger 8-bit LFSR with D1 = Q8 xor Q7 xor Q6 xor Q1. Even a 32-bit LFSR can also have a maximal sequence (2 32-1 patterns long) with a function of only one 4-input XOR: D1 = Q32 xor Q31 xor Q30 xor Q10. 1. Wire up your '377 octal D-FF to form a 4-bit shift register. Connect the four FF outputs to four of the LEDs. Connect the output of a 2:1 multiplexer to the first input with a switch connected to the MUX's control input. The two MUX inputs should be the value of another switch and the last output of the shift register (the fourth bit). Verify the operation of your shift register by setting the input to come from the input of the MUX. Go through a few clock cycles shifting in different values. Make sure to tie the enable input of the '377 to a value rather than leaving it floating as it may not function properly without a valid logic level on that input.

Check Off Requirements 1. Show your functional 4-bit shift register to a TA and prove that it works by cycling through a few cycles and inputs. 2. Verify the operation of your shift register loading it serially from the switch. Now shift the pattern 1, 1, 0, 0 into your shift register. Flip the input MUX switch so that the last output is now fed back into the input. Go through a few clock cycles by pressing on the push-button you have wired up as your clock. You should see your pattern shifting in a circular pattern through the register. Short Answer #3: How many different patterns are there in all before the output pattern on the LEDs repeats itself? 3. Invert the output of the shift register being fed back into the MUX using XOR gate (connect one input of XOR gate to be Vdd, and the other input with the output of the 4 th shift register). Repeat the previous task with this new configuration. Short Answer #4: How many different patterns are there? 4. Connect the XOR gate with the 4th and 3rd FF outputs as its inputs. Connect the output of this XOR gate to one of the input of MUX, the other input of MUX should connect to two different switches. This is a 4-bit LFSR. Begin by shifting in zeros into your shift register (use the switch input to the MUX). Now flip the MUX to select the output of the XOR gate to be the input. Go through a few clock cycles. Does the pattern change? Now, shift all ones (instead of zeroes) to set up the shift register and then run through a few clock cycles. Check Off Requirement 1. Demonstrate your LFSR from the last step to the TA. Explain and justify why your LFSR works. Short Answer #5: How many patterns do you go through before they begin to repeat? Is this a maximal sequence? Try different taps instead of 4th and 3rd, for example, 4th and 2nd. How many different patterns does this configuration generate? Submit your completed short answer questions to the TA. Make sure your name and SID is on the top right corner of each page. Consolidated Check Off Requirements 1. From Part 1. Show your TA a case where the two-bit shift register functions as expected. Briefly explain and justify how you know the circuit is functioning correctly. 2. From Part 1. Show your TA a case where the two-bit shift register is not working because of clock skew. Explain and justify how you know the circuit is functioning correctly. 3. From Part 2. Show your functional 4-bit shift register to a TA and prove that it works by cycling through a few cycles and inputs.

4. From Part 2. Demonstrate your LFSR from the last step to the TA. Explain and justify why your LFSR works. 3. Submit your answers to the short answer questions to the TA by the lab due date.