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

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

COMP2611: Computer Organization Building Sequential Logics with Logisim

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

CS 261 Fall Mike Lam, Professor. Sequential Circuits

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

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

Logisim: A graphical system for logic circuit design and simulation

CHAPTER 4: Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

CHAPTER 4: Logic Circuits

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

ELCT201: DIGITAL LOGIC DESIGN

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

AIM: To study and verify the truth table of logic gates

CS/ECE 250: Computer Architecture. Basics of Logic Design: ALU, Storage, Tristate. Benjamin Lee

CprE 281: Digital Logic

Other Flip-Flops. Lecture 27 1

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

A Matlab-Based Teaching Tool for Digital Logic

CSE 352 Laboratory Assignment 3

Logic Design II (17.342) Spring Lecture Outline

Logic Design. Flip Flops, Registers and Counters

Administrative issues. Sequential logic

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

CprE 281: Digital Logic

Course Administration

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.

CprE 281: Digital Logic

CprE 281: Digital Logic

CprE 281: Digital Logic

Chapter 3 Unit Combinational

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Sequential Logic. Introduction to Computer Yung-Yu Chuang

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

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

Fall 2000 Chapter 5 Part 1

Sequential Design Basics

CprE 281: Digital Logic

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

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

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

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

ECE 341. Lecture # 2

Principles of Computer Architecture. Appendix A: Digital Logic

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Chapter 2. Digital Circuits

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

MODULE 3. Combinational & Sequential logic

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Lecture 12: State Machines

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

COMP12111: Fundamentals of Computer Engineering

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

211: Computer Architecture Summer 2016

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

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

Digital Design Datapath Components: Parallel Load Register

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

Flip-flop and Registers

Multiplexor (aka MUX) An example, yet VERY useful circuit!

CS/EE Homework 6

Sequential Logic and Clocked Circuits

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

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

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

ECE 263 Digital Systems, Fall 2015

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

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

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

Engr354: Digital Logic Circuits

Altera s Max+plus II Tutorial

Synchronous Sequential Logic

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

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

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

LAB #4 SEQUENTIAL LOGIC CIRCUIT

COE328 Course Outline. Fall 2007

Synchronous Sequential Logic

CHAPTER 1 LATCHES & FLIP-FLOPS

ENGN3213 Digital Systems and Microprocessors Sequential Circuits

Laboratory Exercise 6

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

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Semester III. Subject Name: Digital Electronics. Subject Code: 09CT0301. Diploma Branches in which this subject is offered: Computer Engineering

CMSC 313 Preview Slides

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

Experiment # 12. Traffic Light Controller

Chapter 11 Latches and Flip-Flops

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

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

LogicBlocks Experiment Guide a learn.sparkfun.com

Sequential logic circuits

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

Physics 323. Experiment # 10 - Digital Circuits

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

Contents Circuits... 1

Sequential Logic Circuits

Logic Design II (17.342) Spring Lecture Outline

Transcription:

Introduction IS1500 (not part of IS1200) Logic Design Lab (LD-Lab) 2017-10-26 The purpose of this lab is to give a hands-on experience of using gates and digital building blocks. These build blocks are then used in the next lab where we will construct a subset of a simple processor. The intended learning outcomes of this laboratory exercise are as follows. That is, after finishing the lab, the student shall be able to 1. construct basic digital circuits using a graphical design environment. 2. analyze the behavior of both combinational and sequential logic. Lab Environment The lab is done in Logisim, a graphical tool for simulation and design of logic circuits. The tool is open source and is based on Java. It should work on Windows, Mac OS, and various versions of Linux. Please download and install the tool from http://www.cburch.com/logisim/ Resources and Reading Guidelines This laboratory exercise contains the assignments, but not the theory or the background. Please make sure that you are familiar with the following material: The course book by Harris & Harris (H&H), second edition. Chapters 1,2,3, and 5 are relevant for this lab. In particular, you should be familiar with the content in 1.4 (Number systems), 1.5 (Logic Gates), 2.8 (Combinational Building blocks), 3.2 (Latches and Flip- Flops), 3.3 (Synchronous Logic Design), and 5.2 (Arithmetic Circuits). The two lectures for Module 3 (Logic Design): Lecture 7 Combinational Logic and Lecture 8 Sequential Logic. The documentation of Logisim, which is available from http://www.cburch.com/logisim/. Examination This laboratory exercise is examined individually. Each student should submit their own report using the KTH social assignment submission system. Please see the course webpage for more information. Rules for submission of the report: The report must be written by each student individually. This means that it is explicitly forbidden to copy, cut, and paste any text from the Internet or from other students. Each report will be automatically checked for plagiarism. IS1500 LD-Lab Logic Design Page 1

However, it is allowed to discuss solutions and how to address the problems with other students, as long as you personally perform all the exercises in Logisim and you write all your answers individually. All assignments must be solved and all the bullet points for the different tasks completely answered. Note also that the report must clearly show the task number for each solution. The solution must be submitted as a PDF-file. There is no page limit for the report or other requirements of the formatting. Warming up: Getting familiar with Logisim Go through Logisim's Beginner's tutorial. You can find the tutorial in the documentation section on Logisim's webpages. Note that you need to perform each of the steps by using the software, so that you learn how to use the tool. Assignment 1: Decoder Task 1.1 Construct a 2:4 decoder from the following components: 2 inputs, 4 outputs, 2 NOT-gates, and 4 AND-gates. Mark the two inputs as A0 and A1 and the four outputs as Y0, Y1, Y2, and Y3. For task 1.1, include the following in your report: 1. A screenshot of your complete design. 2. Give a short explanation for how you have verified that your design is completely correct. Assignment 2: Multiplexer Before you try to solve the following assignment, carefully read through the Logisim documentation about Libraries and attributes and Wire bundles. Task 2.1 Construct a circuit that is similar to the one below. Note that the multiplexer at the upper part of the figure is a 4:1 multiplexer and that the three multiplexers at the bottom are 2:1 multiplexers. Note also that the 2:1 multiplexers have their select signals at the north side of the component. The component that looks like a fork below the 4:1 multiplexer is a splitter. Note also that the select port is a 2-bit port (black lines to the MUX below). The green port below the MUX is the enable signal. IS1500 LD-Lab Logic Design Page 2

For task 2.1, include the following in your report: 1. Explain why output MUX out is blue, why output signal Equal? is red, and the select signal of the 4:1 multiplexer is black. Task 2.2 A 4:1 multiplexer can be constructed from 3 different 2:1 multiplexers (see H&H or the lecture slides). Your task is now to connect the three 2:1 multiplexers in such a way that their output gives the same behavior as a 4:1 multiplexer. You should also connect both the output from this new multiplexer (the combination of the three 2:1 multiplexers) and the old 4:1 multiplexer to the XOR gate. For task 2.2, include the following in your report: 1. Include a screenshot of your complete design. Note that it should look similar to the figure in task 2.1, but with additional wires. You are not allowed to add any extra components. 2. Explain how you can test the correctness of the component using the output signal Equals?. Assignment 3: Adder Task 3.1 The following figure depicts a 4-bit adder. The figure uses the adder component from the Arithmetic library. Construct the circuit as in the figure below, but with the following input and output signals: B = 0110, S = 0000, Cin = 1, Cout = 1 For task 3.1, include the following in your report: 1. Include a screenshot of your design. Note that you need to find out what input signal A should have, to fulfill the requirements in task 3.1. The figure should contain the correct input and output signal values. Task 3.2 Construct a 4-bit ripple-carry adder by using four 1-bit full adders, two 4-bit input signals (A and B), one carry in signal, one carry out signal, and a 4-bit output signal (S). The design needs to use three 4-bit splitters. For task 3.2, include the following in your report: 1. Include a screenshot of your design. Your design should use the input and output values that were requested in task 3.1. IS1500 LD-Lab Logic Design Page 3

Assignment 4: Latches The three first assignments did not contain any memory, they were all examples of combinational logic design. The rest of the assignments will be examples of sequential logic design, that is, circuits that have states. Task 4.1 Construct an SR latch by using two NOR-gates. Clearly mark S and R inputs, and the Q and Q' outputs. For task 4.1, include the following in your report: 1. Include a screenshot where both S and R are 0. Explain what the possible values for Q and Q' can be. 2. Include a screenshot where S = 1 and R = 0. Explain the possible values for Q and Q' in this case. If you toggle S (switch between 0 and 1), do then Q or Q' change? Why or why not? 3. What happens if S is equal to 0 and R is toggled between 1 and 0? Task 4.2 Create a D latch by extending the SR latch that you created in task 4.1. For task 4.2, include the following in your report: 1. Include a screenshot of your complete design of the D latch, when both the D and the CLK signals are 0. Explain what happens if D is equal to 0 and you toggle CLK? What happens if CLK is 0 and you toggle D? Are Q and Q' changed? Why or why not? 2. What happens if CLK is 1 and you toggle D? 3. Explain the benefits with the D latch compared to the SR latch. 4. Explain the problem with D latches and why they are not used in synchronous sequential logic. Assignment 5: D Flip-Flops and Registers Before you try to solve the following assignment, read through the Logisim documentation about Subcircuits carefully. Task 5.1 Create a sub-circuit of the D latch. Instantiate two D latches and connect them together to form a D Flip-Flop (see H&H or the lecture slides). Your circuit should have two 1-bit input signals: (i) Din (data in), and (ii) CLK (clock signal). Moreover, it should have one output signal Q. For task 5.1, include the following in your report: 1. Include a screenshot of your design of the D Flip-Flop, where the two D latches are subcircuits. 2. Explain in what circumstances the value of Q changes. Explain by giving concrete examples. Task 5.2 Construct a 4-bit register by reusing the D Flip-Flop as sub-circuits. Your design should have a 4- bit input signal called X, a 4-bit output signal called Y, and a clock signal. For task 5.2, include the following in your report: 1. Include a screenshot of your design. IS1500 LD-Lab Logic Design Page 4

Assignment 6: Design of a Synchronous Sequential Circuit Task 6.1 Design a synchronous sequential circuit with the following components: An 8-bit register. Use standard register component available in Logisim (located in the memory library). A clock input signal (located under the Wiring library) One 8-bit input signal, called I. One 8-bit output signal, called O. An 2:1 multiplexer with 8-bit width. An 8-bit adder. Use the adder from the standard library. A NOT gate with 8-bit data width. A button, located in the Input/Output library. The circuit should increment the output signal O with the value I each time the clock ticks (rising edge) as long as the button is not pressed. If the button is pressed, the output should be decremented with value I. Note that you can start the simulation mode by checking Ticks Enabled under the Simulation menu in Logisim. For task 6.1, include the following in your report: 1. Include a screenshot of your design. Briefly explain how the circuit works. 2. Explain the meaning of a synchronous sequential circuit. Which of the tasks in this lab can be classified as synchronous sequential circuits? Revision History 2016-10-25: Fixed two minor typos. 2017-10-26: Minor fixes to make the questions clearer. IS1500 LD-Lab Logic Design Page 5