COMP2611: Computer Organization Building Sequential Logics with Logisim

Similar documents
IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

COMP2611: Computer Organization. Introduction to Digital Logic

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

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

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

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

Last time, we saw how latches can be used as memory in a circuit

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

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

Contents Circuits... 1

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.

Introduction to Sequential Circuits

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Logic Design. Flip Flops, Registers and Counters

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Sequential Logic and Clocked Circuits

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Other Flip-Flops. Lecture 27 1

Chapter 8 Sequential Circuits

ECE 341. Lecture # 2

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

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

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Sequential Circuits: Latches & Flip-Flops

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

Chapter 5 Sequential Circuits

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 # 12. Traffic Light Controller

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

Analysis of Clocked Sequential Circuits

LATCHES & FLIP-FLOP. Chapter 7

COMP sequential logic 1 Jan. 25, 2016

Where Are We Now? e.g., ADD $S0 $S1 $S2?? Computed by digital circuit. CSCI 402: Computer Architectures. Some basics of Logic Design (Appendix B)

Unit 11. Latches and Flip-Flops

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Experiment 8 Introduction to Latches and Flip-Flops and registers

ELCT201: DIGITAL LOGIC DESIGN

Exercise 2: D-Type Flip-Flop

CMSC 313 Preview Slides

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

Digital Design Datapath Components: Parallel Load Register

Module 4:FLIP-FLOP. Quote of the day. Never think you are nothing, never think you are everything, but think you are something and achieve anything.

D Latch (Transparent Latch)

Chapter 11 Latches and Flip-Flops

Chapter 4. Logic Design

Synchronous Sequential Logic

Chapter 3: Sequential Logic Systems

Lab #11: Register Files

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

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

ELCT201: DIGITAL LOGIC DESIGN

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).

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

Chapter. Synchronous Sequential Circuits

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

CS8803: Advanced Digital Design for Embedded Hardware

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

BUSES IN COMPUTER ARCHITECTURE

SEQUENTIAL CIRCUITS THE RELAY CIRCUIT

ASYNCHRONOUS COUNTER CIRCUITS

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

Engr354: Digital Logic Circuits

CSE 275 Digital Design Lab Lab 8 Serial Adder/Subtractor Penn State Erie, The Behrend College Fall Semester 2007 Number of Lab Periods: 2

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

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

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

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

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

CSE 352 Laboratory Assignment 3

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

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

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Combinational vs Sequential

CHAPTER1: Digital Logic Circuits

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

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

MC9211 Computer Organization

CHAPTER 4: Logic Circuits

Sequential Logic. Introduction to Computer Yung-Yu Chuang

Sequential Logic Circuits

Laboratory Exercise 3

Class 06 Sequential Logic: Flip-Flop

6. Sequential Logic Flip-Flops

CHAPTER 1 LATCHES & FLIP-FLOPS

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

A Combined Combinational-Sequential System

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

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

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Sequential Circuit Design: Principle

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

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

Lecture 8: Sequential Logic

To design a sequential logic circuit using D-Flip-flop. To implement the designed circuit.

Combinational / Sequential Logic

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Transcription:

1 COMP2611: Computer Organization Building Sequential Logics with COMP2611 Fall2015

Overview 2 You will learn the following in this lab: building a SR latch on, building a D latch on, building a D flip-flop from D latches, building a 2-bit register with two D flip-flops.

Quick sequential logics review 3 Do Let me know if you have problem to recall the following terms. A clock, Clock cycles, Rising/falling edge of a clock cycle, Edge triggered clocking, Clocked/unclocked elements, State elements.

The S-R Latch 1 4 A Set-Reset latch is the simplest form of storage element. It is an unclocked element (what does that mean?). Two inputs: - S for storing the value 1 to the latch - R for storing the value 0 to the latch Two outputs - Q for outputting the value stored in the latch -~Q the complement of Q. The following table details the values of the two inputs and the effects on the output value Q. S R Action on Q 0 0 Nothing changed 0 1 Q=0 1 0 Q=1 1 1 forbidden

The S-R Latch 2 5 Start and build the S-R latch as shown below. (make sure you label the inputs and the outputs) Poke the inputs and verify your circuit is correct by referring to the table on the previous slide. Save the latch as sr-latch.circ for future use.

The D-Latch 1 6 A D-latch is a clocked storage element. The value stored in a D-latch can be updated iff the clock is asserted (i.e. Hi). Two inputs - D, the value to be stored - a clock signal (that alternates between Hi and Lo regularly) Two outputs - Q for outputting the value stored in the latch -~Q the complement of Q. The following table details the values of the two inputs and the effects on the output value Q. C (Clock) D Action on Q 0 0 Nothing changed 0 1 Nothing changed 1 0 Q=0 1 1 Q=1

The D-Latch 2 7 Build the D-latch as shown below. (make sure you label the inputs and the outputs) You can find the clock element in the wiring folder of the Explorer pane

The D-Latch 3 8 Click Simulate, Tick Frequency, 1 Hz so that the clock will alternate at the frequency of 1Hz. Now click Show simulation Hierachy button on the toolbar, and then click the Enable clock ticks button to start the clock. Once the clock is running you can poke the input D to store value to the latch. Take some time to observe the way the input is being stored. Store the latch as d-latch.circ.

The D Flip-Flop 1 9 A D flip-flop is an edge triggered device. Its value can only be changed on a clock edge (a much shorter duration than that of the D latch). The D flip-flop can be made from two D latches: The timing diagram for the D flip-flop is shown below, note that changes of the flip-flop value occur only at the falling edge of the clock (circled by the two red ovals) C (Clock) D Action on Q Falling edge 0 0 Falling edge 1 1 Non-falling edge X (don t care) Nothing changed

The D Flip Flop 2 10 Load d-latch.circ and replace the clock with an input named C. Store it as d-latch-withoutclock.circ. Start a new project (by pressing Ctrl+N ) in. Load the D latch built by clicking Project, Load Library, library and select d-latch-withoutclock.circ. Now you should be able to find the d-latch in the Explore pane.

The D Flip Flop 3 11 Click on main and drag the D latch to the canvas to draw the D Flip flop. Mind that locations of the C and D on the D latch (i.e. they are different from that of slide 9). Your finished flip-flop should be similar to the following: Enable the clock as discussed on slide 8, and poke the input D to see the changes of the output at Q and ~Q. Save the flip-flop as D-flip-flop.circ. Now remove the clock from the D flip-flop and replace it by an input C just like before. Save this version as D-flip-flop-withoutclock.circ. We will use it to build a register.

Building a 2-bit register with the D Flip Flops 1 12 We can build a simple register that holds 2 bits with the D flipflop(you can use the D flip-flop to build register of any size, we build a 2-bit register here for simplicity). Basically, the idea is to use two D flip-flops in the circuit, each of which holds a single bit. The input will be 2-bit in width. We need to separate the individual bits by using a splitter and direct the bits to the corresponding D flip-flops.

Building a 2-bit register with the D Flip Flops 2 13 To have 2-bit inputs, you need to follow the 3 steps below to set up the input pin. When you pick south for Facing in step 2, wires can be drawn from the bottom (south) of the input pin. It is up to you whether you want to choose south. After the 3 steps you drag the pin to the canvas and you will have this 2-bit input pin on the canvas (values have been initialized to 0,0).

Building a 2-bit register with the D Flip Flops 3 14 Select a 2-bit splitter from the wiring folder of the Explore pane. Make sure you have set the Fan-Out (number of output legs) and Bit Width In both to be 2. So that each leg carries 1 bit of data.

Building a 2-bit register with the D Flip Flops 4 15 Now load the D-flip-flop-withoutclock.circ as a library and use it as a component of the register. You can load it by clicking Project, Load Library, library and select D-flip-flop-withoutclock.circ. Drag two D flip-flops from the Explorer pane. Note the two input dots (in blue) on the left of the flip-flop and the two output dots (in red) on the right. The upper input dot is C (Clock), the lower input dot is D (Data). The upper output dot is Q and the lower output dot is ~Q.

Building a 2-bit register with the D Flip Flops 5 16 To store 2 bits into the flip-flops, you need to forward the bits from the splitter to the corresponding D flip-flops. You also need to connect a clock signal to both of the D flip-flops. Don t forget to retrieve the output from the flip-flops (using an output pin). Here is an example circuit for the register:

Building a 2-bit register with the D Flip Flops 6 17 Some hints: The colors of the wires hint you on possible errors, make good use of this information. Each of the input/output pins can be connected in one direction only, as determined by the facing attribute. Make sure you connect it correctly. A splitter splits bits according to their location in the input, the order is preserve on the splitter, (i.e., left-most bit on the leftmost split wire and so on) could sometimes have mysterious errors on the wires even though there is no error at all. An easy way to solve this is to copy and paste the whole circuit to a new canvas. This usually solves the problem.

18 Reference: an example of 7-segment digital display

Conclusion 19 We covered the following topics today: auto-build feature, building a SR latch on, building a D latch on, building a D flip-flop from D latches, building a 2-bit register with two D flip-flops.