MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Similar documents
L11: Major/Minor FSMs

L5: Simple Sequential Circuits and Verilog

Writing Circuit Descriptions 8

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

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

L5: Simple Sequential Circuits and Verilog

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

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis

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

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

L5: Simple Sequential Circuits and Verilog

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

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

Digital Design with FPGAs. By Neeraj Kulkarni

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

MCMASTER UNIVERSITY EMBEDDED SYSTEMS

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

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

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

In this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified.

Code No: R Set No. 1

Debouncing a Switch. A Design Example. Page 1

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

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

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

L5: Simple Sequential Circuits and Verilog

a, b sum module add32 sum vector bus sum[31:0] sum[0] sum[31]. sum[7:0] sum sum overflow module add32_carry assign

Hours / 100 Marks Seat No.

CS429: Computer Organization and Architecture

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

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

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

Homework deadline extended to next friday

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Introduction to Verilog/System Verilog

Why Should I Learn This Language? VLSI HDL. Verilog-2

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

Techniques for Digital Systems Lab. Verilog HDL. Tajana Simunic Rosing. Source: Eric Crabill, Xilinx

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Digital Integrated Circuits

CMPE 415 Verilog Case-Statement Based State Machines I

Code No: R Set No. 1

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

Spring 2013 EE201L Instructor: Gandhi Puvvada. Time: 7:30-10:20AM SGM124 Total points: Perfect score: Open-Book Open-Notes Exam

Chap 6 Introduction to HDL (d)

EECS150 - Digital Design Lecture 10 Logic Synthesis

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

EECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007

VERILOG: FLIP-FLOPS AND REGISTERS

Verilog Behavioral Modeling

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Parallel versus serial execution

Chapter 6 (Lect 3) Counters Continued. Unused States Ring counter. Implementing with Registers Implementing with Counter and Decoder

ARM 64-bit Register File

Figure 1: Verilog used to generate divider

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

Combinational Circuit Design

Sequential Logic Design

Sequential Circuit Design: Principle

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

CSE 502: Computer Architecture

Chapter 5 Registers & Counters

Verilog introduction. Embedded and Ambient Systems Lab

Levels in Processor Design

EEL 4783: HDL in Digital System Design

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

CSE140L: Components and Design Techniques for Digital Systems Lab

Verilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering

Lab 7 (All Sections) Prelab: Introduction to Verilog

ESE 150 Lab 07: Digital Logic

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

2015 Paper E2.1: Digital Electronics II

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

Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog

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

CSE140L: Components and Design

Verilog for Synthesis Ing. Pullini Antonio

ECE 341 Midterm Exam

Sequential Logic Blocks

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal

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

Finite-State Machine (FSM) Design

Course Topics - Outline

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

L10: Major/Minor FSMs, Lab 3, and RAM/ROM Instantiation

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

Amrita Vishwa Vidyapeetham. EC429 VLSI System Design Answer Key

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

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

Design Using Verilog

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Verilog Coding Guideline

Code No: R Set No. 1

Continuing with whatever we saw in the previous lectures, we are going to discuss or continue to discuss the hardwired logic design.

Modeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras

Sequential Logic Implementation. Mealy vs. Moore Machines. Specifying Outputs for a Mealy Machine. Specifying Outputs for a Moore Machine

Sequential Circuit Design: Principle

FSM Design Problem (10 points)

CSE140L: Components and Design Techniques for Digital Systems Lab. Verilog HDL. Instructor: Mohsen Imani UC San Diego. Source: Eric Crabill, Xilinx

Transcription:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) uiz - Spring 2004 Prof. Anantha Chandrakasan Student Name: Problem 1 (16 Points): Problem 2 (24 Points): Problem 3 (24 Points): Problem 4 (16 Points): Problem 5 (20 Points): Total (100 Points): 1 of 10

Problem 1: Sequential Building Block Characterization: Consider the following implementation of a register. Assume that an inverter has a delay of 1 and that the switch is ideal. The switch is closed when the control input is high. K K D K K Master (inverting) Latch Slave (inverting) Latch (a) What type of register is shown above (circle one)?(4 points) positive edge-triggered negative edge-triggered (b) What is the setup time (t su ), hold time (t hold ), and propagation (t cq ) delay. Assume that K and K are ideal (i.e., the delay to derive K from K is zero). (12 points) 2 of 10

Problem 2: Clock Gating Circuit Assume for the entire problem that the counter reset is synchronous. (a) Consider the one second clock from lab2. The 1Hz enable is derived from the circuit below (the clock is the 1.8432Mhz clock). Assume that a global reset signal puts the count to 0 (the circuit is not shown here). Suppose the 1Hz enable is used to clock other circuits that need to be updated once per second (e.g., the register shown below). Identify the main problem with this circuit. (4 points) register 1Hz Enable In D Out reset Counter Count[20:0] 21 Combinational Logic (comparator) = K 21 d1843199 (b) The following is a simple modification that is proposed to solve the problem of part (a). The counter is negative edge-triggered and the AND gate is introduced before the register clock. Assume that the AND gate is ideal (i.e., has zero delay). Does this circuit fix the problem of part (a)? If so, under what conditions does this circuit function properly? If not, explain why. (6 points) register 1Hz Enable In D Out reset Counter Count [20:0] 21 Combinational Logic (comparator) = K K 21 d1843199 3 of 10

(c) The solution of (b) is not a synchronous one (i.e., a single global clock to every register). Propose a fix to the problem in part (a) using a single clock (K). That is, both the counter and register are clocked from the same clock (K). The signal In should be loaded into the register once per second. You may add additional components in the diagram below. (6 points) reset 1Hz Enable register Counter Count [20:0] 21 Combinational Logic (comparator) = In D K Out K 21 d1843199 (d) For each of the following signals, specify if glitches are allowed. (circle one) (8 points) (i) Data lines to the M6264 when Glitches Not Allowed Glitches are Allowed writing (when W is low, G is high, chip is enabled) as long as it settles well before W goes high (ii) Address lines to the M6264 when Glitches Not Allowed Glitches are Allowed reading (when W is high, G is low, chip is enabled) as long as it settles well before the output data is required (iii) R/W for the AD670 (ADC) Glitches Not Allowed Glitches are Allowed when CE and CS are low (iv) Data inputs for the AD558 (DAC) Glitches Not Allowed Glitches are Allowed when CE and CS are low 4 of 10

Problem 3: Arithmetic (a) Consider the following 16-bit Carry Bypass Adder. Assume that the Sum Logic () block for stage i has as inputs P i, G i, and C in,i. Assume the following delays: Delay to produce the P i, G i signals from the A i, B i inputs is 1 (i.e., the delay of the logic block) Delay to compute C out_i from P i, G i and C in,i inputs is 1 (i.e., the delay of the Carry Logic () block) Delay to compute S i from C in,i, P i, G i being valid is 2 (i.e., the delay of the Sum Logic () block) Delay for the 2:1 multiplexor is 2 Delay to compute the group propagate, GP i, is 1 Highlight the critical path for this 16-bit adder directly on figure below (6 points) A 0 B 0 A 1 B 1 A 2 B 2 A 3 B 3 GP 0 = P 0 P 1 P 2 P 3 A 4 B 4 A 5 B 5 A 6 B 6 A 7 B 7 GP 1 = P 4 P 5 P 6 P 7 A 8 B 8 A 9 B 9 A 10 B 10 A 11 B 11 GP 2 = P 8 P 9 P 10 P 11 A 12 B 12 A 13 B 13 A 14 B 14 A 15 B 15 C in,0 0 1 0 1 0 1 C out,15 S 0 S 1 S 2 S 3 S 4 S 5 S 6 S 7 S 8 S 9 S 10 S 11 S 12 S 13 S 14 S 15 (b) Based on the structure in (a), assuming a block size equal to 4, write down an equation for the delay of an N input adder, where N is a multiple of 4. (6 points) 5 of 10

(c) Consider a 64-tap filter implemented using an accumulator architecture as shown below. How many bits will be required for the adder? (6 points)? reset_accumulator In (twos complement) 8-bits Coefficient (twos complement) 8-bits Twos Complement Multiplier 16-bits Twos complement, sign exted to match the adder width +? D K (d) There is an error in the following implementation of the carry out logic. Identify the error and propose a simple solution (it might involve changing the logic). (6 points) A B A B C in 0 1 C out 6 of 10

Problem 4: FA (a) Consider an FA architecture with three identical 4-input SRAM based lookup tables. For this problem do not worry about the circuits to perform the write operation into the SRAM. Each SRAM is shown to have 4 inputs (i.e., address bits) and one output bit. Draw the circuit diagram for using the three SRAMs shown below to implement an arbitrary function Y of 5-input variables in 4, in 3, in 2, in 1, in 0? Do not add any additional components. (8 points) in 4 SRAM1 in 3 in 2 in 1 in 0 A 3 A 2 A 1 A 0 SRAM3 Y SRAM2 7 of 10

(b)what is the function implemented by SRAM3 corresponding to your solution in part 4(a)? Explain. (8 points) 8 of 10

PROBLEM 5: Verilog (a) Consider the follow piece of code to implement a synchronizer (with two registers). Does the code implement the required functionality? (explain). If the code does not properly implement a synchronizer, modify the code as necessary. (6 points) input in; reg q1, q2; always @ (posedge clk) begin q1 = in; q2 = q1; (b) The following Verilog code should synthesize to a purely combinational logic function (3:1 multiplexor, where we don t care about the case when sel = 11). Does it? If not, fix the code so that there are no memory elements. (6 points) module mux_3to1 (a, b,c, sel, out); input [1:0] sel; input a,b, c; output out; reg out; always @ (a or b or c or sel) begin case (sel) 2 b00: out = a; 2 b01: out = b; 2 b10: out = c; case module 9 of 10

(c) A simple digital system consists of a four state FSM which increments a 4-bit synchronous counter when the FSM is in state 10. An asynchronous reset signal is used to force both the state machine and the counter to all zeros whenever it is high. Identify the major problem with this code when synthesized and propose a fix (i.e., make the necessary modifications to the code below. You may add a control signal). (8 points) module simple_fsm(clk, reset, count); input reset, clk; output [3:0] count; reg [3:0] count; reg [1:0] state; reg [1:0] next; always @ (posedge clk or posedge reset) begin if (reset) begin state <= 2'b00; else begin state <= next; always @ (state or reset) begin if (reset) count = 4'b0000; case (state) 2'b00: next = 2'b01; 2'b01: next = 2'b10; 2'b10: begin next = 2'b11; count = count +1; 2'b11: next = 2'b00; case //always module 10 of 10