Lab #12: ArithmeticLogic Unit

Similar documents
EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

ENEE 245 Lab 1 Report Rubrics

The Itanium Bit Microprocessor Report

Laboratory 10. Programming a PIC Microcontroller - Part II

Chapter 2 Logic Gates and Introduction to Computer Architecture

Laboratory 4 Design a Muti-bit Counter

Laboratory Exercise 3

REGISTER TRANSFER LANGUAGE

Laboratory 4 Design a Muti-bit Counter and Programming a FPGA

Lab 3: Standard Combinational Components

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

Memory Supplement for Section 3.6 of the textbook

IA Digital Electronics - Supervision I

To design a 4-bit ALU To experimentally check the operation of the ALU

EET 1131 Lab #7 Arithmetic Circuits

Register Transfer and Micro-operations

ENEE245 Digital Circuits and Systems Lab Manual

Scheme G. Sample Test Paper-I

ENEE245 Digital Circuits and Systems Lab Manual

EE577A FINAL PROJECT REPORT Design of a General Purpose CPU

EE 231 Fall Lab 2: Decoders and Multiplexers. Introduction

Computer architecture Assignment 3

Digital Design with FPGAs. By Neeraj Kulkarni

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Lab Assignment 3 Altera Richards Controller and Logic Analyzer Laboratory Rev.

LABORATORY MANUAL VLSI DESIGN LAB EE-330-F

Dec Hex Bin ORG ; ZERO. Introduction To Computing

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

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Lab 6: Integrated the Decoder with Muti-bit Counter and Programming a FPGA

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

Announcements. This week: no lab, no quiz, just midterm

Chapter 4. The Processor

MICROPROCESSOR B.Tech. th ECE

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Rensselaer Polytechnic Institute Computer Hardware Design ECSE 4770

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

EE 3170 Microcontroller Applications

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Chapter 4. The Processor

Code No: R Set No. 1

Institute of Engineering & Management

CSE 141L Computer Architecture Lab Fall Lecture 3

CS 151 Midterm. (Last Name) (First Name)

ELEC 2200 Digital Logic Circuits

Laboratory Exercise 1

CS429: Computer Organization and Architecture

8/26/2010. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to Three Units of 8085


Experiment 18 Full Adder and Parallel Binary Adder

12-Dec-11. Gursharan Singh Maninder Kaur. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to 8085

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

ECE 341 Midterm Exam

Let s put together a Manual Processor

NAND/NOR Logic Gate Equivalent Training Tool Design Document. Team 34 TA: Xinrui Zhu ECE Fall Jeremy Diamond and Matthew LaGreca

EE4380 Microprocessor Design Project

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

ELCT 501: Digital System Design

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

EET2411 DIGITAL ELECTRONICS. A device or electrical circuit used to store a single bit (0 or 1) Ex. FF.

Digital Integrated Circuits

Chapter 1: Basics of Microprocessor [08 M]

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

11/22/1999 7pm - 9pm. Name: Login Name: Preceptor Name: Precept Number:

Assembly Language Programming of 8085

Am2901 Completion and Integration with Am9080a

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Lab3: I/O Port Expansion

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control

EGCP 1010 Digital Logic Design (DLD) Laboratory #6

Finite State Machine Lab

END-TERM EXAMINATION

Building a two-bit processor

ECE 341 Final Exam Solution

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Injntu.com Injntu.com Injntu.com R16

address ALU the operation opcode ACC Acc memory address

PART 1. Simplification Using Boolean Algebra

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Introduction to Computing Module No: CS/ES/1 Quadrant 1 e-text

EE 231 Fall EE 231 Lab 3. Decoders and Multiplexers. Figure 1: 7-Segment Display. Memory: where the program is stored.

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Cpr E 281 FINAL PROJECT ELECTRICAL AND COMPUTER ENGINEERING IOWA STATE UNIVERSITY. FINAL Project. Objectives. Project Selection

CS222: Processor Design

ECE 341 Midterm Exam

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

ECE232: Hardware Organization and Design

Computer Architecture

Microprocessor Architecture

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

Data paths for MIPS instructions

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Laboratory Exercise 7

Transcription:

Lab #12: ArithmeticLogic Unit Zack Mattis Lab: 3/27/17 Report: 4/8/17 Partner: Brendan Schuster

Purpose In this lab, a fully functioning 4-bit Arithmetic Logic Unit (ALU) was designed and fully implemented onto a protoboard that is capable of performing a number of operations. ALUs can perform both arithmetic operations such as addition and subtraction as well as logical operations including ANDs and ORs. ALUs are utilized by CPUs to provide the data calculations of the specified functions. This implementation utilizes a 4 x 4 register previously created and a 4-bit latch to provide the inputs to the ALU. Additionally, the output of the ALU is fed back into the 4 x 4 register through the use of a 4 x 2:1 MUX to store the calculated hexadecimal values in the registers. Two 7-segment displays are included to observe the output of the ALU as well as the output value of the 4 x 4 register. The design can be seen in Figure 1 below. The operation of the design was verified using the LogicPort Logic Analyzer to observe the signals of the circuit. The design was implemented using one 4x4 register (74LS670), one ALU (74LS181), two counters (74LS193), one 4 x 2:1 MUX (74LS157), two D Flip-Flops (74LS74), two 7-segment display drivers/decoders (74LS247), two 7segment displays, three 8-bit DIP SPST switches, one SPST switch, 18 resistors, and 4 LEDs. Figure 1 4 bit ALU

Procedure The design for the 4-bit ALU was created using the Altera Quartus 9.1 software and can be seen in Figure 2 (see attached). The design uses a 4x4 register combined with 2 counters for the read/write, and 4-bit latch, a 4-bit ALU, and two decoders for the seven segment displays that convert the hexadecimal input/output into a visual 7 segment output display. Additionally, a 4 x 2:1 MUX supplies the input of the 4 x 4 register from either user-selected input data or the output of the ALU to store the calculated data in the registers. This design was then tested using the Quartus simulation tool that allows for user selected data for each of the inputs. By manipulating the data in the 4 x 4 register, and sending it to the latch, the user can select the two data operands of the ALU. By changing the select lines of the ALU (S[3] S[0]), the mode (M), and the carry in (Cin), the user can select which ALU operation he/she wishes to perform. Four different operations (addition, subtraction, AND, OR) were tested using Quartus and their respective waveforms can be seen in Figures 3-6 (see attached). Finally, 4 hexadecimal digits were added together using the 4 registers of the 4x4 register. The values 1, 2, 2, and 3 were added to get the final output of 8, which can be seen in Figure 7 (see attached). The verified design was then implemented onto the protoboard using the previously mentioned IC chips. DIP switches were used to provide the control signals as well as the 4-bit data signals. A SPST switch was used to provide the clocking signal for the latch to store the 4-bit hex value from the register. The ALU inputs were from the 4-bit latch and from the 4x4 register. Through the use of the 4 x 2:1 MUX, the output of the ALU was wired back into the register so that it could be stored. Both the register value and the output from the ALU were wired to seven-segment display decoders and then seven segment displays. These displays allowed for easy viewing of the hexadecimal value that was being produced. Additionally, LEDs were added to the output of each counter to view which register was active. This protoboard implementation was then analyzed using the LogicPort Logic Analyzer. This device converts the analog signal of the circuit into a digital form of 0s and 1s. This tool enables effective observation of the circuit s inputs and outputs. In our testing, we connected the device to 19 data inputs. Each of the four operations simulated in Quartus were then tested on the Logic Analyzer. The output waveforms of addition, subtraction, AND, and OR can be seen Figures 8-11 (see attached), respectively.

Results The use of a 4x4 register wired in combination with a 4-bit latch allows for effective input signals for the operands of the ALU. Utilization of a 4 x 2:1 MUX was a necessary implementation for the ALU in order to store the calculated data output in the register. Additionally, the use of seven segment displays allowed the user to easily see the hexadecimal value stored within the register as well as the hexadecimal output of the ALU. The use of LEDs for the output of the counter also allow the user to see which register has been selected. Our completed circuit design can be seen in Figure 12 below. Using this completed ALU protoboard implementation, we were able to implement a 4-bit multiplication operation using the pseudocode shown in Figure 13 (see attached). This pseudocode is used to find the first partial product (a3b0 a2b0 a1b0 a0b0) of the multiplication of operands A (a3a2a1a0) & B (b3b2b1b0). This multiplication was then analyzed using the Logic Analyzer to verify its operation. The multiplication waveform can be seen in Figure 14 (see attached). Figure 12 ALU Protoboard Implementation

Conclusion The design implementation of the 4-bit ALU from Figure 2 proved to be a successful design. This protoboard circuit works as a fully-functional ALU capable of performing all of the operations required from a CPU. The LogicPort Logic Analyzer output waveforms from Figures 8-11 shows the user correctly utilizing the ALU to perform both arithmetic and logical operations (addition, subtraction, AND, OR). Without a multiplication operation integrated within the ALU, utilization of the pseudocode shown in Figure 13 using AND, OR, shift, & addition operations can be used to calculate partial products to store within registers to calculate a final 4-bit hexadecimal product. The ALU design and implementation was a practical application to understanding how the CPUs of computers utilize ALUs to provide the operations necessary to function properly. References 1. ECE 0501 Digital Systems Laboratory Custom Course Materials. Laboratory Notebook. University of Pittsburgh.