MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

Similar documents
Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Flip-flop and Registers

Eng. Mohammed Samara. Fall The Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department

CS3350B Computer Architecture Winter 2015

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

1. Convert the decimal number to binary, octal, and hexadecimal.

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Synchronous Sequential Design

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

ECE 263 Digital Systems, Fall 2015

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

ACS College of Engineering. Department of Biomedical Engineering. HDL pre lab questions ( ) Cycle-1

Laboratory Exercise 7

L14: Quiz Information and Final Project Kickoff. L14: Spring 2004 Introductory Digital Systems Laboratory

ECE 3401 Lecture 11. Sequential Circuits

CS61C : Machine Structures

Clarke and Inverse ClarkeTransformations Hardware Implementation. User Guide

CS/EE Homework 6

Digital Systems Laboratory 1 IE5 / WS 2001

Microprocessor Design

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

WINTER 15 EXAMINATION Model Answer

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

Lab 3: VGA Bouncing Ball I

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

FPGA Hardware Resource Specific Optimal Design for FIR Filters

Lecture 6: Simple and Complex Programmable Logic Devices. EE 3610 Digital Systems

Digital Electronics II 2016 Imperial College London Page 1 of 8

Midterm Exam 15 points total. March 28, 2011

Why FPGAs? FPGA Overview. Why FPGAs?

Universal Asynchronous Receiver- Transmitter (UART)

Laboratory Exercise 7

CS61C : Machine Structures

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Reconfigurable FPGA Implementation of FIR Filter using Modified DA Method

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

More Digital Circuits

Registers and Counters

FPGA Implementation of Sequential Logic

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

CHAPTER 4 RESULTS & DISCUSSION

Serial FIR Filter. A Brief Study in DSP. ECE448 Spring 2011 Tuesday Section 15 points 3/8/2011 GEORGE MASON UNIVERSITY.

Bachelor of Technology (Electronics and Instrumentation Engg.)

DIGITAL ELECTRONICS MCQs

Logic Design Viva Question Bank Compiled By Channveer Patil

Design Problem 4 Solutions

Chapter 3 Unit Combinational

Decade Counters Mod-5 counter: Decade Counter:

ECE 3401 Lecture 12. Sequential Circuits (II)

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

1. True/False Questions (10 x 1p each = 10p) (a) I forgot to write down my name and student ID number.

VLSI DESIGN LAB (EE-330-F) VI SEMESTER. Electrical and Electronics Engineering

DIGITAL SYSTEM DESIGN VHDL Coding for FPGAs Unit 7

Digital Fundamentals: A Systems Approach

FPGA TechNote: Asynchronous signals and Metastability

EECS 270 Midterm Exam Spring 2011

Outline. CPE/EE 422/522 Advanced Logic Design L04. Review: 8421 BCD to Excess3 BCD Code Converter. Review: Mealy Sequential Networks

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

UC Berkeley CS61C : Machine Structures

Feedback Sequential Circuits

ENGG 1203 Tutorial. D Flip Flop. D Flip Flop. Q changes when CLK is in Rising edge PGT NGT

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

Figure 1 Block diagram of a 4-bit binary counter

ECE337 Lab 4 Introduction to State Machines in VHDL

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

Logic Design II (17.342) Spring Lecture Outline

ASYNCHRONOUS COUNTER CIRCUITS

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

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Counter dan Register

Lab 6: Video Game PONG

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

CprE 281: Digital Logic

Chapter 3. Boolean Algebra and Digital Logic

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

EECS 270 Midterm 1 Exam Closed book portion Winter 2017

COMP12111: Fundamentals of Computer Engineering

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Computer Organization & Architecture Lecture #5

Chapter 8 Registers & Counters

Registers and Counters

STATIC RANDOM-ACCESS MEMORY

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Advanced Digital Logic Design EECS 303

Administrative issues. Sequential logic

Introduction. Serial In - Serial Out Shift Registers (SISO)

CAD for VLSI Design - I Lecture 38. V. Kamakoti and Shankar Balachandran

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

Lecture 8: Sequential Logic

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

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

Transcription:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) Quiz #2 - Spring 2003 Prof. Anantha Chandrakasan and Prof. Don Troxel Student Name: Problem 1 (24 Points): Problem 2 (30 Points): Problem 3 (18 Points): Problem 4 (28 Points): Total (100 Points): 1 of 12

Problem 1: FPGA (a) Consider an FPGA 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 A 4 A 3 A 2 A 1 A 0? Do not add any additional components. (8 points) SRAM1 in 3 in 2 in 1 in 0 SRAM3 Y SRAM2 2 of 12

(b)fill in the table below for SRAM3 corresponding to the implementation in part (a). What is the function implemented by SRAM3? Explain. (8 points) in 3 in 2 in 1 in 0 Y 3 of 12

(c) Consider the following CLB (Configurable Logic Block) of the Virtex-II FPGA (as shown in lecture). This CLB is configured (bold lines indicate the signal paths chosen) to implement a full adder. What is the function implemented in the 4-input lookup table (LUT)? What are the functions OUT1 and OUT2? (8 points) LUT of 4 inputs OUT1 A B OUT2 Cin 4 of 12

Problem 2: Finite State Machine Design for a Successive Approximation ADC The block diagram below shows a 4-bit A/D converter using the successive approximation algorithm. The ADC takes in an analog input (Analog_In) and converts it to a 4-bit digital output (Digital_Out). The signal Done is valid for one clock cycle indicating when the Digital_Out signal is valid. The ADC_Initiate is a one cycle pulse that initiates an A/D conversion cycle. Reset puts the FSM in a known IDLE state. Comparator_Out is a digital signal that is 1 if Analog_In > D/A output, else 0. To review, a successive approximation A/D converter is a bit-serial data conversion technique that checks if the analog voltage is in the top or bottom half of a voltage range. Initially, the MSB of the Digital_Out is set to 1 with all the lower order bits reset to 0. If the comparator output (which compares the Analog_In with the analog representation of the Digital_Out signal) is a one then the analog signal is in the top half, else it is in the bottom half. The MSB is reset if it is in the bottom half, otherwise it is left as a one. In the same clock cycle, the next lower bit is set to one to test whether or not the analog voltage is in the top or bottom half of the resulting range. This continues until the last bit has been appropriately determined. Analog_In + - D/A Output Digital_Out D/A Comparator_Out Reset 4 Decrement Control Block Done FSM Done ADC_Initiate ADC_Initiate 5 of 12

(a) Complete the schematic for the Control Block. The D Flip-Flops copy the D input to the Q output on the rising edge of the clock when EN is high. Set (S) and Reset (R) have priority over Enable (EN). When S=R=EN=0, the FF holds state. The inputs to the control block are:, ADC_Initiate, Decrement and Comparator_Out. The outputs of the control block are: Done and a 4-bit Digital_Out. (20 points) ADC_Initiate don t care Digital_Out 1 0 0 0 b3 1 0 0 b3 b2 1 0 b3 b2 b1 0 b3 b2 b1 b0 X X X X Decrement Done sample digital out here Decrement D bit 3 EN Q S R Digital_Out[3] 1 1 load count_en D1 2-bit Q1 Down D0 Counter Q0 D bit 2 EN Q S R Digital_Out[2] D bit 1 EN Q S R Digital_Out[1] ADC_Initiate Comparator_Out D bit 0 EN Q S R Digital_Out[0] Done 6 of 12

(b) Implement (draw the state transition diagram) the FSM block in the block diagram. Clearly label inputs on arcs and outputs in the states. Assume that the reset input drives the FSM to an IDLE state. The FSM inputs are:, Reset, ADC_Initiate, and Done. The FSM output is: Decrement. (10 points) 7 of 12

Problem 3: FSM/VHDL Consider the following FSM. OUT should be the output of a flip-flop so it is glitch free. In=0 S3/ In=1 S0/ Out=0 Out=1 In=1 In=0 In=0 In=1 S2/ In=1 S1/ Out=0 Out=1 In=0 a) Propose a state assignment such that a minimum number of flip-flops are use to implement the FSM including the output. (4 points) b) Write the VHDL code for this FSM (including the output) on the next page using the template below. (14 points) library ieee; use ieee.std_logic_1164.all; entity fsm is port ( IN, clk : in std_logic; OUT : out std_logic); end fsm; architecture state_machine of fsm is -- the following constants are to assign the state constant numff : integer :=?; signal p_s, n_s : std_logic_vector(numff - 1 downto 0); constant s0 : std_logic_vector(numff - 1 downto 0) :=?; constant s1 : std_logic_vector (numff -1 downto 0) :=?; constant s2 : std_logic_vector (numff -1 downto 0) :=?; constant s3 : std_logic_vector(numff -1 downto 0) :=?; begin OUT <=?; state_clocked:process(clk) begin... end process state_clocked; fsm:process(p_s, IN) -- combinational begin -- case case p_s is when s0 =>????????????? end case; end process fsm; end architecture state_machine; 8 of 12

Complete the VHDL code below (based on the template provided in the previous page) constant numff : integer := ; signal p_s, n_s : std_logic_vector(numff - 1 downto 0); constant s0 : std_logic_vector(numff - 1 downto 0) := ; constant s1: std_logic_vector (numff -1 downto 0) := ; constant s2 : std_logic_vector (numff -1 downto 0) := ; constant s3 : std_logic_vector(numff -1 downto 0) := ; begin OUT <= ; state_clocked:process(clk) begin -- case end process state_clocked; fsm:process(p_s, IN) -- combinational begin case p_s is when s0 => end case; end process fsm; 9 of 12

Problem 4: Arithmetic Structures and Transformations (a) Consider the following Finite Impulse Response filter (similar to the one shown in class). D represents a delay elements (i.e., register). Assume that the delay is ideal with zero to Q delay. A 0, A 1, and A 2 are fixed coefficients. Assume that the delay through a multiplier is 10ns and the delay through an adder is 5ns. Assume that the delay through a cascade of logic stages is the sum of the delays through the individual stages. What is the critical path (i.e., what is the minimum clock period) for this filter structure? Highlight the critical path. (4 points) In D D D A 0 A 1 A 2 Out (b) Apply the associative transformation to the above structure to re-organize the additions. Draw the new block diagram. (6 points) 10 of 12

(c) Retime the structure in part (b) with the goal of minimizing the clock period. Do not retime the shaded delay element. What is the new critical path after retiming? (8 points) 11 of 12

Parts (d) and (e) don t relate to parts (a)-(c). (d) Consider multiplication between a 16-bit input (In) represented in two s complement and an 8-bit constant number (in magnitude form). Let the constant be 01110110. If the multiplication were to be done using hardwired shifts and adds, how many additions will be required? (2 points) (e) For the constant coefficient given in part (d), transform it using the Canonical Signed Digit (CSD) transform. Assuming that subtractions and additions have the same cost, what is the minimum number of additions/subtractions needed? Show a block diagram of the multiplication with shifters, adders, and subtractors. Assume that appropriate sign-extension have been performed. (8 points) 12 of 12