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

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

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

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

VHDL And Synthesis Review

VHDL for Synthesis. Course Description. Course Duration. Goals

Hardware Description Language VHDL (1) Introduction

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

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

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

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

CprE 583 Reconfigurable Computing

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

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

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

CprE 583 Reconfigurable Computing

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

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

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

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

VHDL: RTL Synthesis Basics. 1 of 59

Lecture 12 VHDL Synthesis

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

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

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

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

Sequential Logic - Module 5

!"#$%&&"'(')"*+"%,%-".#"'/"'.001$$"

Introduction to VHDL #1

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

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

קורס VHDL for High Performance. VHDL

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

Summary of FPGA & VHDL

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

ECE 341 Midterm Exam

Lecture 10 Subprograms & Overloading

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

Outline. CPE/EE 422/522 Advanced Logic Design L07. Review: JK Flip-Flop Model. Review: VHDL Program Structure. Review: VHDL Models for a MUX

VHDL Essentials Simulation & Synthesis

CS303 LOGIC DESIGN FINAL EXAM

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

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

3 Designing Digital Systems with Algorithmic State Machine Charts

Introduction to VHDL

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

Problem Set 10 Solutions

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

Contents. Appendix D VHDL Summary Page 1 of 23

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

[VARIABLE declaration] BEGIN. sequential statements

Introduction to VHDL #3

EECS 270 Verilog Reference: Sequential Logic

State Machine Descriptions

ECOM 4311 Digital Systems Design

Control and Datapath 8

8 Register, Multiplexer and

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

Inferring Storage Elements

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

Inthis lecture we will cover the following material:

VHDL HIERARCHICAL MODELING

Quick Introduction to SystemVerilog: Sequental Logic

Written exam for IE1204/5 Digital Design Thursday 29/

CS 61C Summer 2012 Discussion 11 State, Timing, and CPU (Solutions)

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

Outline CPE 626. Advanced VLSI Design. Lecture 4: VHDL Recapitulation (Part 2) Signals. Variables. Constants. Variables vs.

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Digital Systems Design

EL 310 Hardware Description Languages Midterm

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

EITF35: Introduction to Structured VLSI Design

Programable Logic Devices

What Is VHDL? VHSIC (Very High Speed Integrated Circuit) Hardware Description Language IEEE 1076 standard (1987, 1993)

Digital System Design with SystemVerilog

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

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group

Digital Systems Design

The University of Alabama in Huntsville ECE Department CPE Final Exam April 28, 2016

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

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

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

Outline CPE 626. Advanced VLSI Design. Lecture 3: VHDL Recapitulation. Intro to VHDL. Intro to VHDL. Entity-Architecture Pair

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity

Department of Technical Education DIPLOMA COURSE IN ELECTRONICS AND COMMUNICATION ENGINEERING. Fifth Semester. Subject: VHDL Programming

Lab # 2. Sequential Statements

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

ECE 341 Midterm Exam

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL

FSM and Efficient Synthesizable FSM Design using Verilog

Concurrent & Sequential Stmts. (Review)

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

ELCT 501: Digital System Design

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Lecture 4. VHDL Fundamentals. George Mason University

EEL 4783: Hardware/Software Co-design with FPGAs

Pollard s Tutorial on Clocked Stuff in VHDL

(ii) Simplify and implement the following SOP function using NOR gates:

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

MLR Institute of Technology

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

Transcription:

The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam February 26, 2003 1. (20 points) Describe the following logic expression (A B D) + (A B C) + (B C ) with a structural VHDL model using the following package located in library WORK. Hint: If you don t need all of the inputs, you can tie one or more of them to 0 or 1. package LOGIC_PKG is component AND2_OP port (A, B : in BIT; Z out BIT); end component; component NOR2_OP port (A, B : in BIT; Z out BIT); end component; component OR4_OP port (A, B, C, D : in BIT; Z out BIT); end component; end LOGIC_PKG;

2. (10 points) Write a procedure that accepts a std_logic_vector of arbitrary length and returns an integer which represents the total number of 1 s contained in the std_logic_vector and an integer which represents the total number of 0 s contained in the std_logic_vector. 3. (2 points) List two of the three primary design units in VHDL 4. (1 point) delay is the delay which represents gate delay in VHDL. 5. (1 point) (True or False) All sequential statements are synthesized into sequential circuits. 6. (1 point) A top-level entity designed to test a VHDL model is called a.

7. (20 points) Consider the following combinational digital system, a priority encoder. In a priority encoder, each input has a priority level associated with it. The encoder outputs indicate the active input that has the highest priority. When an input with a high priority is asserted, the other inputs with lower priority are ignored. The truth table for a 4-2 priority encoder is shown below. It assumes that w 0 has the lowest priority and w 3 the highest. The outputs y 1 and y 0 represent the binary number that identifies the highest priority input set to 1. Since it is possible that none of the inputs is equal to 1, an output, z, is provided to indicate this condition. It is set to 1 when at least one of the inputs is equal to 1, and 0 otherwise. d don t care w 0 w 1 w 2 w 3 y 0 y 1 z w 3 w 2 w 1 w 0 y 1 y 0 z 0 0 0 0 d d 0 0 0 0 1 0 0 1 0 0 1 d 0 1 1 0 1 d d 1 0 1 1 d d d 1 1 1 (a) (4 points) Write an entity for the priority encoder. (b) (8 points) Use concurrent signal assignments to model the priority encoder. (c) (8 points) Use a process statement and sequential statements to model the priority encoder.

8. (10 points) Write a VHDL description for a rising D-type edge-triggered flip-flop with synchronous set and reset inputs active high and two outputs. Label the data, clock, set and reset inputs, d, c, s, and r, respectively. s and r cannot simultaneously be active. a. (3 points) Write an entity. b. (7 points) Write a synthesizable behavioral architecture. 9. (1 point) A process is triggered whenever a signal in its has an event on it. 10. (1 point) (True or False) It is possible to make aggregate assignments in VHDL.

11. (1 point) (True or False) Multiple assignments to a signal within a process can cause that signal to have multiple drivers. 12. (1 point) (True or False) A D flip-flop and a D latch have the same behavior. 13. (1 point) RANGE is an example of a VHDL. 14. (20 points) Specify type declarations for the following data types. a. (3 points) A seven valued logic system, MVL7, with values 0, 1, X, Z, U, L, and H. Values 0 and 1 have the usual logic meaning. Value Z means high impedance state, X means unknown, U means uninitialized, L means a weak 0 and H means a weak 1. Any uninitialized data item of this type should have the value U. b. (3 points) A COLORS_OF_THE_RAINBOW enumeration data type. c. (2 points) A data type REGISTER_NUMBER that can have integer values in the range from 0 to 31. d. (2 points) A data type TAX that can have real values between $0.00 and $9,999.99. e. (2 points) An ascending range data type ASC_32 with integer values from 0 to 31. f. (4 points) A 16-bit ascending-index register composite data type, REG_32_ASCENDING, with index valued from the type ASC_32 declared above, and component values of type MVL7. g. (4 points) A three-dimensional table, TABLE_3D, with first and second indices of type REGISTER_NUMBER, and third index of type BOOLEAN and table entries type COLORS_OF_THE_RAINBOW.

15. (10 points) Draw the state diagram for the following state machine. Is it a Moore machine or a Mealy machine? ENTITY state_machine IS PORT (Clock, Resetn ; IN BIT; r : IN BIT_VECTOR(1 to 3); g : OUT BIT_VECTOR(1 to 3)); END state_machine; ARCHITECTURE behavior OF state_machine IS TYPE state_type IS (Idle, gnt1, gnt2, gnt3); SIGNAL y : state_type; BEGIN PROCESS (Resetn, Clock) BEGIN IF (Resetn = 0 ) THEN ELSIF (Clock EVENT AND Clock = 1 ) THEN CASE y IS WHEN Idle => IF (r(1) = 1 ) THEN y <= gnt1; ELSIF (r(2) = 1 ) THEN y <= gnt2; ELSIF (r(3) = 1 ) THEN y <= gnt3; WHEN gnt1 => IF (r(1) = 1 ) THEN y <= gnt1; WHEN gnt2 => IF (r(2) = 1 ) THEN y <= gnt2; WHEN gnt3 => IF (r(3) = 1 ) THEN y <= gnt3; END CASE; END PROCESS; g(1) <= 1 WHEN y = gnt1 0 ; g(2) <= 1 WHEN y = gnt2 0 ; g(3) <= 1 WHEN y = gnt3 0 ; END behavior;