CSE140 Homework #7 - Solution



Similar documents
Binary Adders: Half Adders and Full Adders

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Module 3: Floyd, Digital Fundamental

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Let s put together a Manual Processor

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

CMOS Binary Full Adder

NAME AND SURNAME. TIME: 1 hour 30 minutes 1/6

Gates, Circuits, and Boolean Algebra

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

CHAPTER 3 Boolean Algebra and Digital Logic

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Lecture 8: Synchronous Digital Systems

3.Basic Gate Combinations

ASYNCHRONOUS COUNTERS

Asynchronous counters, except for the first block, work independently from a system clock.

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Systems I: Computer Organization and Architecture

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Chapter 2 Logic Gates and Introduction to Computer Architecture

Module 4 : Propagation Delays in MOS Lecture 22 : Logical Effort Calculation of few Basic Logic Circuits

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Flip-Flops, Registers, Counters, and a Simple Processor

Basic Logic Gates Richard E. Haskell

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Lesson 12 Sequential Circuits: Flip-Flops

Decimal Number (base 10) Binary Number (base 2)

BINARY CODED DECIMAL: B.C.D.

Counters and Decoders

CHAPTER 11: Flip Flops

e.g. τ = 12 ps in 180nm, 40 ps in 0.6 µm Delay has two components where, f = Effort Delay (stage effort)= gh p =Parasitic Delay

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Implementation of Modified Booth Algorithm (Radix 4) and its Comparison with Booth Algorithm (Radix-2)

DEPARTMENT OF INFORMATION TECHNLOGY

Optimization and Comparison of 4-Stage Inverter, 2-i/p NAND Gate, 2-i/p NOR Gate Driving Standard Load By Using Logical Effort

Systems I: Computer Organization and Architecture

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Combinational Logic Design

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

LFSR BASED COUNTERS AVINASH AJANE, B.E. A technical report submitted to the Graduate School. in partial fulfillment of the requirements

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

Understanding Logic Design

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Sequential Logic: Clocks, Registers, etc.

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Gate Delay Model. Estimating Delays. Effort Delay. Gate Delay. Computing Logical Effort. Logical Effort

Sistemas Digitais I LESI - 2º ano

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

ERROR DETECTION AND CORRECTION

Lecture 5: Gate Logic Logic Optimization

(Refer Slide Time: 00:01:16 min)

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Upon completion of unit 1.1, students will be able to

Counters are sequential circuits which "count" through a specific state sequence.

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

State Machines in VHDL

An Effective Deterministic BIST Scheme for Shifter/Accumulator Pairs in Datapaths

CSE140: Components and Design Techniques for Digital Systems

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

System on Chip Design. Michael Nydegger

Asynchronous Counters. Asynchronous Counters

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

ECE380 Digital Logic

Wiki Lab Book. This week is practice for wiki usage during the project.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Sequential Logic Design Principles.Latches and Flip-Flops

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

Digital Logic Design Sequential circuits

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

5 Combinatorial Components. 5.0 Full adder. Full subtractor

Contents COUNTER. Unit III- Counters

ECE124 Digital Circuits and Systems Page 1

Design: a mod-8 Counter

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Memory Elements. Combinational logic cannot remember

COMBINATIONAL CIRCUITS

Chapter 10 Advanced CMOS Circuits

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

Digital Electronics Detailed Outline

Binary full adder. 2-bit ripple-carry adder. CSE 370 Spring 2006 Introduction to Digital Design Lecture 12: Adders

Systems I: Computer Organization and Architecture

The string of digits in the binary number system represents the quantity

The components. E3: Digital electronics. Goals:

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

ENGI 241 Experiment 5 Basic Logic Gates

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

Lecture 5: Logical Effort

Chapter 9 Latches, Flip-Flops, and Timers

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

CSE140: Components and Design Techniques for Digital Systems. Introduction. Prof. Tajana Simunic Rosing

Digital Systems. Syllabus 8/18/2010 1

CS201: Architecture and Assembly Language


Transcription:

CSE140 Spring2013 CSE140 Homework #7 - Solution You must SHOW ALL STEPS for obtaining the solution. Reporting the correct answer, without showing the work performed at each step will result in getting 0 points for that problem. 1. Adder: You are asked to design an N-bit adder. Suppose that the only elements you can use are in library lib3 with 2-input NAND, 2-input NOR and 1-input INVERTER. Each of them has a propagation delay of 1ps, and a 1-bit full adder has 6ps maximum propagation delay. (a) Briefly explain why the delay of 1-bit full adder is 6X that of a combinational gate in the given library. Assume the XOR gate is implemented using 4 NAND gates as shown below. An XOR can be implemented by three stages of 2-input NAND gates. Therefore the total delay is roughly six times of that of a 2-input NAND gate. (b) If you are asked to design a 1-bit full adder using only 2-input NAND gates, how many gates would you like to budget in order to minimize the cost? Draw the circuit diagram to illustrate. We can implement a 1-bit full adder using 9 2-input NAND gates. The circuit diagram is as below. (c) Calculate the total delay of a16-bit ripple-carry adder based on the given library timing

specs. t RC =16*t FA =16*6ps=96ps (d) Design a 16-bit carry-lookahead adder using blocks of size k=4 and calculate its total delay. You can assume a CLA with basic 1-bit adder as below. The computation of negative generate (G ) and propagate (P) do not require additional logic. Totally there are just two XOR gates in series, which add up to 8 NAND gates. A 4-bit CLA block can be designed in the following way using gates from only lib3. Totally we need 4 INVs and 11 NANDs for one block. G 3 P 3 G 2 P 2 G 1 P 1 G 0 P 3 C in P 1 P 2 As a result, we can compute the delay as follows. t pg =2ps, t pg_block =6ps, t AND_OR =2ps, t FA =6ps t CLA =t pg +t pg_block +(16/4-1)*t AND_OR +4*t FA =1+6+3*2+4*6=37ps (e) If the operational frequency is not a major concern, but achieving minimum cost in terms of the number of transistors is, would you prefer to use a ripple-carry adder, or a carrylookahead? How much cost, in terms of number of transistors, could you save for an 16-bit adder using the lower-cost architecture? Assume each block of the carry-lookahead adder contains 4 bits. Ripple-carry adder will be the better choice as it is more cost efficient. A 16-bit ripple-carry adder, implemented using 9 NAND gates, will use 16*9*4=576 transistors. A 16-bit carry-lookahead adder, implemented as (d), will use 4 INVs and 11 NANDS or NORs in one 4-bit block, which requires 52 transistors per block thus 13 transistors per bit. The 16-bit adder will consume 16*(8*4+13) = 720 transistors. Also, if you consider the computation in each 1-bit adder, you need another NAND as shown in 1(b). So it may adds up to 16*(9*4+13)=784 transistors. P 0 2. ALU:

(a) Design an ALU with similar functionality as the one shown in table 5.1 to implement A + B, A B, NAND, NOR, AND, OR, EQUAL and NOT EQUAL using three control bits. Give a table to illustrate how you would map each function to some control pattern. Draw your ALU design with two 1-bit inputs and one 1-bit output based on the table you just generated. control function 000 A NEQ B 001 A + B 010 A AND B 011 A OR B 100 A EQ B 101 A B 110 A NOR B 111 A NAND B (b) Fabricate your single-bit ALU design into a block with clearly defined interfaces (signal inputs and outputs). Assemble a two-bit ALU at block level based on the block you just fabricated. 3. Multiplier: You are given the architecture of the NxN multiplier shown in Figure 5.18(c) on page 252 of the textbook, suppose a 2-AND gate has 2ps delay, while a full adder has 3ps delay. (a) Compute the propagation delay of the entire multiplier. 8*t FA +1*t AND =26ps

(b) How would youmodify the architecture to enable multiplication of negative numbers? Suppose that you are given a negative multiplicand and a positive multiplier in two s complement formats, briefly discuss how you should modify the architecture. Sign bit extension during each level of addition. 4. Counter design: (a) Design a 3-bit counter that counts on each clock tick only odd numbers from 1 up to 7 (1,3,5,7,1,3 ). Once it reaches 7, it sets a ripple carry out bit to 1. Otherwise ripple carry out bit is zero. It also has an enable and set inputs. When set=1, the counter value is set to 1. The counter counts only when enable = 1, otherwise it holds its current value. 0 1 (b) Fabricate your design in part (a) into a block with interface definition. Design a 6-bit odd number counter that counts 1,3,5,7,9,11,,63,1,3,5,63,1 at block level based on the block you just fabricated. 001 010 VAL CNT Q B EN SET 000 001 001 010 VAL B VAL B CNT EN CNT EN Q SET Q SET Q 1 Q 0

5. RTL design: Exercise 5.16 from page 288 of Vahid s book. Using the RTL design method shown in Table 5.1 to create an RTL design that outputs the maximum value found in a register file A consisting of 64 32-bit numbers.