EEL 4712 Digital Design Test 1 Spring Semester 2008

Similar documents
EEL 4712 Digital Design Test 1 Spring Semester 2007

EEL 4712 Digital Design Test 2 Spring Semester 2008

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

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

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

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

COVER SHEET: Total: Regrade Info: Problem#: Points. 7 (14 points) 6 (7 points) 9 (6 points) 10 (21 points) 11 (4 points)

COVER SHEET: Total: Regrade Info: 7 (5 points) 8 (6 points) 4 (10 points) 5 (12 points) 9 (15 points) 10 (27 points) 11 (4 free points)

EEL 4712 Name: SOLUTION Midterm 1 Spring 2016 VERSION 1 UFID:

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)

COVER SHEET: Total: Regrade Info: 7 (6 points) 2 (10 points) 9 (5 points) 8 (12 points) 12 (5 points) 11 (25 points)

[VARIABLE declaration] BEGIN. sequential statements

COVER SHEET: Total: Regrade Info: 1 (8 points) 2 ( 8 points) 3 (16 points) 4 (16 points) 5 (16 points) 6 (16 points) 7 (16 points) 8 (8 points)

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

Control and Datapath 8

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

Hardware Description Language VHDL (1) Introduction

Lab 3: Standard Combinational Components

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

Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

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

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

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

VHDL for FPGA Design. by : Mohamed Samy

Lattice VHDL Training

Digital Systems Design

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

VHDL Examples Mohamed Zaky

Introduction to VHDL #3

Chapter 6 Combinational-Circuit Building Blocks

Computer-Aided Digital System Design VHDL

VHDL And Synthesis Review

Experiment 8 Introduction to VHDL

Hardware Description Languages. Modeling Complex Systems

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

EEL 4783: Hardware/Software Co-design with FPGAs

Very High Speed Integrated Circuit Har dware Description Language

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

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below:

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

Sequential Statement

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

VHDL in 1h. Martin Schöberl

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.

Introduction to VHDL #2

Modeling Complex Behavior

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

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

CS303 LOGIC DESIGN FINAL EXAM

Mridula Allani Fall Fall

Sequential Logic - Module 5

Basic Language Concepts

Review of Digital Design with VHDL

Pollard s Tutorial on Clocked Stuff in VHDL

CprE 583 Reconfigurable Computing

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

Solutions - Homework 4 (Due date: November 9:30 am) Presentation and clarity are very important!

1. What is y-chart? ans: The y- chart consists of three domains:- behavioral, structural and geometrical.

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

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit)

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

EECE 353: Digital Systems Design Lecture 10: Datapath Circuits

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01

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

Introduction to VHDL #1

EE434 ASIC & Digital Systems

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

CCE 3202 Advanced Digital System Design

The VHDL Hardware Description Language

VHDL for Synthesis. Course Description. Course Duration. Goals

Getting Started with VHDL

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library :

Introduction to VHDL

ELCT 501: Digital System Design

Lecture 12 VHDL Synthesis

Contents. Appendix D VHDL Summary Page 1 of 23

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

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

A bird s eye view on VHDL!

COE 405 Design Methodology Based on VHDL

Lecture 3. VHDL Design Units and Methods. Entity, Architecture, and Components Examples of Combinational Logic Hands-on in the Laboratory

Concurrent & Sequential Stmts. (Review)

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

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

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

Advanced Electronics Lab.

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

EL 310 Hardware Description Languages Midterm

Using Library Modules in VHDL Designs

Contents. Chapter 9 Datapaths Page 1 of 28

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 3

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab

Using Library Modules in VHDL Designs

Transcription:

IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. Also, as always, the best answer gets the most points. COVER SHEET: Problem: Points: 1 (22 pts) 2 (22 pts) Total 3 (15 pts) 4 (1 pts) 5 ( 9 pts) 6 ( 14 pts) Re-Grade Information: 1

22 pts. 1. VHDL specification. Complete the VHDL specification (below and on the next page) for the following circuit: Prob1 Module CLR LD REG DATA CLR LD Q CLOCK 2-to-1 MUX s INCR InData 0 1 S Z X inc F ZOut SEL EN Notes: REG is an -bit storage register with an asynchronous CLR and synchronous LD inputs (CLR has priority over LD). There are eight 2-to-1 MUX s. INCR functions as follows: If inc = 0, F <= 0, If inc = 1, F <= X + 1 (i.e., increment X). All signals are active high. (a) Complete the following Entity declaration for the Prob1 Module: (2 pts) LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; ENTITY Prob2 IS -- Declare ZOut to be an OUT signal type. PORT( END Prob1; (b) On the next page, complete the architecture section to specify the behavior of the Prob1 Module in behavioral VHDL. (20 pts.) 2

Notes: Follow exactly the requirements below Every statement must be inside a PROCESS statement (you can use any number of PROCESS statements). IF and simple assignment statements only. The best answer gets the most points. ARCHITECTURE behaviorarch OF Prob1 IS SIGNAL PROCESS -- You must use a WAIT UNTIL statement to specify REG END behaviorarch; 3

22 pts. 2. VHDL specification. Complete the VHDL specification (on the next page) for the following circuit: (Note that a bubble indicates that the signal is active low. Shifter4 2-to-4 decoder D3..D0 Lin Rin DIR LDn Clock Q3 Q2 Q1 Q0 2-to-1 MUX M0 M1 SEL Z C1 C0 EN Y0 Y1 Y2 Y3 Shifter4 is a 4-bit shift register that can shift left when (DIR = 0) or shift right (when DIR = 1): When shifting left, Q0 <= Lin; when shifting right, Q3 <= Rin. When LDn = true (active low), then D3 is loaded into the Shifter4. LDn is synchronous and has priority over shifting. The 2-to-4 decoder (with an active low enable EN) must be specified using a WITH-SELECT assignment statement. (All decoder outputs are active low). The logic for the MUX must be specified using a conditional assignment statement. 4

Put solution for Problem 2 here: ENTITY Test1P2 IS PORT (Lin, Rin, DIR, LDn, Clock, SEL : IN STD_LOGIC; D : IN STD_LOGIC_VECTOR (3 DOWNTO 0); Y : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)); END Test1P2 ; ARCHITECTURE P2Arch OF T1Prob2 IS SIGNAL PROCESS ( ) END P2Arch ; 5

15 pts. 3. VHDL Analysis Timing diagrams). Given the following VHDL specification, complete the following timing diagram for the outputs, Q1, Q2, and Q3. LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY Test1P3 IS PORT ( D,Resetn, Clock : IN STD_LOGIC ; Q1, Q2, Q3 : OUT STD_LOGIC) ; END Test1P3 ; ARCHITECTURE Behavior OF Test1P3 IS PROCESS ( D, Resetn, Clock ) Q3 <= '0'; IF Resetn = '0' THEN Q1 <= '0' ; ELSIF Clock = '1' THEN Q1 <= D ; END IF ; IF Resetn = '0' THEN Q2 <= '0' ; ELSIF (Clock'event AND Clock = '1')THEN Q2 <= D ; END IF ; If (Resetn = '1' AND Clock = '1') THEN Q3 <= D ; END IF ; END PROCESS ; END Behavior ; Note: Please show delays. The initial contents of all flipflops are unknown. Also, go as far as you can. 6

The following VHDL code is used for Problem 4 and Problem 5: LIBRARY ieee ; USE ieee.std_logic_1164.all ; USE ieee.std_logic_unsigned.all ; ENTITY Test1P4_5 IS PORT ( Clock, Resetn : IN STD_LOGIC ; Z1, Z2, Z3 : OUT STD_LOGIC; Q, QQA, QQB, QQC : OUT STD_LOGIC_VECTOR (3 DOWNTO 0)) ; END Test1P4_5 ; ARCHITECTURE Behavior OF Test1P4_5 IS SIGNAL Count : STD_LOGIC_VECTOR (3 DOWNTO 0) ; QQA <= Count ; PROCESS ( Clock, Resetn ) Q <= Count ; IF Resetn = '0' THEN Count <= "0000" ; ELSIF (Clock'EVENT AND Clock = '1') THEN forloop: FOR i IN 0 TO 3 LOOP Count <= Count + 1 ; Z1 <= Count(0); END LOOP; IF (Count = "0000") THEN -- This IF statement is used for Problem 5(b) Z2 <= '1'; ELSE Z2 <= '0'; END IF; QQB <= Count; ELSE Count <= Count ; END IF ; QQC <= Count; IF (Count = "0000") THEN -- This IF statement is used for Problem 5(a) Z3 <= '1'; ELSE Z3 <= '0'; END IF; END PROCESS ; END Behavior ; 7

1 pts. 4. VHDL analysis Timing diagram. (a) Based on the code shown on Page 7, complete the following timing diagram for the values for Count (in binary): (The initial contents of all flipflops are unknown. Also, go as far as you can.) (3 pts) (b) Assume the given Count values, complete the following timing diagram based on the code shown on Page 7 (i.e., don t use the code to figure out the Count values, they are given to you for this part of the problem). Give all values in binary. (The initial contents of all flipflops are unknown. Also, go as far as you can.) (15 pts) 0110 1011 1011 0000 0000 0011 0011 1010

9 pts. 5. VHDL Analysis and re-code (a) Given the IF statement at the bottom of the code shown on Page 7, convert it into a SELECT assignment statement that can be specified outside the PROCESS block. (3 pts) IMPORTANT: If necessary, you need to tell me what else you need to add to the code (if anything) to maintain the behavior of the original code. (b) Given the IF statement in the middle of the code shown on Page 7, convert it into a conditional assignment statement that can be specified outside the PROCESS block. (6 pts) IMPORTANT: If necessary, you need to tell me what else you need to add to the code (if anything) to maintain the behavior of the original code. 9

14 pts. 6. Other topics. (a) Let us assume you have the components from Lab 3: adder2lca (2-bit adder) and lca2gen (2-bit look-ahead carry generator). (3 pts.) For a 64-bit adder, how many lca2gen components will you need? For a 64-bit adder, how many levels of lca2gen will you need? (b) Let us assume you have the components from Lab 3: adder2lca (2-bit adder) and lca2gen (2-bit look-ahead carry generator). (3 pts.) For a 4-bit adder, how many lca2gen components will you need? For a 4-bit adder, how many levels of lca2gen will you need? (c) Assume you are designing an -bit adder to perform two s complement addition. Given me the logic table and equation for OV (two s complement overflow) as a function of the sign bits of the two operands and the sum. (3 pts) Put logic table here: Put equation for OV here: (d) Compare/contrast the function of a logic state analyzer (LSA) vs. the function of an oscilloscope. (2 pts) (e) Compare/contrast the functions of an LSA, Quartus simulation, and Quartus SignalTap. (3 pts) 10

ENTITY entity_name IS PORT( input_name, input_name : IN STD_LOGIC; input_vector_name : IN STD_LOGIC_VECTOR( high downto low); bidir_name, bidir_name : INOUT STD_LOGIC; output_name, output_name : OUT STD_LOGIC); END entity_name; ARCHITECTURE a OF entity_name IS SIGNAL signal_name : STD_LOGIC; SIGNAL signal_name : STD_LOGIC; -- Process Statement -- Concurrent Signal Assignment -- Conditional Signal Assignment -- Selected Signal Assignment -- Component Instantiation Statement END a; SIGNAL signal_name : type_name; instance_name: component_name PORT MAP ( component_port => connect_port, component_port => connect_port); WITH expression SELECT signal <= expression WHEN constant_value, expression WHEN constant_value, expression WHEN constant_value, expression WHEN constant_value; signal <= expression WHEN boolean_expression ELSE expression WHEN boolean_expression ELSE expression; IF expression THEN ELSIF expression THEN ELSE END IF; WAIT UNTIL expression; CASE expression IS WHEN constant_value => WHEN constant_value => WHEN OTHERS => END CASE; 11