Simulate the Design using the XSim Simulator

Similar documents
Vivado Tutorial. Introduction. Objectives. Procedure. Lab Workbook. Vivado Tutorial

Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Vivado Tutorial. Introduction. Objectives. Procedure

Experiment VERI: FPGA Design with Verilog (Part 2) (webpage: /)

Vivado Walkthrough ECGR Fall 2015

ISE Simulator (ISim) In-Depth Tutorial. UG682 (v 13.1) March 1, 2011

Vivado Design Suite Tutorial: Logic Simulation

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

ENGN 1630: CPLD Simulation Fall ENGN 1630 Fall Simulating XC9572XLs on the ENGN1630 CPLD-II Board Using Xilinx ISim

Xilinx Schematic Entry Tutorial

Using Synplify Pro, ISE and ModelSim

Tutorial 2. Building a Database and Defining Table Relationships

LAB 6 Testing the ALU

ISim In-Depth Tutorial. UG682 (v13.4) January 18, 2012

Basic HLS Tutorial. using C++ language and Vivado Design Suite to design two frequencies PWM. modulator system

ENGR 5865 DIGITAL SYSTEMS

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

JEE2600 INTRODUCTION TO DIGITAL LOGIC AND COMPUTER DESIGN. ModelSim Tutorial. Prepared by: Phil Beck 9/8/2008. Voter Function

University of California, Davis Department of Electrical and Computer Engineering. Lab 1: Implementing Combinational Logic in the MAX10 FPGA

Tutorial: Working with the Xilinx tools 14.4

Getting Started with Xilinx WebPack 13.1

ELEC 4200 Lab#0 Tutorial

Tutorial: Pattern Wizard

Cadence Verilog Simulation Tutorial Mark L. Chang Last revision: September 18, 2005 Cadence version: Cadence IUS s011

ISim Hardware Co-Simulation Tutorial: Accelerating Floating Point FFT Simulation

Introduction to Xilinx Vivado tools

Adding the ILA Core to an Existing Design Lab

2IN35 VLSI Programming Lab Work Assignment 1: Hardware design using Verilog

CADENCE TUTORIAL. San Diego State University, Department of Electrical and Computer Engineering. Amith Dharwadkar and Ashkan Ashrafi

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

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

Xilinx ISE Simulation Tutorial

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

Using ModelSim to Simulate Logic Circuits in VHDL Designs. 1 Introduction. For Quartus II 13.0

Introduction to Simulation of VHDL Designs Using ModelSim Graphical Waveform Editor. 1 Introduction. For Quartus Prime 16.1

25Live Custom Report Integration

University of Toronto ECE532 Digital Hardware Module m07: Using ModelSim to Simulate Your Designs

ISim Hardware Co-Simulation Tutorial: Accelerating Floating Point FFT Simulation

FPGA Design Tutorial

Dealing with Event Viewer

Vivado Design Suite User Guide

University Program 3 Kit

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

Simulation Lab 7 Use ISE to Auto-Generate Testbench Simulations

After opening the Programs> Xilinx ISE 8.2i > Project Navigator, you will come to this screen as start-up.

SOPC LAB1. I. Introduction. II. Lab contents. 4-bit count up counter. Advanced VLSI Due Wednesday, 01/08/2003

ECE 546 HOMEWORK No 10 Due Thursday, April 19, yes last

Xilinx Tutorial Basic Walk-through

ENSC 350 ModelSim Altera Tutorial

25Live Custom Report Integration

Compile your code using ncvhdl. This is the way to compile comp_const.vhd:! "#$ %" #&'

MATLAB AND MODELSIM LINKING

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Chapter 1. OrCAD/ModelSim Tutorial for CPLDs. Design Description

Introduction to Verilog and XILINX

LOCAL FLEET TRACKING. Quick Start Guide

Filtering - Zimbra

Using ModelSim to Simulate Logic Circuits for Altera FPGA Devices

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

SharePoint AD Administration Tutorial for SharePoint 2007

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim

Cadence NC-Verilog Simulator Tutorial. Product Version 5.1 September 2003

VIVADO TUTORIAL- TIMING AND POWER ANALYSIS

EE4702 Informal Cadence Verilog Simulation Guide

Department of Electrical and Computer Engineering State University of New York, Stony Brook

Application Note: AN00194 Getting Started with VCD Tracing in xtimecomposer

TDTS01. Computer Aided Design of Electronics. Lab Compendium

Using the KD30 Debugger

Adding Custom IP to the System

Engineering 1630 Fall Simulating XC9572XL s on the ENGN1630 CPLD-II Board

Lab 7 (All Sections) Prelab: Introduction to Verilog

High Speed Memory Interfacing 800MHz DDR3 Memory Lab

Reactive Test Bench Tutorial 1

1 1-Introduction: 2 FIFO Overview (Part 1 = 40 pts.) generic Fig. 1: FIFO Architecture

Behavioral Modeling and Timing Constraints

CPEN 230L: Introduction to Digital Logic Laboratory Lab 7: Multiplexers, Decoders, and Seven Segment Displays

Viewing and Troubleshooting Perfmon Logs

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

University of Twente. VHDL tutorial For internal use only. Faculty of Electrical Engineering, Mathematics and Computer Science. E.

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

New Perspectives on PowerPoint Module 2: Adding Media and Special Effects

SCHEMATIC DESIGN IN QUARTUS

OneNote. Using OneNote on the Desktop. Starting screen. The OneNote interface the Ribbon

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation

Tutorial: Introduction to Flow Graph

1 Introduction to MARS

Microsoft Access 2010

Icarus Verilog HDL (iverilog)

Vivado Design Suite Tutorial. Designing with IP

VHDL Tutorial. Cadence Setup Instructions for setting up Cadence tools is provided on the webpage.

SmartTime for Libero SoC v11.5

Simulating a Design Circuit Using Qsim

Design Flow Tutorial

TUTORIAL #2 HIERARCHICAL DESIGNS AND TEST FIXTURES

ISim User Guide. UG660 (v14.2) July 25, 2012

Basic Xilinx Design Capture. Objectives. After completing this module, you will be able to:

Transcription:

Simulate the Design using the XSim Simulator This tutorial guides you through the simulation flow using Xsim simulator within Vivado design environment. In this tutorial, you will simulate the workings of an example Verilog code. The example code, which is provided on the course s reference webpage, is for a 4-bit counter with set and reset options. The counter is reset (counter=0) when the reset signal is asserted; the counter is set (counter=15) when the set signal is asserted and otherwise the counter counts up on every clock cycle. To simulate the behavior of the counter, a test bench file is needed which provides the timing for all input signals to the counter (clock, set and reset). Using this test bench in the Xsim simulator, you can observe the behavior of the Verilog code for the counter. To complete this example, you will need both the counter Verilog code and test bench file. Both of these files are located on the course s reference webpage page. Here are all the steps you will need to do to simulate your design. 1. Start a new project in Vivado and use the example Verilog code for the counter. This code is provided on the reference page of the course s website. Make sure that the project synthetizes without any errors. If there are errors, try to fix them before proceeding with simulating the behavior of the module. Here is a copy of the counter module, which can also be found on the course s reference webpage.

2. To initiate the simulation click Add Sources under the Project Manager tasks of the Flow Navigator pane. 3. Select the Add or Create Simulation Sources option and click Next. 4. In the Add Sources form, click the Add Files button.

5. Browse to the directory where you have downloaded the counter_tb.v file. Select the Copy sources into project. Once you select this option, your test bench file will be copied into a directory structure that Vivado likes to organize its files. This way, you don t have to worry where exactly the test bench file should be placed. If you selected the option to create a new teste bench in the previous window then Vivado will automatically generate the necessary directory structure for simulating your design. The Add Sources should look like this. In our case, the test bench file was in the c:/users/sblair/downloads directory. 6. Click Finish. 7. Select the Sources tab and expand the Simulation Sources group. The counter_tb.v file is added under the Simulation Sources group, and counter.v is automatically placed in its hierarchy.

8. Double-click on the counter_tb in the Sources pane to view its contents. The test bench defines the simulation step size and the resolution in line 1. The test bench module definition begins on line 5. Lines 23 through 64 define the stimuli generation. In this simulation, we are generating a clock signal with 5 nsec duty cycle, which is not important for the simulation presented in this tutorial. Several different combinations of sets and resets are tested for different time durations. Line 66 ends the test bench.

Simulate the design for 200 ns using the XSim simulator. 1. Select Simulation Settings under the Project Manager tasks of the Flow Navigator pane. A Project Settings form will appear showing the Simulation properties form. See the window below regarding this step: 2. Select the Simulation tab, and set the Simulation Run Time value to 200 ns. The window should look like the one below. Click OK.

3. Click on Run Simulation > Run Behavioral Simulation under the Project Manager tasks of the Flow Navigator pane. The testbench and source files will be compiled and the XSim simulator will be run (assuming no errors). You will see a simulator output similar to the one shown below. You will see four main views: (i) Scopes, where the testbench hierarchy as well as glbl instances are displayed, (ii) Objects, where top-level signals are displayed, (iii) the waveform window, and (iv) Tcl Console where the simulation activities are displayed. Notice that since the testbench used is self-checking, the results are displayed as the simulation is run. 4. Click on the Zoom Fit button located left of the waveform window to see the entire waveform.

Notice that the output changes when the input changes. You can also float the simulation waveform window by clicking on the Float button on the upper right-hand side of the view. This will allow you to have a wider window to view the simulation waveforms. To reintegrate the floating window back into the GUI, simply click on the Dock Window button.

Change display format if desired. Select count[3:0] in the waveform window, right-click, select Radix, and then select Unsigned Decimal to view the for-loop index in integer form. You can use other formats if desired in the future. This is how the new waveforms are displayed in the waveform window:

Add more signals to monitor lower-level signals and continue to run the simulation for 500 ns. 1. Expand the counter_tb instance, if necessary, in the Scopes window and select the counter1 instance. 2. Several signals will be displayed in the Objects window as shown above. 3. Select count_internal[3:0] and drag them into the waveform window to monitor those lower level signals. 4. On the simulator tool buttons ribbon bar, type 1 us in the time window, click on the dropdown button of the units field and select ns, and click on the Relaunch Simulation button.

5. The simulation will run for an additional 1 micro second 6. Click on the Zoom Fit button and observe the output. 7. Close the simulator by selecting File > Close Simulation. 8. Click OK and then click No to close it without saving the waveform.