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

Size: px
Start display at page:

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

Transcription

1 CSE 260 Digital Computers: Organization and Logical Design Exam 2 Solutions Jon Turner 1. (10 points). The table at right shows a table with 5 rows and three columns with each column having a heading. Write a VHDL definition of a record type that would be suitable for representing one row of such a table. Assume that the xpos and ypos values are eight bit logic vectors and that the color value is a three bit logic vector. Use the column headings as the field names. type rowtype is record xpos, ypos: std_logic_vector(7 downto 0); color: std_logic_vector(2 downto 0); end record; xpos ypos color x20 x31 4 x66 x11 3 x47 x16 7 x18 x25 5 x12 x44 1 Write a second VHDL type definition and a declaration for a signal called table that could be used to represent the table at right (you are not required to initialize table). type tabletype is array(0 to 4) of rowtype; signal table: tabletype; The VHDL function shown below returns a memory address associated with a given pair of xpos and ypos values. Let displaybuf be a VHDL array that represents a display buffer, in which each word is three bits wide. Write a VHDL assignment statement that uses the function to change the value of the word in displaybuf associated with table(3).xpos and table(3).ypos to table(3).color. function dbadr(x, y: in std_logic_vector(7 downto 0)) returns std_logic_vector(15 downto 0) is begin return x & y; end dbadr; displaybuf(int(dbadr(table(3).xpos,table(3).ypos))) <= table(3).color; - 1 -

2 2. (10 points) The testbench below does an exhaustive test of a combinational circuit that compares a pair of 2 digit BCD values and outputs the larger of the two. Show how you can add assertions to the testbench to verify that the results are correct. entity testbcdmax end testbcdmax; architecture a1 of testbcdmax begin subtype bcddigit is std_logic_vector(3 downto 0); type bcdnum is array(natural range <>) of bcddigit; component bcdmax port( x, y: in bcdnum(1 downto 0); z out bcdnum(1 downto 0)); end component signal x, y, z: bcdnum(1 downto 0); begin bcdm: bcdmax port map(x,y,z); process begin for x1 = 0 to 9 loop for x0 = 0 to 9 loop x(1) <= conv_std_logic_vector(x1,4); x(0) <= conv_std_logic_vector(x0,4); for y1 = 0 to 9 loop for y0 = 0 to 9 loop y(1) <= conv_std_logic_vector(y1,4); y(0) <= conv_std_logic_vector(y0,4); wait for 20 ns; if x = y then assert (z = x); elseif x1 > y1 or (x1 = y1 and x0 > y0) then assert (z = x); else assert (z = y); end loop; end loop; end loop; end loop; assert false report simulation ended normally severity error; end process; end a1; - 2 -

3 3. (10 points) The VHDL module defined below implements a circuit that counts the number of times that input X becomes larger than input Y. So for example, with the sequence of input pairs (X,Y) = (7,5), (4,6), (8,6), (9,13), (15, 2) the final value of the output, nupcrossings should be 2. Complete the schematic at the bottom of the page so it implements this circuit; add only simple gates and wires. entity upcross is Port ( clk, reset: in std_logic; X, Y: in std_logic_vector(3 downto 0); nupcrossings: out std_logic_vector(7 downto 0); end upcross; architecture a1 of upcross is signal count: std_logic_vector(7 downto 0); signal prevcompare: std_logic; begin process (clk) begin if rising_edge(clk) then if reset = '1' then count <= (count range => 0 ); prevcompare <= 1 ; else if X > Y then prevcompare <= 1 ; else prevcompare <= 0 ; if prevcompare = 0 and X > Y then count <= count + 1; end process; nupcrossings <= count; end a1; - 3 -

4 4. (20 points) In this problem you are to write a VHDL architecture for a pulsedifferencer circuit, with the interface defined by the entity declaration shown below. entity pulsedifferencer is port( clk, reset: in std_logic; up, down: in std_logic; diff: out word); end entity pulsedifferencer; When the up input goes low, after having been high for m clock ticks, the diff output should increase by m. Similarly, when the down input goes low, after having been high for n clock ticks, the diff output should decrease by n. If both go low at the same time, diff should increase by (m n). The required behavior is illustrated in the timing diagram below. Note that diff changes only when one or both of the inputs drops and it changes on the first rising clock edge following the drop in the input. Write a complete VHDL architecture that implements this circuit. You may assume that up and down are low immediately after reset and that the value of diff will never be larger 200. Your VHDL should be complete and syntactically correct. Include comments as needed to make your code easy to understand. You may continue onto the next page

5 architecture a1 of pulsedifferencer signal prevup, prevdown: std_logic; signal ucnt, dcnt, count: std_logic_vector(7 downto 0); begin process (clk) begin if rising_edge(clk) then prevup <= up; prevdown <= down; if reset = 1 then count <= (others => 0 ); else -- upcnt is number of ticks up has been high if up = 0 then ucnt <= (others => 0 ); else ucnt <= ucnt + 1; -- downcnt is number of ticks down has been high if down = 0 then dcnt <= (others => 0 ); else dcnt <= dcnt + 1; if up < prevup and down < prevdown then count <= count + (ucnt - dcnt); elsif up < prevup then count <= count + ucnt; elsif down < prevdown then count <= count - dcnt; end process; diff <= count; end a1; - 5 -

6 5. (10 points). The Washu-2 processor simulation shown below has several places that have been replaced with blank spaces labeled with letters. In the spaces below, fill in the values that should appear where the blanks are. A B C D E The instruction set for the processor appears below halt 0001 negate 01xx branch 02xx branch if zero 03xx branch if positive 04xx branch if negative 05xx indirect branch 1xxx 2xxx 3xxx 5xxx 6xxx 8xxx cxxx immediate load direct load indirect load direct store indirect store add and - 6 -

7 6. (15 points) Write a subroutine for the WashU-2 that takes two arguments x and y and returns max(x,y). The calling program should write the arguments and the return address in locations 1000, 1001 and 1002 before calling the subroutine. The first instruction of the subroutine is at location Your subroutine should return the result in the ACC. Include enough comments to make it clear what your code is doing argument x argument y return address ACC=y -- ACC=x-y ACC=-y ACC=x-y if x<y jump ahead 3 -- if ACC>=0 return x ACC=x fa return x ACC=y -- else return y 100a 05f8 return y - 7 -

8 7. (10 points) The simulation output shown below shows the WashU-2 processor pausing during the execution of a program. There are three specific reasons that the console causes the processor to pause. Name these three reasons. The console may pause the processor because the single-step button was pressed. The console may pause the processor in order to read from a memory location in order to update the value of snoopdata. The console may pause the processor in order to write the value in snoopdata to a memory location. For which of these three reasons did the processor pause in the simulation shown above. Explain how you can tell. It this case the processor paused to write a value to memory. We can tell because just before it leaves the pause state, the mem_en signal goes high and the mem_rw signal goes low

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

CSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012 CSE 260 Digital Computers: Organization and Logical Design Exam 2 Jon Turner 3/28/2012 1. (15 points). Draw a diagram for a circuit that implements the VHDL module shown below. Your diagram may include

More information

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

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014 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

More information

Problem Set 10 Solutions

Problem Set 10 Solutions CSE 260 Digital Computers: Organization and Logical Design Problem Set 10 Solutions Jon Turner thru 6.20 1. The diagram below shows a memory array containing 32 words of 2 bits each. Label each memory

More information

Design Problem 4 Solutions

Design Problem 4 Solutions CSE 260 Digital Computers: Organization and Logical Design Design Problem 4 Solutions Jon Turner The block diagram appears below. The controller includes a state machine with three states (normal, movecursor,

More information

Introduction to Computer Design

Introduction to Computer Design Introduction to Computer Design Memory (W 800-840) Basic processor operation Processor organization Executing instructions Processor implementation using VHDL 1 Random Access Memory data_in address read/write

More information

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

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions 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),

More information

Design Problem 6 Solution

Design Problem 6 Solution CSE 260 Digital Computers: Organization and Logical Design Design Problem 6 Solution Jon Turner The modifications to the VHDL for the console appear below entity console end console; architecture a1 of

More information

CS/EE Homework 7 Solutions

CS/EE Homework 7 Solutions CS/EE 260 - Homework 7 Solutions 4/2/2001 1. (20 points) A 4 bit twisted ring counter is a sequential circuit which produces the following sequence of output values: 0000, 1000, 1100, 1110, 1111, 0111,

More information

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

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes) Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm

More information

Design Problem 5 Solution

Design Problem 5 Solution CSE 260 Digital Computers: Organization and Logical Design Design Problem 5 Solution Jon Turner Due 5/3/05 1. (150 points) In this problem, you are to extend the design of the basic processor to implement

More information

Design Problem 5 Solutions

Design Problem 5 Solutions CS/EE 260 Digital Computers: Organization and Logical Design Design Problem 5 Solutions Jon Turner Due 5/4/04 1. (100 points) In this problem, you will implement a simple shared memory multiprocessor system

More information

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines FINITE STATE MACHINES (FSMs) Classification: Moore Machine: Outputs depend only on the current state

More information

Design Problem 3 Solutions

Design Problem 3 Solutions CSE 260 Digital Computers: Organization and Logical Design Jon Turner Design Problem 3 Solutions In this problem, you are to design, simulate and implement a sequential pattern spotter, using VHDL. This

More information

In our case Dr. Johnson is setting the best practices

In our case Dr. Johnson is setting the best practices VHDL Best Practices Best Practices??? Best practices are often defined by company, toolset or device In our case Dr. Johnson is setting the best practices These rules are for Class/Lab purposes. Industry

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

Test Benches - Module 8

Test Benches - Module 8 Test Benches Module 8 Jim Duckworth, WPI 1 Overview We have concentrated on VHDL for synthesis Can also use VHDL as a test language Very important to conduct comprehensive verification on your design To

More information

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

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for

More information

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

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits M1 Informatique / MOSIG Introduction to Modeling and erification of Digital Systems Part 4: HDL for sequential circuits Laurence PIERRE http://users-tima.imag.fr/amfors/lpierre/m1arc 2017/2018 81 Sequential

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

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

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture Assignment Last time Project 4: Using synthesis tools Synplify Pro and Webpack Due 11/11 ning of class Generics Used to parameterize models E.g., Delay, bit width Configurations Configuration specification

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6 DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines Algorithmic State Machine (ASM) charts FINITE STATE MACHINES (FSMs) Classification: Moore Machine:

More information

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

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential

More information

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

Lecture 5: State Machines, Arrays, Loops. EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 5: State Machines, Arrays, Loops BCD to Excess-3 (XS 3 ) Code Converter Example: Fig. 2-53 2 Easier to use one type of code (e.g. XS 3 ) over the other type (e.g. BCD)

More information

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

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14 COE 405, Term 062 Design & Modeling of Digital Systems HW# 1 Solution Due date: Wednesday, March. 14 Q.1. Consider the 4-bit carry-look-ahead adder (CLA) block shown below: A 3 -A 0 B 3 -B 0 C 3 4-bit

More information

Review of Digital Design with VHDL

Review of Digital Design with VHDL Review of Digital Design with VHDL Digital World Digital world is a world of 0 and 1 Each binary digit is called a bit Eight consecutive bits are called a byte Hexadecimal (base 16) representation for

More information

Summary of FPGA & VHDL

Summary of FPGA & VHDL FYS4220/9220 Summary of FPGA & VHDL Lecture #6 Jan Kenneth Bekkeng, University of Oslo - Department of Physics 16.11.2011 Curriculum (VHDL & FPGA part) Curriculum (Syllabus) defined by: Lectures Lecture6:

More information

VHDL Notes for Week 4. VHDL Programming in CprE 381. Entity and Component 9/22/2014. Generic Constant. Test bench

VHDL Notes for Week 4. VHDL Programming in CprE 381. Entity and Component 9/22/2014. Generic Constant. Test bench VHDL Notes for Week 4 VHDL Programming in CprE 381 Generic Constant Entity and component Test bench Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 12/02/2013 Generic Constant Generic

More information

Simulation with ModelSim Altera from Quartus II

Simulation with ModelSim Altera from Quartus II Simulation with ModelSim Altera from Quartus II Quick Start Guide Embedded System Course LAP IC EPFL 2010 Version 0.5 (Preliminary) René Beuchat, Cagri Onal 1 Installation and documentation Main information

More information

Computer-Aided Digital System Design VHDL

Computer-Aided Digital System Design VHDL بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles

More information

CS232 VHDL Lecture. Types

CS232 VHDL Lecture. Types CS232 VHDL Lecture VHSIC Hardware Description Language [VHDL] is a language used to define and describe the behavior of digital circuits. Unlike most other programming languages, VHDL is explicitly parallel.

More information

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

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016 The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam Solution Spring 2016 1. (15 points) Write a VHDL function that accepts a std_logic_vector of arbitrary length and an integer

More information

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

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group Hardware Modeling VHDL Syntax Vienna University of Technology Department of Computer Engineering ECS Group Contents Identifiers Types & Attributes Operators Sequential Statements Subroutines 2 Identifiers

More information

Chapter 8 VHDL Code Examples

Chapter 8 VHDL Code Examples APPENDIX I Chapter 8 VHDL Code Examples I.1 Introduction Two example VHDL code designs are presented in Chapter 8, the first for controlling the AD7524 digital-to-analogue converter and the second for

More information

Sequential Statement

Sequential Statement Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential

More information

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1 DIGITAL LOGIC WITH VHDL (Fall 23) Unit DESIGN FLOW DATA TYPES LOGIC GATES WITH VHDL TESTBENCH GENERATION DESIGN FLOW Design Entry: We specify the logic circuit using a Hardware Description Language (e.g.,

More information

Mid-Term Exam Solutions

Mid-Term Exam Solutions CS/EE 26 Digital Computers: Organization and Logical Design Mid-Term Eam Solutions Jon Turner 3/3/3. (6 points) List all the minterms for the epression (B + A)C + AC + BC. Epanding the epression gives

More information

7 PROGRAMMING THE FPGA Simon Bevan

7 PROGRAMMING THE FPGA Simon Bevan 7 PROGRAMMING THE FPGA Simon Bevan 7.1 VHDL The FPGA chip can be programmed using a language called VHDL. VHDL is a hardware description language for describing digital designs. It originated from a government

More information

[VARIABLE declaration] BEGIN. sequential statements

[VARIABLE declaration] BEGIN. sequential statements PROCESS statement (contains sequential statements) Simple signal assignment statement

More information

Sequential Logic - Module 5

Sequential Logic - Module 5 Sequential Logic Module 5 Jim Duckworth, WPI 1 Latches and Flip-Flops Implemented by using signals in IF statements that are not completely specified Necessary latches or registers are inferred by the

More information

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

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points) 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

More information

Lecture 10 Subprograms & Overloading

Lecture 10 Subprograms & Overloading CPE 487: Digital System Design Spring 2018 Lecture 10 Subprograms & Overloading Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 Subprograms

More information

Lecture 12 VHDL Synthesis

Lecture 12 VHDL Synthesis CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

More information

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

5. VHDL - Introduction - 5. VHDL - Design flow - 5. VHDL - Entities and Architectures (1) - 5. VHDL - Entities and Architectures (2) - Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática - Introduction - VHDL was developed, in the mid-1980s, by DoD and IEEE. VHDL stands

More information

Inferring Storage Elements

Inferring Storage Elements Inferring Storage Elements In our designs, we usually use flip-flops as our storage elements. Sometimes we use latches, but not often. Latches are smaller in size, but create special, often difficult situations

More information

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

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 8, 2006 Midterm Average: 70 Lecture 16: Midterm Solutions Homework 6: Calculator Handshaking HW 6: Due Wednesday, November

More information

Control and Datapath 8

Control and Datapath 8 Control and Datapath 8 Engineering attempts to develop design methods that break a problem up into separate steps to simplify the design and increase the likelihood of a correct solution. Digital system

More information

Constructing VHDL Models with CSA

Constructing VHDL Models with CSA Constructing VHDL Models with CSA List all components (e.g., gate) inclusive propagation delays. Identify input/output signals as input/output ports. All remaining signals are internal signals. Identify

More information

Problem Set 1 Solutions

Problem Set 1 Solutions CSE 260 Digital Computers: Organization and Logical Design Jon Turner Problem Set 1 Solutions 1. Give a brief definition of each of the following parts of a computer system: CPU, main memory, floating

More information

Introduction to VHDL #3

Introduction to VHDL #3 ECE 322 Digital Design with VHDL Introduction to VHDL #3 Lecture 7 & 8 VHDL Modeling Styles VHDL Modeling Styles Dataflow Concurrent statements Structural Components and interconnects Behavioral (sequential)

More information

Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003

Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003 Experiment 0 OR3 Gate ECE 332 Section 000 Dr. Ron Hayne June 8, 2003 On my honor I have neither received nor given aid on this report. Signed: Ronald J. Hayne Part I Description of the Experiment Experiment

More information

CprE 583 Reconfigurable Computing

CprE 583 Reconfigurable Computing Recap Moore FSM Example CprE / ComS 583 Reconfigurable Computing Moore FSM that recognizes sequence 10 0 1 0 1 S0 / 0 S1 / 0 1 S2 / 1 Prof. Joseph Zambreno Department of Electrical and Computer Engineering

More information

EE434 ASIC & Digital Systems

EE434 ASIC & Digital Systems EE434 ASIC & Digital Systems VHDL Sequential Processing Spring 2016 Dae Hyun Kim daehyun@eecs.wsu.edu 1 Sequential Statements Sequential statements are executed sequentially. Format ARCHITECTURE architecture_name

More information

VHDL Testbench VHDL Testbench NO Synthesis Test Vectors Input Vector Output Vector Expected Vector UUT : Unit Under Test Clock Generator Error Report Utility 1 Library : STD Library for Testbench use std.standard.all;

More information

CDA 4253 FPGA System Design VHDL Testbench Development. Hao Zheng Comp. Sci & Eng USF

CDA 4253 FPGA System Design VHDL Testbench Development. Hao Zheng Comp. Sci & Eng USF CDA 4253 FPGA System Design VHDL Testbench Development Hao Zheng Comp. Sci & Eng USF art-4- > 70% projects spent > 40% time in verification 2 Validation, Verification, and Testing Validation: Does the

More information

VHDL Simulation. Testbench Design

VHDL Simulation. Testbench Design VHDL Simulation Testbench Design The Test Bench Concept Elements of a VHDL/Verilog testbench Unit Under Test (UUT) or Device Under Test (DUT) instantiate one or more UUT s Stimulus of UUT inputs algorithmic

More information

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering

EENG 2910 Project III: Digital System Design. Due: 04/30/2014. Team Members: University of North Texas Department of Electrical Engineering EENG 2910 Project III: Digital System Design Due: 04/30/2014 Team Members: University of North Texas Department of Electrical Engineering Table of Content i Contents Abstract...3 Introduction...3 Report...4

More information

Altera s Avalon Communication Fabric

Altera s Avalon Communication Fabric Altera s Avalon Communication Fabric Stephen A. Edwards Columbia University Spring 2012 Altera s Avalon Bus Something like PCI on a chip Described in Altera s Avalon Memory-Mapped Interface Specification

More information

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

Solutions - Homework 4 (Due date: November 9:30 am) Presentation and clarity are very important! DPARTMNT OF LCTRICAL AND COMPUTR NGINRING, TH UNIVRSITY OF NW MXICO C-38L: Computer Logic Design Fall 3 Solutions - Homework 4 (Due date: November 6th @ 9:3 am) Presentation and clarity are very important!

More information

Contents. Chapter 9 Datapaths Page 1 of 28

Contents. Chapter 9 Datapaths Page 1 of 28 Chapter 9 Datapaths Page of 2 Contents Contents... 9 Datapaths... 2 9. General Datapath... 3 9.2 Using a General Datapath... 5 9.3 Timing Issues... 7 9.4 A More Complex General Datapath... 9 9.5 VHDL for

More information

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 Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution 5.3(a)(2), 5.6(c)(2), 5.2(2), 8.2(2), 8.8(2) The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 25 Homework #6 Solution 5.3 (a) For the following SM chart:

More information

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

The block diagram representation is given below: The output equation of a 2x1 multiplexer is given below: Experiment-3: Write VHDL programs for the following circuits, check the wave forms and the hardware generated a. multiplexer b. De-Multiplexer Objective: i. To learn the VHDL coding for Multiplexer and

More information

ENGR 5865 DIGITAL SYSTEMS

ENGR 5865 DIGITAL SYSTEMS ENGR 5865 DIGITAL SYSTEMS ModelSim Tutorial Manual January 22, 2007 Introduction ModelSim is a CAD tool widely used in the industry for hardware design. This document describes how to edit/add, compile

More information

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

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design Two HDLs used today Introduction to Structured VLSI Design VHDL I VHDL and Verilog Syntax and ``appearance'' of the two languages are very different Capabilities and scopes are quite similar Both are industrial

More information

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

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden Synthesis from VHDL Krzysztof Kuchcinski Krzysztof.Kuchcinski@cs.lth.se Department of Computer Science Lund Institute of Technology Sweden March 23, 2006 Kris Kuchcinski (LTH) Synthesis from VHDL March

More information

Quartus Counter Example. Last updated 9/6/18

Quartus Counter Example. Last updated 9/6/18 Quartus Counter Example Last updated 9/6/18 Create a logic design from start to a DE10 implementation This example uses best design practices This example is not about creating HDL The HDL code will be

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 1.2.2: VHDL-1 Liang Liu liang.liu@eit.lth.se 1 Outline VHDL Background Basic VHDL Component An example FSM Design with VHDL Simulation & TestBench 2

More information

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

Sign here to give permission to return your test in class, where other students might see your score: EEL 4712 Midterm 1 Spring 2017 VERSION 1 Name: UFID: Sign here to give permission to return your test in class, where other students might see your score: IMPORTANT: Please be neat and write (or draw)

More information

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

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL VHDL Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL Alternative (Student Generated) Definition Very Hard Digital Logic language VHDL Design

More information

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN

Lecture 9. VHDL, part IV. Hierarchical and parameterized design. Section 1 HIERARCHICAL DESIGN Lecture 9 VHDL, part IV Hierarchical and parameterized design Section 1 HIERARCHICAL DESIGN 2 1 Dealing with Large Digital System Design 1. Apply hierarchy to the design At the highest level use larger

More information

Very High Speed Integrated Circuit Har dware Description Language

Very High Speed Integrated Circuit Har dware Description Language Very High Speed Integrated Circuit Har dware Description Language Industry standard language to describe hardware Originated from work in 70 s & 80 s by the U.S. Departm ent of Defence Root : ADA Language

More information

Introduction to VHDL #1

Introduction to VHDL #1 ECE 3220 Digital Design with VHDL Introduction to VHDL #1 Lecture 3 Introduction to VHDL The two Hardware Description Languages that are most often used in industry are: n VHDL n Verilog you will learn

More information

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

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ CSCI 250 - Lab 3 VHDL Syntax Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ Objectives 1. Learn VHDL Valid Names 2. Learn the presentation of Assignment and Comments 3. Learn Modes, Types, Array,

More information

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

Multiplication Simple Gradeschool Algorithm for 16 Bits (32 Bit Result) Multiplication Simple Gradeschool Algorithm for 16 Bits (32 Bit Result) Input Input Multiplier Multiplicand AND gates 16 Bit Adder 32 Bit Product Register Multiplication Simple Gradeschool Algorithm for

More information

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs

DIGITAL LOGIC DESIGN VHDL Coding for FPGAs IGITAL LOGIC SIGN VHL Coding for FPGAs SUNTIAL CIRCUITS Unit 5 Asynchronous sequential circuits: Latches Synchronous circuits: flip flops, counters, registers. Testbench: Generating stimulus COMBINATIONAL

More information

Test Bench. Top Level Model Test Bench MUT

Test Bench. Top Level Model Test Bench MUT A test bench is usually a simulation-only model used for design verification of some other model(s) to be synthesized. A test bench is usually easier to develop than a force file when verifying the proper

More information

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

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003 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

More information

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

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language VHDL Introduction to Structured VLSI Design VHDL I Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Joachim Rodrigues A Technology Independent, Standard Hardware description Language

More information

Getting Started with VHDL

Getting Started with VHDL Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component Entities can be primitive objects or complex objects Architectures are associated

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)

More information

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

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 6, 2006 Classes November 6 and 8 are in 429 Dana! Lecture 15: Homework 5: Datapath How to write a testbench for synchronous

More information

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

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles ECE 448 Lecture 4 Sequential-Circuit Building Blocks Mixing Description Styles George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 4, Regular Sequential Circuit Recommended

More information

Subprograms, Packages, and Libraries

Subprograms, Packages, and Libraries Subprograms, Packages, and Libraries Sudhakar Yalamanchili, Georgia Institute of Technology ECE 4170 (1) function rising_edge (signal clock: std_logic) return boolean is declarative region: declare variables

More information

Pollard s Tutorial on Clocked Stuff in VHDL

Pollard s Tutorial on Clocked Stuff in VHDL Pollard s Tutorial on Clocked Stuff in VHDL Welcome to a biased view of how to do register type of stuff in VHDL. The object of this short note is to identify one way to easily handle registered logic

More information

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

The University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2016 The University of Alabama in Huntsville ECE Department CPE 526 01 Final Exam Solution Spring 2016 1. (6 points) Draw the transistor-level diagram of a two input CMOS NAND gate. VCC x y z f x y GND 2. (5

More information

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices

ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices ENGG3380: Computer Organization and Design Lab4: Buses and Peripheral Devices School of Engineering, University of Guelph Winter 2017 1 Objectives: The purpose of this lab is : Learn basic bus design techniques.

More information

VHDL for Modeling - Module 10

VHDL for Modeling - Module 10 VHDL for Modeling Module 10 Jim Duckworth, WPI 1 Overview General examples AND model Flip-flop model SRAM Model Generics DDR SDRAM Model Constraints Metastability Block Statements Just for reference Jim

More information

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

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language) Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits Hardware Description Language) 1 Standard ICs PLD: Programmable Logic Device CPLD: Complex PLD FPGA: Field Programmable

More information

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

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important! ECE-8L: Computer Logic Design Fall Solutions - Homework (Due date: October rd @ 9: am) Presentation and clarit are ver important! PROBLEM ( PTS) Complete the following table. Use the fewest number of bits

More information

ECE 545 Lecture 4. Simple Testbenches. George Mason University

ECE 545 Lecture 4. Simple Testbenches. George Mason University ECE 545 Lecture 4 Simple Testbenches George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 2.2.4, Testbenches 2 Testbenches ECE 448 FPGA and ASIC Design with VHDL 3 Testbench

More information

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

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University Hardware description language (HDL) Intended to describe circuits textually, for a computer to read Evolved starting in the 1970s and 1980s Popular languages today include: VHDL Defined in 1980s by U.S.

More information

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

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic CPE 626 Lecture 6: VHDL Synthesis Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and Computer Engineering

More information

Hardware Description Language VHDL (1) Introduction

Hardware Description Language VHDL (1) Introduction Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for

More information

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

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2 VHDL 2 Combinational Logic Circuits Reference: Roth/John Text: Chapter 2 Combinational logic -- Behavior can be specified as concurrent signal assignments -- These model concurrent operation of hardware

More information

Simulation with ModelSim Altera from Quartus II

Simulation with ModelSim Altera from Quartus II Simulation with ModelSim Altera from Quartus II Quick Start Guide Embedded System Course LAP IC EPFL 2010 Version 0.6 (Preliminary) René Beuchat, Cagri Onal 1 Installation and documentation Main information

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions library ieee; use ieee.std_logic_1164.all; use work.std_arith.all; -- here is the declaration of entity entity la_rewarder is port (clk, go, SRAM_busy, SRAM_rdy: in std_logic; min:

More information

Contents. Appendix D VHDL Summary Page 1 of 23

Contents. Appendix D VHDL Summary Page 1 of 23 Appendix D VHDL Summary Page 1 of 23 Contents Appendix D VHDL Summary...2 D.1 Basic Language Elements...2 D.1.1 Comments...2 D.1.2 Identifiers...2 D.1.3 Data Objects...2 D.1.4 Data Types...2 D.1.5 Data

More information

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

CSC / EE Digital Systems Design. Summer Sample Project Proposal 01 THE CATHOLIC UNIVERSITY OF AMERICA SCHOOL OF ENGINEERING DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE CSC / EE 519-01 Digital Systems Design Summer 2013 Sample Project Proposal 01 Thursday

More information

Lab 3. Advanced VHDL

Lab 3. Advanced VHDL Lab 3 Advanced VHDL Lab 3 Advanced VHDL This lab will demonstrate many advanced VHDL techniques and how they can be used to your advantage to create efficient VHDL code. Topics include operator balancing,

More information

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD.

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. Tim Böscke, cpldcpu@opencores.org 02/2001 - Revised 10/2004 This documents describes a successful attempt to fit a simple VHDL - CPU into a 32 macrocell

More information

HDL. Hardware Description Languages extensively used for:

HDL. Hardware Description Languages extensively used for: HDL Hardware Description Languages extensively used for: Describing (digital) hardware (formal documentation) Simulating it Verifying it Synthesizing it (first step of modern design flow) 2 main options:

More information