Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Similar documents
Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II

CCE 3202 Advanced Digital System Design

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

Mridula Allani Fall Fall

VHDL Examples Mohamed Zaky

C-Based Hardware Design

Basic Language Concepts

Concurrent Signal Assignment Statements (CSAs)

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Hardware Description Language VHDL (1) Introduction

EE261: Intro to Digital Design

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

Digital Systems Design

Getting Started with Xilinx WebPack 13.1

2/14/2016. Hardware Synthesis. Midia Reshadi. CE Department. Entities, Architectures, and Coding.

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

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

CCE 3202 Advanced Digital System Design

Hardware Synthesis. References

TUTORIAL On USING XILINX ISE FOUNDATION DESIGN TOOLS: Mixing VHDL and Schematics

Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

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

Department of Electrical and Computer Engineering Xilinx ISIM <Release Version: 14.1i> Simulation Tutorial Using Verilog

Introduction to Verilog

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

PART I BASIC DIGITAL CIRCUITS

Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28

Lecture 5: Aldec Active-HDL Simulator

ENGIN 241 Digital Systems with Lab

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

1. Defining and capturing the design of a system. 2. Cost Limitations (low profit margin must sell millions)

Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

101-1 Under-Graduate Project Digital IC Design Flow

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

Introduction to VHDL. Main language concepts

Computer-Aided Digital System Design VHDL

Introduction to VHDL #3

VHDL: A Crash Course

Tutorial on VHDL Compilation, Simulation, and Synthesis

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

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

Lecture 3 Introduction to VHDL

Chapter 6 Combinational-Circuit Building Blocks

Experiment 8 Introduction to VHDL

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

CMPT 250: Computer Architecture. Using LogicWorks 5. Tutorial Part 1. Somsubhra Sharangi

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

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

Xilinx Schematic Entry Tutorial

EITF35: Introduction to Structured VLSI Design

CS221: VHDL Models & Synthesis

INTRODUCTION TO VHDL. Lecture 5 & 6 Dr. Tayab Din Memon Assistant Professor Department of Electronic Engineering, MUET

FPGA Design Flow. - from HDL to physical implementation - Victor Andrei. Kirchhoff-Institut für Physik (KIP) Ruprecht-Karls-Universität Heidelberg

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

Review of Digital Design with VHDL

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

Hardware description languages

Embedded Systems CS - ES

Digitaalsüsteemide disain

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

A Brief Introduction to Verilog Hardware Definition Language (HDL)

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

VHDL. Chapter 1 Introduction to VHDL. Course Objectives Affected. Outline

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

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

ELEC 204 Digital System Design LABORATORY MANUAL

Constructing VHDL Models with CSA

Verilog Design Entry, Synthesis, and Behavioral Simulation

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

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

Lab. Course Goals. Topics. What is VLSI design? What is an integrated circuit? VLSI Design Cycle. VLSI Design Automation

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Sudhakar Yalamanchili, Georgia Institute of Technology, 2006

DESIGN STRATEGIES & TOOLS UTILIZED

6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language:

HDL Interoperability & IP-based System Verification

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

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

VHDL VS VERILOG.

Verilog for Combinational Circuits

Introduction to VHDL. Yvonne Avilés Colaboration: Irvin Ortiz Flores Rapid System Prototyping Laboratory (RASP) University of Puerto Rico at Mayaguez

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

Module 2.1 Gate-Level/Structural Modeling. UNIT 2: Modeling in Verilog

Design units can NOT be split across different files

Lecture 14 Test Bench Design

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices

Lab 3: FPGA and VLSI Design

Hardware Description Languages (HDLs) Verilog

COE 405 Design Methodology Based on VHDL

Introduction to Verilog HDL. Verilog 1

COS/ELE 375 Verilog & Design Tools Tutorial

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

LECTURE 4: The VHDL N-bit Adder

VHDL VITAL. Simulation Guide For Libero SoC v11.8

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25

Transcription:

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Ahmed Abu-Hajar, Ph.D. abuhajar@digitavid.net Digitavid, Inc San Jose, CA

Session One Outline Introducing VHDL and Top-Down Design Our First VHDL code Introducing Xilinx Project Navigator Introducing ModelSim

Introduction to VHDL VHDL: Very Large Scale Integrated Circuit Hardware Description Language Initially sponsored by DOD then standardized by IEEE in 1987 and was improved in 1993. VHDL is used for Synthesis construct and implement a design on silicon VHDL is used for Simulation to imitate real world scenarios for verification. a b c d Sum of product Example f = ab + cd f

Types of HDL Designs Structural Level Design: Detailed description of the interconnection between components within a module. Behavioral Level Design: Provides behavioral description of the module Three types: Algorithmic: procedural to model the behavior of the module Data Flow: Describe how data moving between registers. Mixed: combines both.

Top-Down Design Very efficient Utilizes library reuse Specification System Sub-system Register Gate Transistor

Our First VHDL Code library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity my_first code is Port ( a : in std_logic; b : in std_logic; f : out std_logic); end my_first_code; architecture Behavioral of my_first_code is begin f <= (a and b) or (c and d); end Behavioral; a b c d f = ab + cd f

Dissecting our First VHDL Code IEEE library is pre-defined library with many packages. Here we are using the std_logic_1164 Other predefined libraries will be used You may create your own libraries We tend to use libraries supplied by third party vendors library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity my_first_code is Port ( a : in std_logic; b : in std_logic; f : out std_logic); end my_first_code; architecture Behavioral of my_first_code is begin f <= a and b; end Behavioral;

Dissecting our First VHDL Code Entity indicates the beginning of the entity. (Required) Generic passes parameters from local higher level modules and it uses them as generic parameters. Handy for delay Modeling. Why? (Optional) Is is a keyword indicates the beginning of the content of entity in this case. (Required) entity entity_name is generic ( passed parameters); port ( inputs and outputs); Begin -- only if statements used statements -- passive statements -- (generally not used) end entity_name; End indicates the end of this entity. (Required) Port defines inputs and output ports (pins) of this entity. (Optional) library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity my_first_code is Port ( a : in std_logic; b : in std_logic; f : out std_logic); end my_first_code; architecture Behavioral of first_code is begin a f <= a and b; end bbehavioral; my_first_code c d f

More on Entity ( Example) Created an entity called my_and_3_inputs The port has three inputs in and one output out Ports may be defines as: 1- In 2- Out entity my_and_3_inputs is generic ( Time_delay1 :Time := 25ns; Time_delay2 :Time := 10ns); port ( a,b,c : in bit; f : out bit ); end my_and_3_inputs; Two generic parameters Time_delay1 & Time_delay2 of data type TIME and set equal to 25ns and 10ns. Pay attention to ; and ) 3- inout Most basic data type bit has binary values 0 and 1. Other data types defined by IEEE standard such as std_logic, and std_logic_vector, which have seven values.

Dissecting our First VHDL Code Architecture Syntax Architecture indicates the beginning of the architecture. (Required) Intermediate signals and components declarations (optional) Begin State the beginning of the architecture (Required) This architecture binds to my_first _code ENTITY architecture arch_name of entity_name is Signal declarations Components declarations begin Statements; end Behavioral; Statements and signal assignments End indicates the end of the architecture. (Required) Is is a keyword indicates the library IEEE; beginning of use IEEE.STD_LOGIC_1164.ALL; architecture entity my_first_code is Port ( a : in std_logic; b : in std_logic; f : out std_logic); end my_first_code; architecture Behavioral of my_first_code is begin f <= (a and b) or (c and d); end Behavioral;

More on Architecture ( Example) Signals are declared after architecture before Begin Architecture srtuct of my_and_three_inputs is signal W: bit; begin W <= a and b; f <= W and c; End struct; Pay attention to ;, <= and )

Xilinx Example: Create New Project We would like to design a full adder using Xilinx s Project Navigator. a b cin a Full_Adder W Sum cout Open Project Navigator Create new Project (Workshop_Day_One) b cin a b cin a X Y sum cout b cin Z

Xilinx Example: Create New Project Open Project Navigator FILE new Project Enter project name: Workshop_Day_One

Xilinx Example: Create New Project Open Project Navigator FILE new Project Enter project name: Workshop_Day_One Similator select ModelSimXE VHDL The perfered language select VHDL

Xilinx Example: Create New Project Open Project Navigator FILE new Project Enter project name: Workshop_Day_One Similator select ModelSimXE VHDL The perfered language select VHDL Source name enter New Source Select VHDL Module Enter module name MY_Full_Adder

Xilinx Example: Create New Project Source Editor Process Console

Xilinx Example: VHDL Code In the architecture section enter this code architecture Behavioral of My_Full_Adder is signal W, X, Y, Z : std_logic; begin -- Sum W <= a xor b; sum <= W xor cin; -- X <= a and b; Y <= a and cin; Z <= b and cin; -- Cout Cout <= X or Y or Z; end Behavioral; a b cin a b cin a b cin W X Y Z sum cout

Xilinx Example: Create Test Bench Go to process window and double click synthesize-xst If your code is error free synthesize-xst shows a check sign, else it shows an X sign Expand the synthesize and click on the View RTL Schematic Project Navigator have synthesized the code as shown

Xilinx Example: Create Test Bench Go to Project New Source Select VHDL Test Bench In the file name enter Testing_my_full_adder Select MY_FULL_Adder to be the associated source You are ready to verify your design

Xilinx Example: Verification ModelSim is a simulation tool used to verify design. Test bench files used to verify designs. New terms: Module Under Test (MUT) is the module needed to be tested. MUT is a component embedded within the test bench Input Test Vector is sent to MUT The Output Test Vector is verified against ideal output MUT Test Bench

Xilinx Example: Test Bench Component declaration in the test bench file for the MUT is needed In our example the MUT is my_full_adder ARCHITECTURE behavior OF Testing_my_full_adder_vhd IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT My_Full_Adder PORT( a, b, cin : IN std_logic; Sum, Cout : OUT std_logic); END COMPONENT; -test vectors ( input and output) SIGNAL a,b,cin, sum, cout : std_logic := '0'; BEGIN Architecture Declaration Component Declaration Signal Declaration Note: Component Declaration must use the same port name as the original. The component may be called as many times in the body hierarchical structure

Xilinx Example: Test Bench The body of the architecture calls the (MUT) Component Assigns the input test vector to the module under test using PORT MAP The values of the input test vectors are assigned BEGIN -- Instantiate the Unit Under Test (UUT) uut: My_Full_Adder PORT MAP (a => a1, b => b,cin => cin, Sum => Sum, Cout => Cout ); -- Test input vector assignment a1 <= '1' after 10ns, '1' after 20ns; b <='1' after 5ns, '0' after 10ns, '1' after 15ns, '0' after 20ns; cin <= '1' after 2.5ns, '0' after 5ns, '1' after 7.5ns, '0' after 10ns,'1' after 12.5ns, '0' after 15ns, '1' after 17.5ns, '0' after 20ns; END; Body Of TB

Xilinx Example: Test Bench Save your Test bench File Go to Source For Behavioral Simulation Behavioral is the architecture name Double click on ModelSim Simulator and then on Simulate Behavioral Model ModelSim is automatically loaded. If no errors were found in your test bench file, the simulation graph is already loaded

ModelSim: Test Bench Click on the (+) Explore the simulation Interface