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

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

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

CS/EE Homework 7 Solutions

Timing in synchronous systems

Design Problem 3 Solutions

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Sequential Statement

Today. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses

[VARIABLE declaration] BEGIN. sequential statements

Problem Set 10 Solutions

In our case Dr. Johnson is setting the best practices

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

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

VHDL Examples Mohamed Zaky

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

VHDL And Synthesis Review

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

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

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

ELCT 501: Digital System Design

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

Luleå University of Technology Kurskod SMD098 Datum Skrivtid

Computer-Aided Digital System Design VHDL

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

Sequential Logic - Module 5

Mealy and Moore examples

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule

Mid-Term Exam Solutions

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

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

Lecture 12 VHDL Synthesis

Luleå University of Technology Kurskod SMD152 Datum Skrivtid

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

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

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

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

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

VHDL in 1h. Martin Schöberl

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

ECE Digital Design Laboratory. Lecture 3 Finite State Machines!

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

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

Inferring Storage Elements

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

Contents. Chapter 9 Datapaths Page 1 of 28

SEQUENTIAL STATEMENTS

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

VHDL: RTL Synthesis Basics. 1 of 59

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 6 Combinational and sequential circuits

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

Introduction to Design Vision. Instructor: Prof. Shantanu Dutt. TA: Soumya Banerjee

Midterms Exam Fall 2011 Solu6ons

Hardware Description Language VHDL (1) Introduction

Design Problem 6 Solution

CprE 583 Reconfigurable Computing

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

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

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

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

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

Control and Datapath 8

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

Digital Integrated Circuits

ECOM 4311 Digital Systems Design

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

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

EL 310 Hardware Description Languages Midterm

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

Concurrent & Sequential Stmts. (Review)

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

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

EITF35: Introduction to Structured VLSI Design

VHDL for Synthesis. Course Description. Course Duration. Goals

Problem Set 5 Solutions

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

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

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

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

The Virtex FPGA and Introduction to design techniques

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

COVER SHEET: Total: Regrade Info: 7 (6 points) 2 (14 points) 4 (12 points) 8 (20 points) 9 (24 points) 10 (5 extra credit points)

Field Programmable Gate Array

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

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

Chapter 8 VHDL Code Examples

ECE 545 Lecture 11 Addendum

EITF35: Introduction to Structured VLSI Design

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

Introduction to VHDL #3

EE434 ASIC & Digital Systems

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

ECE 459/559 Secure & Trustworthy Computer Hardware Design

VHDL simulation and synthesis

8 Register, Multiplexer and

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

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

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

EITF35: Introduction to Structured VLSI Design

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. Behavioral Design Style: Registers & Counters.

Transcription:

CSE 6 Introduction to igital Logic and Computer esign Exam Solutions Jonathan Turner /3/4. ( points) raw a logic diagram that implements the expression (B+C)(C +)(B+ ) directly (do not simplify first), using only simple gates. B C Simplify the expression as much as you can. (B+C)(C +)(B+ ) = (BC +B+C)(B+ ) = (BC +B) = B(C +) How many simple gates of each type are required to implement the simplified expression? The circuit corresponding to this expression requires and gates, or gate and inverter. - -

. (5 points) raw a circuit that implements the VHL code fragment shown below. ssume that x and z are two bit signals. ll 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, when, when others; process (clk) begin if rising_edge(clk) then if a > b then y <= a and c; elsif a /= c then y <= x(); end process; x() x clk >C y 3 a b c z - -

3. ( points) Consider the circuit shown below, which includes four copies of the same basic building block. a(3) b(3) a() b() a() b() a() b() z(4) z(3) z() z() z() x(3) x() x() x() Write a VHL process containing a loop that specifies this circuit. process(a,b,z) begin for i in to 3 loop if b(i) /= z(i) then x(i) <= a(i) or z(i); else x(i) <= b(i); z(i+) <= a(i) and z(i); end loop; end process; - 3 -

4. ( points) raw a diagram of an 8-to- multiplexor with data inputs to 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. 3 4 5 6 7 3 3 C() C(..) How many LUT4s does it take to implement this circuit? It takes 3 LUTs to implement each 4: mux, plus one more to implement the : mux, so 7 in all. - 4 -

5. (5 points) The VHL 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 VHL spec? We need at least three for the register and eight for the oddcount register. So. entity oddpulsecounter is port( clk, reset, din: in std_logic; oddcount: out std_logic_vector(7 downto )); end oddpulsecounter; architecture a of oddpulsecounter is type Type is (resetstate, start, prev, prevodd, preveven); signal : Type; begin process(clk) begin if rising_edge(clk) then if reset = then <= resetstate; else case is when resetstate => oddcount <= (others => ); if din = then <= prev; else <= start; when start => if din = then <= prev; when prev => if din = then <= prevodd; when prevodd => if din = then <= prev; oddcount <= oddcount + ; else <= preveven; when others => if din = then <= prev; else <= prevodd; end case;... end a; Complete the diagram for this VHL module. Show updates to stored values. resetstate //oddcount<= start //.. //oddcount<= //.. //.. prev din //oddcount<=oddcount+ //.. //.. preveven //.. //.. prevodd - 5 -

6. ( points) Consider the diagram shown at left below. Fill in the entries in the table at right. You may abbreviate the names as R, G and B. x/ red / / green B/XY / current B XY next red blue green / / x/ x/ red red green blue / blue red blue green blue blue red green green Consider the table shown below. raw a diagram corresponding to this table. Is this machine a Mealy-mode machine or a Moore-mode machine? It s a Mealy-mode machine. / up current XY next up down up down left right left right / left / / / /XY / right up right up left / / down - 6 -

7. (5 points) The VHL module shown below defines a sequential circuit that looks for the minimum value present on the input 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 is 57, 85, 3, 34, 36, 3, 46, 3 then the sequences of values on the two two outputs will be 57, 57, 3, 3, 3, 3, 3, 3 and,,,,,,,3. entity minvalcount is port ( clk, reset: in std_logic; : in std_logic_vector(7 downto ); minval, mincount : out std_logic_vector(7 downto )); end minvalcount; architecture a of minvalcount is signal val, count: std_logic_vector(7 downto ); begin process (clk) begin if rising_edge(clk) then if reset = '' then val <= x FF ; count <= x ; else if < val then val <= ; count <= x ; elsif = val then count <= count + ; end process; minval <= val; mincount <= count; end a; Complete the circuit shown below, so that it implements the VHL module above. Use only simple gates and : multiplexors. x compare X Y X=Y compare X Y X<Y x 8 bit reg (count) >C increment + minval reset xff 8 bit reg (val) >C mincount clk - 7 -