problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

Similar documents
University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

EECS 151/251A: SRPING 2017 MIDTERM 1

CS429: Computer Organization and Architecture

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

Laboratory Exercise 3

Lecture 12 VHDL Synthesis

ECE 341 Midterm Exam

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

ECE 341 Midterm Exam

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

FPGA Matrix Multiplier

EECS150 - Digital Design Lecture 10 Logic Synthesis

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

EECS 270 Midterm Exam

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

Homework deadline extended to next friday

EECS 151/251A Spring 2019 Digital Design and Integrated Circuits. Instructor: John Wawrzynek. Lecture 18 EE141

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Topics of this Slideset. CS429: Computer Organization and Architecture. Digital Signals. Truth Tables. Logic Design

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

ECE 485/585 Microprocessor System Design

EECS150 - Digital Design Lecture 16 - Memory

CSE140L: Components and Design

EECS150 - Digital Design Lecture 10 Logic Synthesis

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

EECS150 - Digital Design Lecture 16 Memory 1

Topic #6. Processor Design

CSE140L: Components and Design Techniques for Digital Systems Lab

Spiral 1 / Unit 6. Flip-flops and Registers

Note: Closed book no notes or other material allowed, no calculators or other electronic devices.

MIDTERM EXAM March 28, 2018

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AN:p ENGINEERING. ECE241F - Digital Syst~ms Final Examination

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

C A R L E T O N U N I V E R S I T Y. FINAL EXAMINATION April Duration: 3 Hours No. of Students: 108

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

VHDL: RTL Synthesis Basics. 1 of 59

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam

University of California, Berkeley College of Engineering Department of Electrical Engineering and Computer Science

Sign here to give permission for your test to be returned in class, where others might see your score:

Problem Set # 6 (Assigned 27 February, Due 9 March)

Many ways to build logic out of MOSFETs

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

CDA 4253 FPGA System Design Op7miza7on Techniques. Hao Zheng Comp S ci & Eng Univ of South Florida

FPGA for Complex System Implementation. National Chiao Tung University Chun-Jen Tsai 04/14/2011

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

DESIGN PROJECT TOY RPN CALCULATOR

Announcements. Midterm 2 next Thursday, 6-7:30pm, 277 Cory Review session on Tuesday, 6-7:30pm, 277 Cory Homework 8 due next Tuesday Labs: project

TSEA44 - Design for FPGAs

Review: Timing. EECS Components and Design Techniques for Digital Systems. Lec 13 Storage: Regs, SRAM, ROM. Outline.

First Name: Last Name: PID: CSE 140L Exam. Prof. Tajana Simunic Rosing. Winter 2010

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

Lecture 24: Sequential Logic Design. Let s refresh our memory.

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

UC Berkeley College of Engineering, EECS Department CS61C: Combinational Logic Blocks

EECS150 - Digital Design Lecture 17 Memory 2

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

Digital Design with FPGAs. By Neeraj Kulkarni

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

EE 109L Review. Name: Solutions

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

EECS150 - Digital Design Lecture 6 - Field Programmable Gate Arrays (FPGAs)

Topics. Midterm Finish Chapter 7

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

One and a half hours. Section A is COMPULSORY

McGill University Faculty of Engineering FINAL EXAMINATION Fall 2007 (DEC 2007)

Levels in Processor Design

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

ECE 341 Midterm Exam

Scheme G. Sample Test Paper-I

Outline. EECS150 - Digital Design Lecture 6 - Field Programmable Gate Arrays (FPGAs) FPGA Overview. Why FPGAs?

L2: Design Representations

EE 457 Midterm Summer 14 Redekopp Name: Closed Book / 105 minutes No CALCULATORS Score: / 100

CS 151 Midterm. Instructions: Student ID. (Last Name) (First Name) Signature

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

University of California at Berkeley. D. Patterson & R. Yung. Midterm I

Luleå University of Technology Kurskod SMD152 Datum Skrivtid

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

EECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 1 February 17, 2011

Synthesizable Verilog

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science. EECS150, Spring 2010

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

ECE260: Fundamentals of Computer Engineering

Review. EECS Components and Design Techniques for Digital Systems. Lec 03 Field Programmable Gate Arrays

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

Two hours - online EXAM PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Computer Architecture (TT 2012)

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

EECS150 - Digital Design Lecture 23 - High-Level Design (Part 1)

Transcription:

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2010 3/31/09 Name: ID number: Midterm Exam This is a closed-book, closed-note exam. No calculators or any other electronic devices, please. Read all the questions before you begin. Each question is marked with its number of points (one point per expected minute of time). Although you might not need it, you have until 9pm. You can tear off the spare pages at the end of the booklet and/or use the backs of the pages to work out your answers. Neatly copy your answer to the places allocated for them. Neatness counts. We will deduct points if we need to work hard to understand your answer. Simplicity also counts. In the design problems, correct simpler designs with fewer components will be awarded a higher score than more complex designs with more components. Put your name and SID on each page. problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts 1

1. Multiplexor Implementation [8pts]. Consider the design of a 4-to-1 multiplexor circuit with four data inputs, d0, d1, d2, and d3, two control inputs, s0 and s1, and a single output, y. Using only simple logic gates (ANDs, ORs, NANDs, NORs, inverters), but no transmission gates, sketch the circuit diagram for a multiplexor circuit optimized for minimum delay from the data inputs, d0 d3, to the output, y. You may use gates with any number of inputs, but remember that the delay through a logic gate grows with the square of the number of inputs. 2

2. Combinational Logic Circuits [6pts]. Using whatever means possible, prove or disprove that the two combinational logic circuit shown below have equivalent function. Explain your approach and show your work. b c a Circuit #1 c c a b Circuit #2 3

3. FPGA Mapping [10pts]. Using only 3-input lookup tables (LUTs), partition the circuit shown below into as few LUTs as possible. Do not attempt to simplify the gate-level circuit before mapping it to LUTs. Indicate your answer by filling in the table. Fill in one row for each LUT, assigning node names from the circuit to LUT inputs and outputs. Mark unused LUT inputs with X (for unused). a b c d e k f g l n p h i o m j LUT # input 1 input 2 input 3 output 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4

4. Register Transfers [15pts]. Consider the datapath shown below. A controller (not shown), is used to control operation of the datapath. It sets the value of all the control signals (circled in the datapath diagram). The block labeled Register File stores four data registers, R0 R3, has two asychronous read ports, and two synchronous write ports. The four port addresses are IAa, IAb, OAa, and OAb. Writing to the register file is controlled by the WEa and WEb signals. The data registers at the output of the adders, RA and RB, have synchronous reset inputs, rsta and rstb, respectively. WEa Register File + RA Ia Oa IAa R0 R1 OAa rsta R2 IAb R3 OAb rstb Ib Ob WEb + RB (a) Assume that the register file is initialized with registers R0 R3 holding the values a, b, c, and d, respectively. Registers RA and RB begin uninitialized. Your task is to generate the control signal sequence which will result in a in R0, a+b in R1, a + b + c in R2, and a + b + c + d in R3, and do so in the minimum number of clock cycles. Indicate your answer by filling in the table with the control signal values that the controller would generate on each clock cycle (for use on the next positive clock edge). cycle # IAa IAb OAa OAb WEa WEb rsta rstb 1 2 3 4 5 6 7 8 5

(b) Now assume that the Register File has a read access delay of 2ns, a write setup time of 1ns, and a write delay of 1ns, i.e., the written data appears in the proper register 1ns after the clock edge. There is no register file bypassing. The adders have a combinational logic delay of 4ns, and the output registers have a setup time, 1ns and clock-to-q delay of 1ns, and a hold time of 1ns. Ignore wire delay and clock skew. What is maximum clock frequency for this circuit? 6

5. Verilog and Finite State Machines [12pts]. For the state transision diagram shown below: (a) Complete the Verilog description, following the CS150 style rules. in = 0 0 0 S0 [0] 1 S1 [0] 0 S2 [1] 1 S3 [1] rst 1 1 module FSM(clk, rst, in, out); input clk, rst; input in; output out; endmodule 7

(b) Complete the waveform for out corresponding the input signals shown below: clk in rst out 8

6. Transistor Circuits [10pts]. Draw a transistor level circuit diagram for the function depicted in the gate level circuit below. Minimize the total number of transistors. No pass-transistor logic, use only static cmos circuits. a b c d 9

7. Stack Machine Design [24pts]. A stack machine is a type of CPU that uses a hardware stack instead of a register file. All instructions take their operands from the stack and leave their result on the top of the stack. Remember, a stack is a LIFO (last in first out data structure) and typically supports push and pop operations. In this problem you will design the datapath and specify the control for the following subset of a stack machine instruction set: Instruction add sub dup swap load store const Description Pops two elements, forms their sum, and pushes the result. Pops two elements, subtracts the first popped from the second, and pushes the result. Duplicates the top of the stack. Exchanges the first two elements on the stack. Loads a word from data memory using the top of the stack as the memory address (address is popped, the data from memory is pushed). Stores the top of the stack in data memory using the next element on the stack as the address (both are popped). Pushes a sign-extended immediate value from the instruction. Shown below are a few blocks that you will need for your datapath. The data memory block has asynchronous read and synchronous write. The stack block has a data input and data output, along with two control signals, push (PUSH), and enable (EN). The top of the stack is always available on the data output signal Dout, i.e., it is always possible to peak at the top of the stack. On the positive edge of the clock, if PUSH=1 and EN=1 then the value on the data input is pushed onto the stack; if PUSH=0 and EN=1 then the top of the stack is popped; if EN=0, then the stack is not changed. (a) In the space provided below add wires and any other blocks that you need for the above instructions. Be neat, and avoid crossing wires when possible. Circle your control signals. You will assign control signal values in part (b), coming up. Your top priority is to minimize the number of cycles per instruction, followed by making the datapath as simple as possible. You may ignore instruction fetch for this problem. Note, two versions of the partial datapath diagram are included. The first one is a working/practice version. Once you are confident in your answer, copy it to the second diagram below. We will only grade the second version. 10

Practice Version (will not be graded) PUSH Din Stack EN Dout A sel ALU add: sel = 00 sub: sel = 01 pass A: sel = 10 pass B: sel = 11 B A Din DMem WE Dout Final Version for Grading PUSH Din Stack EN Dout A sel ALU add: sel = 00 sub: sel = 01 pass A: sel = 10 pass B: sel = 11 B A Din DMem WE Dout 11

(b) Label the table columns with your control signal names. Fill in the table with the control signal values for each instruction. Use X to indicate don t care. Note that some instructions may take more than one cycle. In those cases, use one row for each cycle of the instruction. add sub dup swap load store const 12

(c) Most stack machines also include a rotate instruction: Instruction rot Description Rotate the top 3 elements; the third element moves to the top and the top two elements move down one. Is it possible to execute a rotate instruction on your machine without modifying the datapath? If so, how many cycles will it take? 13

8. Flip-flop Implementation [16pts]. Consider the circuit shown below. Its function is a level-sensitive high transparent latch transparent when the clock level is high. d clk q If possible, modify the circuit to achieve the following functions by adding bubbles (inversions) and extra gate inputs (no extra gates or transistors are allowed). If the desired function is not possible, indicate it by writing not possible. (a) Clock enable (CE) input. d clk q (b) Asynchronous Reset (clear) sets the latch value to 0 independently of the clock. d clk q (c) Synchronous Reset (reset) set the latch value to 0 if the clock is high. d clk q 14

(d) Negative Edge-triggered Flip-Flop. For this part you may add another copy of the latch, if needed. d clk q 15

9. Short Answers [19pts]. (a) [1pt] List the primary reason why FPGAs have lower performance than ASICs. (b) [4pt] Over the years, the size of LUTs have been increased by the FPGA manufacturers (from 3-LUTs to, now, 6-LUTs). List two reasons why larger LUTs are a good idea: List two reasons why smaller LUTs are a good idea: (c) [3pt] Assume a product development based on an FPGA has a NRE cost of $1M and a per unit FPGA cost of $100. An ASIC version of the product has an NRE cost $10M and a per unit cost of $10. Your company plans to ship 10,000 units of the final product. Would you choose FPGA or ASIC, and why? (d) [2pt] List two reasons why you might choose to use Block RAM (BRAM) over distributed RAM (LUT-RAM) in an FPGA based design. (e) [1pt] List one reason why you might choose to use LUT-RAM over BRAM in an FPGA based design. (f) [4pt] Suppose you are given a 256 X 8 simple-dual-ported memory block. How many such memory blocks would it take to implement a 512 X 16 memory with two read ports and two write ports? (g) [3pt] Consider a video system with a 1K by 1K image, 100 frames/second, and 3 Bytes per pixel. We would like to send a video stream over Ethernet and have available 10Mbps, 100Mbps, and 1000Mbps connections. Which of these connections would provide sufficient bandwidth? (h) [1pt] Put your name and SID on each page. 16

Spare page. Will not be graded. 17

Spare page. Will not be graded. 18

Spare page. Will not be graded. 19

Spare page. Will not be graded. 20

Spare page. Will not be graded. 21