CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

Similar documents
CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

VHDL Examples Mohamed Zaky

Sequential Statement

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

Problem Set 10 Solutions

Sequential Logic - Module 5

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

VHDL in 1h. Martin Schöberl

Design Problem 3 Solutions

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

Lecture 12 VHDL Synthesis

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

In our case Dr. Johnson is setting the best practices

Timing in synchronous systems

Luleå University of Technology Kurskod SMD152 Datum Skrivtid

Computer-Aided Digital System Design VHDL

VHDL And Synthesis Review

ELCT 501: Digital System Design

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

CS/EE Homework 7 Solutions

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN

Luleå University of Technology Kurskod SMD098 Datum Skrivtid

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

The University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2004

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

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

[VARIABLE declaration] BEGIN. sequential statements

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

Concurrent & Sequential Stmts. (Review)

SEQUENTIAL STATEMENTS

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

CSE 260 Digital Computers: Organization and Logical Design. Exam 2 Solutions

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

EITF35: Introduction to Structured VLSI Design

Hardware Description Language VHDL (1) Introduction

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

IT T35 Digital system desigm y - ii /s - iii

Example 58: Traffic Lights

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Control and Datapath 8

Sign here to give permission to return your test in class, where other students might see your score:

VHDL: RTL Synthesis Basics. 1 of 59

ECE Digital Design Laboratory. Lecture 3 Finite State Machines!

Summary of FPGA & VHDL

Design Problem 6 Solution

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

Inferring Storage Elements

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

Hardware Description Languages. Modeling Complex Systems

Chapter 8 VHDL Code Examples

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2

EITF35: Introduction to Structured VLSI Design

Written Re-exam with solutions for IE1204/5 Digital Design Friday 10/

Design Problem 5 Solutions

Lecture 5: State Machines, Arrays, Loops. EE 3610 Digital Systems

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)

Lecture 08 Finite State Machine Design Using VHDL

CprE 583 Reconfigurable Computing

EL 310 Hardware Description Languages Midterm

EITF35: Introduction to Structured VLSI Design

Fundamental Design Concepts. Fundamental Concepts. Modeling Domains. Basic Definitions. New terminology and overloaded use of common words

VHDL for Synthesis. Course Description. Course Duration. Goals

3 Designing Digital Systems with Algorithmic State Machine Charts

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

Introduction to VHDL #3

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

VHDL VS VERILOG.

Lab 3. Advanced VHDL

Finite State Machines (FSM) Description in VHDL. Review and Synthesis

Multiplication Simple Gradeschool Algorithm for 16 Bits (32 Bit Result)

Senior Project Design Review: Internal Hardware Design of a Microcontroller in VLSI

Finite State Machines

Problem Set 5 Solutions

Counters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR

ECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers

Advanced Digital Design Spring 2011 Final Examination Time Limit: 2 Hours

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Pollard s Tutorial on Clocked Stuff in VHDL

Used to perform operations many times. See previous Parallel to Serial Example

Latch Based Design (1A) Young Won Lim 2/18/15

ECOM 4311 Digital Systems Design

CprE 583 Reconfigurable Computing

Contents. Chapter 9 Datapaths Page 1 of 28

ECE 459/559 Secure & Trustworthy Computer Hardware Design

8 Register, Multiplexer and

EEL 4712 Digital Design Test 2 Spring Semester 2008

ECE 545 Lecture 11 Addendum

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

VHDL simulation and synthesis

Transcription:

CSE 260 Introduction to Digital Logic and Computer Design Jonathan Turner Exam 1 Your name 2/13/2014 1. (10 points) Draw a logic diagram that implements the expression A(B+C)(C +D)(B+D ) directly (do not simplify first), using only simple gates. Simplify the expression as much as you can. How many simple gates of each type are required to implement the simplified expression? - 1 -

2. (15 points) Draw a circuit that implements the VHDL code fragment shown below. Assume that x and z are two bit signals. All others are of type std_logic. You may use simple gates, multiplexors and flip flops in your circuit diagram. with z select x <= a & b when 00 01, 01 when 10, 11 when others; process (clk) begin if rising_edge(clk) then if a > b then y <= a and c; elsif a /= c then y <= x(0); end process; - 2 -

3. (10 points) Consider the circuit shown below, which includes four copies of the same basic building block. a(3) b(3) a(2) b(2) a(1) b(1) a(0) b(0) z(4) z(3) z(2) z(1) z(0) 0 1 0 1 x(3) x(2) x(1) x(0) Write a VHDL process containing a loop that specifies this circuit. - 3 -

4. (10 points) Draw a diagram of an 8-to-1 multiplexor with data inputs D 0 to D 7 and a 3 bit control input C, using smaller multiplexors as building blocks. Make sure that the all signals and mux inputs are labeled appropriately. Pay special attention to the control inputs of the mux components in your circuit. How many LUT4s does it take to implement this circuit? - 4 -

5. (15 points) The VHDL module shown below counts the number of odd length pulses that have been observed on the din input since the last reset. What is the smallest number of flip flops needed to implement this VHDL spec? entity oddpulsecounter is port( clk, reset, din: in std_logic; oddcount: out std_logic_vector(7 downto 0)); end oddpulsecounter; architecture a1 of oddpulsecounter is type statetype is (resetstate, start1, prev0, prev1odd, prev1even); signal state: statetype; begin process(clk) begin if rising_edge(clk) then if reset = 1 then state <= resetstate; else case state is when resetstate => oddcount <= (others => 0 ); if din = 0 then state <= prev0; else state <= start1; when start1 => if din = 0 then state <= prev0; when prev0 => if din = 1 then state <= prev1odd; when prev1odd => if din = 0 then state <= prev0; oddcount <= oddcount + 1; else state <= prev1even; when others => if din = 0 then state <= prev0; else state <= prev1odd; end case;... end a1; Complete the state diagram for this VHDL module. Show updates to stored values. resetstate start1 prev0 prev1even prev1odd - 5 -

6. (10 points) Consider the state diagram shown at left below. Fill in the entries in the state table at right. You may abbreviate the state names as R, G and B. 1x/10 red 01/11 01/00 green AB/XY 11/00 current state red AB XY next state 00/11 01/00 1x/01 x0/00 green 00/00 blue blue Consider the state table shown below. Draw a state diagram corresponding to this state table. Is this state machine a Mealy-mode machine or a Moore-mode machine? current state A XY next state up up 0 10 down 1 10 up down 0 01 left 1 11 right left 0 11 right 1 01 up right 0 00 up 1 10 left left right down - 6 -

7. (15 points) The VHDL module shown below defines a sequential circuit that looks for the minimum value present on the input A and counts the number of clock periods when this minimum value is present. It has two outputs, minval and mincount. So for example, if the input sequence on A is 57, 85, 23, 34, 36, 23, 46, 23 then the sequences of values on the two two outputs will be 57, 57, 23, 23, 23, 23, 23, 23 and 1,1,1,1,1,2,2,3. entity minvalcount is port ( clk, reset: in std_logic; A : in std_logic_vector(7 downto 0); minval, mincount : out std_logic_vector(7 downto 0)); end minvalcount; architecture a1 of minvalcount is signal val, count: std_logic_vector(7 downto 0); begin process (clk) begin if rising_edge(clk) then if reset = '1' then val <= x FF ; count <= x 00 ; else if A < val then val <= A; count <= x 01 ; elsif A = val then count <= count + 1; end process; minval <= val; mincount <= count; end a1; Complete the circuit shown below, so that it implements the VHDL module above. Use only simple gates and 2:1 multiplexors. A 8 bit reg (count) D increment A A+1 compare X Y X=Y compare X Y X<Y >C minval reset clk 8 bit reg (val) D >C mincount - 7 -