CSE 260 Digital Computers: Organization and Logical Design. Midterm Solutions

Similar documents
Ring Counter. 4-bit Ring Counter using D FlipFlop. VHDL Code for 4-bit Ring Counter and Johnson Counter 1. Contents

CS/EE Homework 9 Solutions

INF3430 Clock and Synchronization

! Review: Sequential MOS Logic. " SR Latch. " D-Latch. ! Timing Hazards. ! Dynamic Logic. " Domino Logic. ! Charge Sharing Setup.

EASTERN MEDITERRANEAN UNIVERSITY COMPUTER ENGINEERING DEPARTMENT CMPE224 DIGITAL LOGIC SYSTEMS VHDL EXPERIMENT VII

Types of Control. Programmed Non-programmed. Program Counter Hardwired

Computer Architecture (TT 2012)

! Sequential Logic. ! Timing Hazards. ! Dynamic Logic. ! Add state elements (registers, latches) ! Compute. " From state elements

UNIVERSITI MALAYSIA PERLIS

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 5

Code No: R Set No. 1

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

Written exam IE1204/5 Digital Design Friday 13/

CPE/EE 427, CPE 527 VLSI Design I: Homeworks 3 & 4

DIGITAL DESIGN WITH SM CHARTS

ECE 2300 Digital Logic & Computer Organization

Adder Comparator 7 segment display Decoder for 7 segment display D flip flop Analysis of sequential circuits. Sequence detector

ENGIN 112 Intro to Electrical and Computer Engineering

CHAPTER FIVE - Flip-Flops and Related Devices

Daisy II. By: Steve Rothen EEL5666 Spring 2002

EE241 - Spring 2013 Advanced Digital Integrated Circuits. Announcements. Lecture 16: Power and Performance

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

CS152 Computer Architecture and Engineering Lecture 3: ReviewTechnology & Delay Modeling. September 3, 1997

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Geared Oscillator Project Final Design Review. Nick Edwards Richard Wright

CSE 260 Digital Computers: Organization and Logical Design. Lab 4. Jon Turner Due 3/27/2012

Mohit Arora. The Art of Hardware Architecture. Design Methods and Techniques. for Digital Circuits. Springer

Topics. FPGA Design EECE 277. Combinational Logic Blocks. From Last Time. Multiplication. Dr. William H. Robinson February 25, 2005

IES Digital Mock Test

PWM System. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

ECOM 4311 Digital System Design using VHDL. Chapter 9 Sequential Circuit Design: Practice

UC Berkeley CS61C : Machine Structures

Arria V Timing Optimization Guidelines

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

UNIT II: Clocked Synchronous Sequential Circuits. CpE 411 Advanced Logic Circuits Design 1

MODULE-4 Memory and programmable logic

High Speed Binary Counters Based on Wallace Tree Multiplier in VHDL

CSE 370 Winter Homework 5 Solutions

Classification of Digital Circuits

Design for Testability & Design for Debug

Module -18 Flip flops

ELECTROVATE. Electromania Problem Statement Discussion

5. (Adapted from 3.25)

Lab 1.1 PWM Hardware Design

UC Berkeley CS61C : Machine Structures

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

EECS150 - Digital Design Lecture 19 CMOS Implementation Technologies. Recap and Outline

Senior Capstone Project Proposal Reconfigurable FPGA Implementation Of Digital Communication System

Timing analysis can be done right after synthesis. But it can only be accurately done when layout is available

ENGG1015: lab 3. Sequential Logic

Brought to you by. Priti Srinivas Sajja. PS01CMCA02 Course Content. Tutorial Practice Material. Acknowldgement References. Website pritisajja.

logic system Outputs The addition of feedback means that the state of the circuit may change with time; it is sequential. logic system Outputs

On Built-In Self-Test for Adders

UC Berkeley CS61C : Machine Structures

DELD MODEL ANSWER DEC 2018

CMOS Digital Integrated Circuits Analysis and Design

Digital Circuits II Lecture 6. Lab Demonstration 3 Using Altera Quartus II to Determine Simplified Equations & Entering Truth Table into VHDL

Figure.1. Schematic of 4-bit CLA JCHPS Special Issue 9: June Page 101

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

bus waveforms transport delta and simulation

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 7/11/2011

Computer Architecture Laboratory

PE713 FPGA Based System Design

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

LOGIC GATES AND LOGIC CIRCUITS A logic gate is an elementary building block of a Digital Circuit. Most logic gates have two inputs and one output.

Gates and Circuits 1

A-PDF Split DEMO : Purchase from to remove the watermark 114 FSM

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

CHAPTER 6 PHASE LOCKED LOOP ARCHITECTURE FOR ADC

Midterm Exam ECE 448 Spring Thursday Section. (15 points)

Java Bread Board Introductory Digital Electronics Exercise 2, Page 1

We ve looked at timing issues in combinational logic Let s now examine timing issues we must deal with in sequential circuits

Digital Design and System Implementation. Overview of Physical Implementations

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Digital Logic

DESIGN OF MULTIPLYING DELAY LOCKED LOOP FOR DIFFERENT MULTIPLYING FACTORS


a b y UC Berkeley CS61C : Machine Structures Hello Helo,world!

E2 Framing / Deframing according ITU-T G.703 / G.742 : VHDL-Modules

Game Console Design. Final Presentation. Daniel Laws Comp 499 Capstone Project Dec. 11, 2009

ECE520 VLSI Design. Lecture 11: Combinational Static Logic. Prof. Payman Zarkesh-Ha

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

! Is it feasible? ! How do we decompose the problem? ! Vdd. ! Topology. " Gate choice, logical optimization. " Fanin, fanout, Serial vs.

Digital Electronics Course Objectives

Logic 0 Logic To provide an output load (or two) 5 Voltage Measurement Point V CC +5 74LS00 GND

NODIA AND COMPANY. Model Test Paper - I GATE Digital Electronics. Copyright By Publishers

Lecture 19: Design for Skew

EC4205 Microprocessor and Microcontroller

Exercises: Fundamentals of Computer Engineering 1 PAGE: 1

DIGITAL ELECTRONICS. Methods & diagrams : 1 Graph plotting : - Tables & analysis : - Questions & discussion : 6 Performance : 3

Preface to Third Edition Deep Submicron Digital IC Design p. 1 Introduction p. 1 Brief History of IC Industry p. 3 Review of Digital Logic Gate

Coincidence Rates. QuarkNet. summer workshop June 24-28, 2013

ECE 261 CMOS VLSI Design Methodologies. Final Project Report. Vending Machine. Dec 13, 2007

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

Exercise 1: AND/NAND Logic Functions

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #1 Oct 18, 2006

Midterm Exam ECE 448 Spring 2013 Thursday Section (15 points)

CHAPTER 5 DESIGN OF COMBINATIONAL LOGIC CIRCUITS IN QCA

Project Board Game Counter: Digital

Transcription:

CSE 260 Digital Computers: Organization and Logical Design Midterm Solutions Jon Turner 2/28/2008 1. (10 points). The figure below shows a simulation of the washu-1 processor, with some items blanked out. Fill in the blanks below with the correct value from the corresponding labeled blank in the simulation output. The instruction set appears at the bottom of the page. A. 700C B. 7 C. 00BB D. 0008 E. 0011 0000 halt 0001 negate 1xxx immediate load 2xxx direct load 3xxx indirect load 4xxx direct store 5xxx indirect store 6xxx 7xxx 8xxx 9xxx axxx dxxx branch branch if zero branch if positive branch if negative add and - 1 -

2. (8 points) Draw a transistor-level diagram (using n-fets and p-fets) of a NAND gate with 3 inputs, A, B and C. Suppose all three inputs are high initially and then A goes low, causing the output of the NAND gate to go from low to high. Let t LH be the time for this high to low transition. Now, suppose that input A goes high again, causing the output to go from high to low. Let t HL be the time for this low to high transition. Which is larger, t LH or t HL? Explain why. t HL is larger because for a high to low transition, charge must flow through three on pull-downs in series. For the low to high transition, charge must flow through just one pull-up. The lower resistance of the single pull-up allows for a faster transition. How much larger? Assume that the on-resistance of an n-fet is the same as the onresistance of a p-fet. About three times larger. - 2 -

3. (6 points) The circuit shown below is a 4 bit adder, implemented using LUT4s. The outputs (S 3..S 0) = (A 3..A 0) + (B 3..B 0). What are the logic equations implemented by the LUTs for signals S 2 and C 3 (these LUTs are highlighted with a bold outline)? What is the worst-case propagation delay of this circuit, if each LUT has a delay of 1 ns. The logic equations are and. The worst-case propagation delay is 3 ns. - 3 -

4. (15 points) The diagram at right shows a combinational circuit with four bit inputs A and B plus a four bit output X. It also has a one bit input, Z in and a one bit output Z out. How many LUT4s are needed to implement this circuit? If we use one LUT each to generate Z 1, Z 2, Z 3, we can implement the 5 outputs with one additional LUT each for a total of 8 LUTs. We actually don t need to generate Z 1, since both X 1 and Z 2 can each be generated with a single LUT without using Z 1 (since they are functions of just Z in, B 0, A 1 and B 1). We also don t need to generate Z 3, since Z 4 and X 3 can be generated with one LUT each from signals B 2, Z 2, A 3 and B 3. So, 6 is enough. Complete the VHDL module shown below so that it implements the circuit shown. entity foo is port ( A,B : in std_logic_vector(3 downto 0); X: out std_logic_vector(3 downto 0); Zin: in std_logic; Zout: out std_logic ); end foo; architecture a1 of foo is signal Z: std_logic_vector(4 downto 0); begin process(a,b,z,zin) begin Z(0) = Zin; for i = 0 to 3 loop if Z(i) = 1 then X(i) <= A(i) or B(i); else X(i) <= A(i) and B(i); Z(i+1) <= Z(i) xor B(i); Zout <= Z(4); end process; end a1; - 4 -

5. (20 points) Complete the diagram shown below to show the circuit implemented by the following VHDL specification. entity foo is port( clk: in std_logic; A, B: in std_logic_vector(7 downto 0); X, Y: out std_logic_vector(7 downto 0); end entity; architecture bar of foo is type statetype is (tennis, pingpong, archery) signal state: statetype; signal Z: std_logic_vector(7 downto 0); begin process (clk,a,z) begin if rising_edge(clk) then Z <= B; case state is when tennis => if A > B then X <= B; state <= archery; when pingpong => if B > Z then Z <= A xor B; state <= tennis; when others => X <= A; state <= pingpong; end case; end if Y <= A + Z; end process; end bar; - 5 -

6. (20 points). A pulse pair detector is a circuit with a single input D and an output X, which detects closely spaced pairs of pulses. A pulse is a 0, followed by one or more 1s, followed by a 0. A pair of pulses forms a pulse pair if the second pulse ends within 5 clock ticks after the first one ends. The output X should go high for one clock tick at the end of every pulse pair. If a pulse is counted as part of one pulse pair, it is not also be counted as part of a subsequent pulse pair. That is, the circuit does not count overlapping pairs of pulses as separate pulse pairs. So, if the input is 0110 0101 0111 0, the output is 0000 0010 0000 1. The state diagram shown below is for a state machine that implements a pulse pair detector. It uses a 3 bit counter, t. Complete the state diagram by filling in all the missing transitions and labeling all the transitions with appropriate conditions and actions. - 6 -

7. (15 points) The state diagram shown below is for a sequential circuit that counts the number periods where input A is less than or equal to input B for one or more time steps in a row (lerun), and the number of periods when A>B for at least two time steps in a row (gtrun). A and B are four bits each and there is an eight bit output X equal to lerun gtrun. The circuit also has a reset signal which has been omitted from the diagram. When reset is high, the circuit should go to the start state and lerun and gtrun should both be set to 0. Complete the VHDL module outlined on the next page so that it implements the sequential circuit specified by the state diagram. Include code for the reset and output X. - 7 -

entity countruns is port ( clk, reset: in std_logic; A,B: in std_logic_vector(3 downto 0); X: out std_logic_vector(7 downto 0)); end countruns; architecture a1 of ballgame is type state_type is (start, le, gt, gt2); signal state: state_type; signal lerun, gtrun: std_logic_vector(7 downto 0); begin process ( clk ) begin if rising_edge(clk) then if reset = '1' then state <= start; lerun <= x 00 ; gtrun <= x 00 ; else case state is when start => if A <= B then state <= le; lerun <= :erun + 1; else state <= gt; when le => if A > B then state <= gt; endif; when gt => if A > B then state <= gt2; gtrun <= gtrun + 1; else state <= le; lerun <= lerun + 1; endif; when gt2 => if A <= B then state <= le; lerun <= lerun + 1; endif; when others => end case; end process; X <= lerun - gtrun; end a1; - 8 -

8. (8 points) For the state machine shown below, assume that the flip flop setup time is 2 ns, the hold time is 0.5 ns and the flip flop propagation delay is between 1 and 3 ns. Also, that the clock skew is 0.3 ns. Is this circuit subject to internal hold time violations? Justify your answer. There are no hold time violations because the minimum flip flop propagation delay is larger than the hold time plus the skew. What is the smallest clock period for which the circuit is not subject to setup time violations? Be sure to take into account any modifications from the previous step. The maximum delay for the next state logic is 5 ns. This gives a minimum clock period of 3+5+2+0.3=10.3 ns. What is the latest time relative to the clock, when it is safe for input B to change? Input B has a maximum delay path of 5 ns, so it must be stable by 3+2=5 ns before the clock rises. What is the latest time after the clock when output X can be changing? 3+4=7 ns. - 9 -