Laboratory Exercise 6

Similar documents
Laboratory Exercise 6

Course Project: Adders, Subtractors, and Multipliers a

Laboratory Exercise 6

Laboratory Exercise 6

Laboratory Exercise 2

Laboratory Exercise 2

Laboratory Exercise 1

Laboratory Exercise 3

Distributed Packet Processing Architecture with Reconfigurable Hardware Accelerators for 100Gbps Forwarding Performance on Virtualized Edge Router

Fall 2010 EE457 Instructor: Gandhi Puvvada Date: 10/1/2010, Friday in SGM123 Name:

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Fall 2010 EE457 Instructor: Gandhi Puvvada Date: 10/1/2010, Friday in SGM123 Name:

VLSI Design 9. Datapath Design

Laboratory Exercise 1

Computer Arithmetic Homework Solutions. 1 An adder for graphics. 2 Partitioned adder. 3 HDL implementation of a partitioned adder

Trainable Context Model for Multiscale Segmentation

Dynamically Reconfigurable Neuron Architecture for the Implementation of Self- Organizing Learning Array

Operational Semantics Class notes for a lecture given by Mooly Sagiv Tel Aviv University 24/5/2007 By Roy Ganor and Uri Juhasz

Experiment 7 Arithmetic Circuits Design and Implementation

CS201: Data Structures and Algorithms. Assignment 2. Version 1d

MAT 155: Describing, Exploring, and Comparing Data Page 1 of NotesCh2-3.doc

A SIMPLE IMPERATIVE LANGUAGE THE STORE FUNCTION NON-TERMINATING COMMANDS

Planning of scooping position and approach path for loading operation by wheel loader

Technical Bulletin TB1554. Class: INFO. JVM Software Update Procedure

Aalborg Universitet. Published in: Proceedings of the Working Conference on Advanced Visual Interfaces

Keywords Cloud Computing, Service Level Agreements (SLA), CloudSim, Monitoring & Controlling SLA Agent, JADE

A METHOD OF REAL-TIME NURBS INTERPOLATION WITH CONFINED CHORD ERROR FOR CNC SYSTEMS

(12) Patent Application Publication (10) Pub. No.: US 2011/ A1

(12) Patent Application Publication (10) Pub. No.: US 2013/ A1. Dhar et al. (43) Pub. Date: Jun. 6, 2013 NY (US) (57) ABSTRACT

A New Approach to Pipeline FFT Processor

xy-monotone path existence queries in a rectilinear environment

How to. write a paper. The basics writing a solid paper Different communities/different standards Common errors

Lecture 14: Minimum Spanning Tree I

Technical Bulletin TB1570. Class: INFO. Subject JVM Software Update Procedure. Series V-Range (501,651,801)

Laboratory Exercise 7

SIMIT 7. Component Type Editor (CTE) User manual. Siemens Industrial

SIMIT 7. What's New In SIMIT V7.1? Manual

Aspects of Formal and Graphical Design of a Bus System

E5ZE-8 Multipoint Temperature Controller Communications Manual

SIMIT 7. Profinet IO Gateway. User Manual

Edits in Xylia Validity Preserving Editing of XML Documents

Testing Structural Properties in Textual Data: Beyond Document Grammars

Key Terms - MinMin, MaxMin, Sufferage, Task Scheduling, Standard Deviation, Load Balancing.

Minimum congestion spanning trees in bipartite and random graphs

Delaunay Triangulation: Incremental Construction

Hassan Ghaziri AUB, OSB Beirut, Lebanon Key words Competitive self-organizing maps, Meta-heuristics, Vehicle routing problem,

Factor Graphs and Inference

A Specification for Rijndael, the AES Algorithm

Advanced Encryption Standard and Modes of Operation

Analysis of slope stability

A Study of a Variable Compression Ratio and Displacement Mechanism Using Design of Experiments Methodology

Universität Augsburg. Institut für Informatik. Approximating Optimal Visual Sensor Placement. E. Hörster, R. Lienhart.

Quadrilaterals. Learning Objectives. Pre-Activity

DAROS: Distributed User-Server Assignment And Replication For Online Social Networking Applications

Introduction to VHDL Design on Quartus II and DE2 Board

Increasing Throughput and Reducing Delay in Wireless Sensor Networks Using Interference Alignment

INVERSE DYNAMIC SIMULATION OF A HYDRAULIC DRIVE WITH MODELICA. α Cylinder chamber areas ratio... σ Viscous friction coefficient

Modeling of underwater vehicle s dynamics

Stress-Blended Eddy Simulation (SBES) - A new Paradigm in hybrid RANS-LES Modeling

A Multi-objective Genetic Algorithm for Reliability Optimization Problem

Frequency Table Computation on Dataflow Architecture

Anisotropic filtering on normal field and curvature tensor field using optimal estimation theory

np vp cost = 0 cost = c np vp cost = c I replacing term cost = c+c n cost = c * Error detection Error correction pron det pron det n gi

Cutting Stock by Iterated Matching. Andreas Fritsch, Oliver Vornberger. University of Osnabruck. D Osnabruck.

3D SMAP Algorithm. April 11, 2012

The norm Package. November 15, Title Analysis of multivariate normal datasets with missing values

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS

The Association of System Performance Professionals

A System Dynamics Model for Transient Availability Modeling of Repairable Redundant Systems

ADAM - A PROBLEM-ORIENTED SYMBOL PROCESSOR

Building a Compact On-line MRF Recognizer for Large Character Set using Structured Dictionary Representation and Vector Quantization Technique

Topics. FPGA Design EECE 277. Number Representation and Adders. Class Exercise. Laboratory Assignment #2

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

( ) subject to m. e (2) L are 2L+1. = s SEG SEG Las Vegas 2012 Annual Meeting Page 1

Spring 2012 EE457 Instructor: Gandhi Puvvada

Analysis of the results of analytical and simulation With the network model and dynamic priority Unchecked Buffer

CSE 250B Assignment 4 Report

The Crank-Nicholson method for a nonlinear diffusion equation

Multi-Target Tracking In Clutter

ENEE245 Digital Circuits and Systems Lab Manual

Algorithmic Discrete Mathematics 4. Exercise Sheet

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

ENEE245 Digital Circuits and Systems Lab Manual

UC Berkeley International Conference on GIScience Short Paper Proceedings

9/6/2011. Multiplication. Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding

Finite Elements Method in Split Hopkinson Pressure Bar developing process

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

Figure 1: Verilog used to generate divider

AUTOMATIC TEST CASE GENERATION USING UML MODELS

Digital Systems Laboratory

arxiv: v1 [cs.ds] 27 Feb 2018

An Intro to LP and the Simplex Algorithm. Primal Simplex

/06/$ IEEE 364

A Sparse Shared-Memory Multifrontal Solver in SCAD Software

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 4

An Active Stereo Vision System Based on Neural Pathways of Human Binocular Motor System

MPLEMENTATION. Part 1: Implementation of the TOC on the DE2 Board using Verilog - Performed in Lab #1

Topics. Lecture 37: Global Optimization. Issues. A Simple Example: Copy Propagation X := 3 B > 0 Y := 0 X := 4 Y := Z + W A := 2 * 3X

else end while End References

Multicast with Network Coding in Application-Layer Overlay Networks

Transcription:

Laboratory Exercie 6 Adder, Subtractor, and Multiplier a a The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each b c circuit will be decribed in Verilog and implementedb o on an Altera DE2-erie board. Part I 1 a) Full adder circuit b) Full adder ymbol Conider again the four-bit ripple-carry adder circuit ued in lab exercie 2; it diagram i reproduced in Figure 1. b a c 3 c 2 c 1 b n 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ut 3 2 1 c) Full adder truth table d) Four-bit ripple-carry adder circuit Figure 1: A four-bit ripple carry adder. Thi circuit can be implemented uing a ign in Verilog. For example, the following code fragment add n-bit number A and B to produce output um and carry: wire [n-1:] um; wire carry;... aign {carry, um} = A B; Ue thi contruct to implement a circuit hown in Figure 2. Deign and compile your circuit with uartu II oftware, download it onto a DE2-erie board, and tet it operation a follow: 1. Create a new uartu II project. Select the appropriate target chip that matche the FPGA chip on the Altera DE2-erie board. Implement the deigned circuit on the DE2-erie board. 2. Write Verilog code that decribe the circuit in Figure 2. 3. Connect input A to witche SW 7, and ue KEY a an active-low aynchronou reet and KEY 1 a a manual clock input. The um output hould be diplayed on red LEDR 7 light and the carry-out hould be diplayed on the red LEDR 8 light. 4. Aign the pin on the FPGA to connect to the witche and 7-egment diplay by importing the appropriate pin aignment file. 5. Compile your deign and ue timing imulation to verify the correct operation of the circuit. Once the imulation work properly, download the circuit onto the DE2-erie board and tet it by uing different value of A. Be ure to check that the Overflow output work correctly. 1

c 3 c 2 c 1 b n 6. Open the uartu II Compilation Report and examine the reult reported by the Timing Analyzer. What i the maximum operationcfrequency, out 3 f max, of 2 your circuit? 1 What i the longet path in the circuit in term of delay? a) Four-bit ripple-carry adder circuit A 8 Clock R 8 D overflow n 8 R Overflow S Figure b) Eight-bit 2: An eight-bit regitered accumulator adder circuit circuit. Part II Extend the circuit from Part I to be able to both add and ubtract number. To do o, add an add ub input to your circuit. When add ub i 1, your circuit hould ubtract A from S, and add A and S a in Part I otherwie. Part III Figure 3a give an example of paper-and-pencil multiplication P = A B, where A = 11 and B = 12. 1 1 x 1 2 2 2 1 1 1 3 2 1 1 1 x 1 1 1 1 1 1 1 1 1 1 p 7 p 6 p 5 x b b b p 4 b p 3 p 2 p 1 b p a) Decimal b) Binary c) Implementation Figure 3: Multiplication of binary number. We compute P = A B a an addition of ummand. The firt ummand i equal to A time the one digit of B. The econd ummand i A time the ten digit of B, hifted one poition to the left. We add the two ummand to form the product P = 132. Part b of the figure how the ame example uing four-bit binary number. To compute P = A B, we firt form ummand by multiplying A by each digit of B. Since each digit of B i either 1 or, the ummand are either hifted verion of A or. Figure 3c how how each ummand can be formed by uing the Boolean AND operation of A with the appropriate bit of B. 2

A four-bit circuit that implement P = A B i illutrated in Figure 4. Becaue of it regular tructure, thi type of multiplier circuit i called an array multiplier. The haded area correpond to the haded column in Figure 3c. In each row of the multiplier AND gate are ued to produce the ummand, and full adder module are ued to generate the required um. b p 7 p 6 p 5 p 4 p 3 p 2 p 1 p Figure 4: An array multiplier circuit. Perform the following tep to implement the array multiplier circuit: 1. Create a new uartu II project to implement the deired circuit on the Altera DE2-erie board. 2. Generate the required Verilog file, include it in your project, and compile the circuit. 3. Ue functional imulation to verify your deign. 4. Augment your deign to ue witche SW 11 8 to repreent the number A and witche SW 3 to repreent B. The hexadecimal value of A and B are to be diplayed on the 7-egment diplay HEX6 and HEX4, repectively. The reult P = A B i to be diplayed on HEX1 and HEX. 5. Aign the pin on the FPGA to connect to the witche and 7-egment diplay by importing the appropriate pin aignment file. 3

6. Recompile the circuit and download it into the FPGA chip. 7. Tet the functionality of your circuit by toggling the witche and oberving the 7-egment diplay. Part IV In Part III, an array multiplier wa implemented uing full adder module. At a higher level, a row of full adder function a an n-bit adder and the array multiplier circuit can be repreented a hown in Figure 5. b n-bit Adder 3 2 1 b n-bit Adder 3 2 1 b b3 n-bit Adder 3 2 1 b p 7 p 6 p 5 p 4 p 3 p 2 p 1 p Figure 5: An array multiplier implemented uing n-bit adder. Each n-bit adder add a hifted verion of A for a given row and the partial um of the row above. Abtracting the multiplier circuit a a equence of addition allow u to build larger multiplier. The multiplier hould conit of n-bit adder arranged in a tructure hown in Figure 5. Ue thi approach to implement an 8x8 multiplier circuit with regitered input and output, a hown in Figure 6. 4

A 5 B 5 Clock D D Multiplier 1 DR Figure 6: A regitered multiplier circuit. P Perform the following tep: 1. Create a new uartu II project. 2. Write the required Verilog file, include it in your project, and compile the circuit. 3. Ue functional imulation to verify your deign. 4. Augment your deign to ue witche SW 15 8 to repreent the number A and witche SW 7 to repreent B. The hexadecimal value of A and B are to be diplayed on the 7-egment diplay HEX7-6 and HEX5-4, repectively. The reult P = A B i to be diplayed on HEX3-. 5. Aign the pin on the FPGA to connect to the witche and 7-egment diplay. 6. Recompile the circuit and download it into the FPGA chip. 7. Tet the functionality of your deign by toggling the witche and oberving the 7-egment diplay. 8. How large i the circuit in term of the number of logic element? 9. What i the f max for thi circuit? Part V Part IV howed how to implement multiplication A B a a equence of addition, by accumulating the hifted verion of A one row at a time. Another way to implement thi circuit i to perform addition uing an adder tree. An adder tree i a method of adding everal number together in a parallel fahion. Thi idea i illutrated in Figure 7. In the figure, number A, B, C, D, E, F, G, and H are added together in parallel. The addition A B happen imultaneouly with C D, E F and G H. The reult of thee operation are then added in parallel again, until the final um P i computed. 5

A B C D E F G H P Figure 7: An example of adding 8 number uing an adder tree. In thi part you are to implement an 8x8 array multiplier that compute P = A B. Ue an adder tree tructure to implement operation hown in Figure 5. Input A and B, a well a the output P hould be regitered a in Part IV. What i the f max for thi circuit? Preparation The recommended preparation for thi laboratory exercie include Verilog code for Part I through V. Copyright c 211 Altera Corporation. 6