Lab 6 Module M8.3. EXPERIMENT 6: Adder/Subtractor PRE-LAB 1.Read and understand text Sec. 6.2, Adders and Subtractors, pages 107-117. 2.Using textbook.

Slides:



Advertisements
Similar presentations
Adders Module M8.1 Section 6.2. Adders Half Adder Full Adder TTL Adder.
Advertisements

Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika
Modulo-N Counters Module M10.4 Section 7.2.
Encoders Module M9.3 Section 6.3. Encoders Priority Encoders TTL Encoders.
Verilog Descriptions of Digital Systems
Shift Registers Module M11.1 Section 7.3.
7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
Magnitude Comparator Lecture L6.4 Section 6.1.
Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
Binary Counters Module M10.3 Section 7.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
©2004 Brooks/Cole FIGURES FOR CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES Click the mouse to move to the next page. Use the ESC key.
ECE 331 – Digital System Design
Multiplier Lecture L7.3 Section 10.4 (p.276) Section 7.3 (Handout)
Multiplexers Lecture L6.4 Section 6.4.
Subtractors Module M8.2 Section 6.2. Subtractors Half Subtractor Full Subtractor Adder/Subtractor - 1 Adder/Subtractor - 2.
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Shifter Lecture L7.4 Group HW #4 Section 10.3.
Codes and Code Converters
Code Converters Module M7.1 Section 6.5. Code Converters Binary-to-BCD Converters ABEL TRUTH_TABLE Command.
Arithmetic Logic Unit (ALU) Lecture L7.5 Section 7.5.
Pulse-Width Modulated DAC Lecture 11.3 Section 11.5.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
2’s Complement 4-Bit Saturator
Adders Lecture L7.1 Section 6.2 Section 10.4 (pp )
Lab 5 Multiplexer and 7-Segment Display Module M7.3.
Arithmetic Logic Unit (ALU) Lecture L9.3 Lab 10. ALU CB = carry_borrow flag Z = zero flag (Z = 1 if Y = 0)
WinCupl Module M2.2 Section 4.2. Experiment 2 CUPL Header.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Introduction to Basys 2. Switches Slide switchesPush button switches.
Figure 1.1 The Altera UP 3 FPGA Development board
ALTERA UP2 Tutorial 1: The 15 Minute Design. Figure 1.1 The Altera UP 1 CPLD development board. ALTERA UP2 Tutorial 1: The 15 Minute Design.
Binary Arithmetic Adding Binary numbers Overflow conditions
Introduction to FPGA Design Illustrating the FPGA design process using Quartus II design software and the Cyclone II FPGA Starter Board. Physics 536 –
Chapter 4 Programmable Logic Devices: CPLDs with VHDL Design Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights.
Adders and Multipliers Review. ARITHMETIC CIRCUITS Is a combinational circuit that performs arithmetic operations, e.g. –Addition –Subtraction –Multiplication.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Advanced Digital Circuits ECET 146 Week 5 Professor Iskandar Hack ET 221G, Me as I typed this slides.
© 2003 Xilinx, Inc. All Rights Reserved For Academic Use Only Xilinx Design Flow FPGA Design Flow Workshop.
Advanced Digital Circuits ECET 146 Week 4 Professor Iskandar Hack ET 221G,
1 Introduction to Xilinx ISL8.1i Schematic Capture and VHDL 1.
Advanced Digital Circuits ECET 146 Week 5 Professor Iskandar Hack ET 221B,
This material exempt per Department of Commerce license exception TSU Xilinx Tool Flow.
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
COE4OI5 Engineering Design Chapter 1: The 15 minutes design.
Windows 2000 Unit A A1 – A24 and Ap1 – Ap3 (Formatting a Disk)
CSE 171 Lab 11 Digital Voltmeter.
Introduction to VHDL Coding Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
How does a Computer Add ? Logic Gates within chips: AND Gate A B Output OR Gate A B Output A B A B
Lab 2 Basic Gates in a PLD Module M2.3 Section 4.2 Experiment 2 (p. 63)
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
LAB #5 Modular Design and Hierarchy using VHDL
ECE 3130 Digital Electronics and Design
Figure 1.1 The Altera UP 1 CPLD development board.
This chapter in the book includes: Objectives Study Guide
A tutorial guide to start with ISE
Magnitude Comparator Module M5.2 Section 6.1.
Homework Reading Machine Projects Labs
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
CSE 171 Lab 11 Digital Voltmeter.
الوحدة الرابعة البرمجة وصياغة حل المسائل البرمجة وأهميتها أهداف الدرس الأول مفهوم البرمجة. الفرق بين المبرمج ومستخدم البرنامج. الحاجة إلى البرامج.
Number Systems and Circuits for Addition
Instructor: Alexander Stoytchev
Homework Reading Machine Projects Labs
FIGURE 1: SERIAL ADDER BLOCK DIAGRAM
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Magnitude Comparator Lecture L6.2 Section 6.1.
Prof. Onur Mutlu ETH Zurich Spring March 2019
Presentation transcript:

Lab 6 Module M8.3

EXPERIMENT 6: Adder/Subtractor PRE-LAB 1.Read and understand text Sec. 6.2, Adders and Subtractors, pages Using textbook Figure 6.27 as a guide, write an ABEL program called addsub.abl for a 4-bit full adder/subtracter using a Xilinx XC95108 PC84 chip on a PLDT-1 unit. Start by assigning inputs A3..A0 to switches 1 to 4 (pins 6, 7, 11, and 5 respectively) and write a vector equation, A = [A3..A0]. Assign inputs B3..B0 to switches 5 to 8 (pins 72, 71, 66, and 70 respectively) and write a vector equation, B = [B3..B0]. Assign the control input E to the push-button switch (pin 10). Assign outputs SD3..SD0 to LEDs 5 to 8 (pins 39, 37, 36, and 35) and define a vector, SD = SD3..SD0. Also assign an overflow flag output, OVF, and a carry/borrow flag output, CBF, to LEDs 1 and 4 (pins 44 and 40 respectively).

3.In addition to input and output terms, you will need intermediate nodes to describe the 'B' input terms to the full adders and the intermediate carry terms. Simply add the equation, Bin = B $ E, to describe a 'B' input vector and, for intermediate carry terms, add the following node and vector definitions: C4..C0 NODE ISTYPE 'com'; " internal carry/borrow vector Cin = [C3..C0]; " carry/borrow input vector Cout = [C4..C1]; " carry/borrow output vector

4. In the EQUATIONS section, set C0 equal to E. Then, using textbook Figure 6.14 as a guide and by substituting the vectors SD for S i, Cout for C i+1, Cin for C i, A for A i, and Bin for B i, write equations for SD and Cout as a function of Cin, A, and Bin. Then, write equations for the overflow and carry/borrow flags, OVF and CBF, as a function of the intermediate carry terms, C4 and C3. Print out a copy of your file.

E A B BinOVFCBF SD __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ __________________ 5. Complete the following table of test values for the adder/subtracter:

Using the results from this table make a set of test vectors in the following format and add them to the end of your ABEL program. test_vectors ([E,A,B] -> [OVF,CBF,SD]) [0,0,0] -> [0,0,0];

LAB 1.Create a directory called under C:\CSE171 on the computer you are using in the lab. Create a new project called Lab6 using the Xilinx Project Navigator program. (See the Lab 2 tutorial for details.) Add your program addsub.abl to the project by using Project->Add Copy of Source… on the Project Navigator toolbar. Compile your program by double-clicking Generate Programming File.

2.Select addsub-vectors in the Sources in Project window. Double-click Generate Blif Simulation Report under Simulation Reports in the Processes for Current Source window. Double-click View Blif Simulation Report under Generate Blif Simulation Report. If there are no errors, print out this Blif Simulation Report. 3.Select addsubp.abl in the Sources in Project window. Program the Xilinx XC9508PC84 CPLD on the PLDT-1 board by double-clicking Configure Device (iMPACT) and then right-clicking on the picture of the Xilinx chip.

4.Test your adder/subtracter by setting the toggle switches to each of the test values given above in Pre-lab step 5 and confirm correct results for each. Demonstrate your adder/subtracter to your lab instructor and obtain your lab instructor's signature for your work on the.abl listing for the program addsub.abl. 5.Include the following in the lab report: a. A listing of your file, addsub.abl. b. A listing of the Blif Simulation Report. c. A copy of the results from Pre-Lab Part 5 above. 6.Delete the directory C:\CSE171\ that you created at the beginning of this lab.