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

Similar documents
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: Problem#: Points. 7 (14 points) 6 (7 points) 9 (6 points) 10 (21 points) 11 (4 points)

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

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

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)

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)

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)

EEL 4712 Digital Design Test 1 Spring Semester 2007

EEL 4712 Digital Design Test 1 Spring Semester 2008

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

EEL 4712 Digital Design Test 2 Spring Semester 2008

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

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

VHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2

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

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

VHDL And Synthesis Review

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

ECE 545 Lecture 17 RAM. George Mason University

Summary of FPGA & VHDL

VHDL Examples Mohamed Zaky

ECE 545: Lecture 11. Programmable Logic Memories

ECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs

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

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

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

COVER SHEET: Problem#: Points

ECE 699: Lecture 9. Programmable Logic Memories

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

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

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

Sequential Logic - Module 5

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

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

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

Mridula Allani Fall Fall

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

EEL 4783: Hardware/Software Co-design with FPGAs

VHDL for FPGA Design. by : Mohamed Samy

CprE 583 Reconfigurable Computing

Introduction to VHDL #2

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

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

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

Introduction to VHDL #3

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

VHDL simulation and synthesis

Timing in synchronous systems

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

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

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

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

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

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

In our case Dr. Johnson is setting the best practices

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

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

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

COE Design Process Tutorial

Control and Datapath 8

Inferring Storage Elements

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

ECE 448 Lecture 13. FPGA Memories. George Mason University

Review of Digital Design with VHDL

Sequential Statement

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

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

Computer-Aided Digital System Design VHDL

Test Benches - Module 8

Lecture 12 VHDL Synthesis

Field Programmable Gate Array

EEL 4783: HDL in Digital System Design

VHDL in 1h. Martin Schöberl

VHDL HIERARCHICAL MODELING

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

Tutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy

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

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

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit.

Hardware Description Language VHDL (1) Introduction

Basic Language Concepts

A bird s eye view on VHDL!

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

Altera s Avalon Communication Fabric

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

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Lattice VHDL Training

Introduction to VHDL

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) -

Sintaksa VHDL jezika - podsjetnik -

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

EL 310 Hardware Description Languages Midterm

Constructing VHDL Models with CSA

Getting Started with VHDL

Overview. Ram vs Register. Register File. Introduction to Structured VLSI Design. Recap Operator Sharing FSMD Counters.

EE434 ASIC & Digital Systems

VHDL Simulation. Testbench Design

EECS150 - Digital Design Lecture 10 Logic Synthesis

Transcription:

EEL 4712 Midterm 2 Spring 2011 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer gets the most points. COVER SHEET: Problem#: 1 (5 points) 2 (8 points) 3 (10 points) 4 (10 points) 5 (5 points) 6 (10 points) 7a (13 points) 7b (13 points) 7c (13 points) 7d (13 points) Points Total: Regrade Info:

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; BEGIN -- Process Statement -- Concurrent Signal Assignment -- Conditional Signal Assignment -- Selected Signal Assignment -- Component Instantiation Statement END a; 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; CASE expression IS WHEN constant_value => WHEN constant_value => WHEN OTHERS => END CASE; <generate_label>: FOR <loop_id> IN <range> GENERATE -- Concurrent Statement(s) END GENERATE; type identifier is type_definition; subtype identifier is subtype_indication;

1) (5 points) Block RAMs on FPGA generally only support synchronous reads. Explain why the following code will not be inferred as block RAM, and also mention how to change the code so that block RAM is inferred during synthesis. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity ram is port (clk : in std_logic; we : in std_logic; rd_addr : in std_logic_vector(4 downto 0); wr_addr : in std_logic_vector(4 downto 0); data_in : in std_logic_vector(3 downto 0); data_out : out std_logic_vector(3 downto 0)); end ram; architecture syn of ram is type ram_type is array (31 downto 0) of std_logic_vector (3 downto 0); signal RAM : ram_type; begin process (clk) begin if (clk'event and clk = '1') then if (we = '1') then RAM(to_integer(unsigned(wr_addr))) <= data_in; end if; end if; end process; data_out <= RAM(to_integer(unsigned(rd_addr))); end syn;

2) a. (2 points) Write a VHDL type declaration called MY_ARRAY that creates a 2D array with 5 rows and 10 columns, where each element is a 16-bit std_logic_vector. b. (2 points) Write a VHDL type declaration called MY_ARRAY that creates a 2D array with unconstrained ranges for each dimension, where each element is a 16-bit std_logic_vector. c. (2 points) Using the type from part b, instantiate an object of type MY_ARRAY with 10 rows and 20 columns. d. (2 points) Which of the following, if any, are legal VHDL array declarations (pre-2008)? type MY_ARRAY is array (natural range<>, natural range<>) of std_logic_vector type MY_ARRAY is array (natural range<>, 0 to 50) of std_logic_vector type MY_ARRAY is array (0 to 100, 0 to 50) of std_logic_vector

3) a. (5 points) For the VGA lab, you were required to display the image in 5 different locations. Given an image that is 128x128 and a screen resolution of 640x480, define the constants that specify the pixel boundaries when displaying the image centered vertically, but horizontally aligned with the left side of the screen. Show your work. constant X_START : integer := constant X_END : integer := constant Y_START : integer := constant Y_END : integer := b. (5 points) In class, I explained that the VGA control signals needed to be delayed to align with the output of the ROM. Explain why these signals would not be aligned without the delay registers.

4) (10 points) Map the following circuit onto 4-input, 2-output LUTs by drawing shapes around each portion of the circuit that is mapped to an individual LUT. 5) (5 points) What is the maximum number of gates that can be implemented in a 4-input, 2- output LUT? a. 2 4 gates b. 4 2 gates c. 2 4 *2 gates d. 4 2 *2 gates e. other

6) (10 points) Briefly describe the purpose of each of the following components: Switch box: Connection box: Routing tracks: 7) a. (13 points) Create an FSMD that implements the following pseudo-code. Do not write VHDL and instead leave the FSMD in graphical form (i.e., state machine with corresponding operations in each state). Make sure to specify all operations and state transitions. Note that input and output are I/O. Assume there is also a go signal that starts the FSMD (i.e. the circuit waits at the beginning until go is asserted) and a done signal that you should assert when the output is valid. n = input; i = 3; x = 1; y = 1; while (i <= n) { temp = x+y; x = y; y = temp; i ++; } output = y;

b. (13 points) Convert the previous FSMD into VHDL using the 1-process FSMD model: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity FSMD is port ( clk : in std_logic; rst : in std_logic; go : in std_logic; done : out std_logic; input : in std_logic_vector(7 downto 0); output : out std_logic_vector(7 downto 0)); end FSMD; architecture ONE_PROCESS of FSMD is begin process(clk, rst) begin

end process; end ONE_PROCESS;

c. (13 points) For the same pseudo-code, create a datapath capable of executing the code (ignore the controller in this step). Make sure to show all control signals (i.e., mux select signals, register load signals, comparator output signals). Hint: to make things easier, do not try to share resources (e.g., x+y and i++ as a single adder).

d. (13 points) For the datapath in the previous step, draw an FSM capable of controlling the datapath to perform the pseudo-code. In each state of the FSM, show the values of your control signals from the previous step that configure the FSM to do the corresponding operations. Hint: to save yourself time, try to use the same states as the FSMD, and just change the operations to the corresponding control signals.