Simulink ® Interface Course 13 Active-HDL Interfaces.

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Advertisements

© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
Using Macros and Visual Basic for Applications (VBA) with Excel
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Integrated Circuits Laboratory Faculty of Engineering Digital Design Flow Using Mentor Graphics Tools Presented by: Sameh Assem Ibrahim 16-October-2003.
© 2003 Xilinx, Inc. All Rights Reserved Looking Under the Hood.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Simulink ® From Simulink® 7 Getting Started Guide.
ADVANCED MICROSOFT POWERPOINT Lesson 6 – Creating Tables and Charts
© 2011 Xilinx, Inc. All Rights Reserved Intro to System Generator This material exempt per Department of Commerce license exception TSU.
Design Verification Design Profiler Course 8. All materials updated on: September 30, Design Profiler Design Profiler is a tool integrated within.
Access Tutorial 10 Automating Tasks with Macros
Digital Image Processing Lecture3: Introduction to MATLAB.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Chapter 2: Working with Data in a Project
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Program Guide v25Q3. Overview » Concepts » Workflow  Press sheet  Linking product  Program guide  Publishing a program guide day » Layout configuration.
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Introduction to Design Tools COE Review: Tools, functions, design flow Four tools we will use in this course – HDL Designer Suite FPGA Advantage.
Creating a Web Site to Gather Data and Conduct Research.
Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Simulink ® Interface Course 13 Active-HDL Interfaces.
Accelerated Waveform Design Entry and Simulation Course 16.
© 2003 Xilinx, Inc. All Rights Reserved HDL Co-Simulation.
HDL Bencher FPGA Design Workshop. For Academic Use Only Presentation Name 2 Objectives After completing this module, you will be able to:  Describe the.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Playing Back Scripts In HP LoadRunner >>>>>>>>>>>>>>>>>>>>>>
Active-HDL Interfaces Debugging C Code Course 10.
Active-HDL Interfaces Building VHPI Applications C Compilation Course 9.
Interfaces to External EDA Tools Debussy Denali SWIFT™ Course 12.
Chapter Two Creating a First Project in Visual Basic.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Programmable Logic Training Course HDL Editor
Design Verification Code and Toggle Coverage Course 7.
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
© 2005 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU HDL Co-Simulation.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Undertow Suite Tutorial. Set the license environment variables Set up environment variable for the license manager: setenv UT_ROOT_DIR path/undertow (distribution.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VII Introduction to SIMULINK Rajeev Madazhy
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
Modeling of Power Converters using Matlab and Simulink
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
Intro to Simulink April 15, Copyright , Andy Packard. This work is licensed under the Creative Commons.
Simulink Simulink is a graphical extension to MATLAB for modeling and simulation of systems. In Simulink, systems are drawn on screen as block diagrams.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Intro to Simulink Modified by Gary Balas 20 Feb 2011 Copyright , Andy Packard. This work is licensed under.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Basic Xilinx Design Capture. © 2006 Xilinx, Inc. All Rights Reserved Basic Xilinx Design Capture After completing this module, you will be able.
Introduction to Vivado
VAB™ for INFINITY Tutorial
- Graphical extension to MATLAB for modeling and simulation of systems
CIS16 Application Programming with Visual Basic
Digital Image Processing
Founded in Silicon Valley in 1984
Presentation transcript:

Simulink ® Interface Course 13 Active-HDL Interfaces

All materials updated on: September 30, 2005 OverviewOverview The MathWorks' MATLAB®/Simulink® simulation environment provides a powerful high level mathematical modeling environment for DSP systems that can be widely used for algorithm development and verification. Active-HDL provides an interface to MATLAB and Simulink simulation environment, which allows co-simulation of functional blocks described by using mathematical formulas and behavioral models described by using hardware description languages. The Simulink Interface provides users with the following benefits : –Intuitive interface that fills the gap between HDL simulation and high level mathematical modeling environment for DSP systems –Displaying simulation results in both the Simulink environment and the Active-HDL waveform window –Automatic value conversion between Active-HDL and Simulink –Advanced testbenches employing complex mathematical formulas used to stimulate unit under test –Integration with Xilinx System Generator™

All materials updated on: September 30, Interface Setup The interface delivered with the Active-HDL installation program allows you to select a Verilog module, EDIF cell or VHDL entity/architecture pair that will be used as a black-box during the verification process performed within Simulink. Before the first use of the Simulink Interface, you need to install the Active-HDL Blockset delivered with the Active-HDL installation. Provided setup script automates the installation process. Since Active-HDL will be initialized during the co-simulation by Simulink, you need to modify the $PATH variable to point to the /Bin subdirectory of the Active-HDL installation.

All materials updated on: September 30, a Installing Active-HDL Blockset 1. Start MATLAB. 2. Browse to the $ALDEC/Simulink subfolder. 3. Type setup command in the Command Window. 4. After the setup has finished successfully, restart MATLAB

All materials updated on: September 30, Generating Block Description for Simulink This step can be done by using the Generate Block Description for Simulink option: 1.Open the Active-HDL workspace collecting designs describing units to be co-simulated. 2.Compile sources. 3.Expand a source file (e.g. abs.vhd) that contains a design unit that will be used as a black-box on the Simulink Diagram. 4.Right-click this unit (e.g. m_abs(beh)) and choose the Generate Block Description for Simulink… option Block Description files are generated to $WSP/Simulink folder by default. User is able to change this location. Generated configuration files are dedicated for Active- HDL Blockset, common for all Active-HDL designs. To start the co-simulation process in MATLAB environment, first you need to create Block Description files (MATLAB M-Files) for Simulink and then select units to be co-simulated.

All materials updated on: September 30, Using Active-HDL Blockset 1. Start Simulink. 2. Choose the Simulink icon from MATLAB's main toolbar to open the Simulink Library Browser window. 3. In the left pane of the Simulink Library Browser window, the Active-HDL Blockset is displayed. The Active-HDL Blockset is available inside the Simulink Library Browser. The Active-HDL Co-Sim, HDL Black-Box, and HDL Black-Box for System Generator blocks are visible in the blockset.

All materials updated on: September 30, Using Active-HDL Blockset - blocks Following blocks are provided: 1. Active-HDL Co-Sim 2. HDL Black-Box, 3. HDL Black-Box for System Generator in the Active-HDL Blockset and other MATLAB simulation libraries to create his own simulation model. Before co-simulation can be started, the Active-HDL Co-Sim block needs to be added to the model window. This block is required to successfully initialize the simulation process and it can be used to define parameters of the co-simulation session. The black-boxes generated by the Generate Block Description for Simulink… can be simulated after their parameters are setup.

All materials updated on: September 30, Using Active-HDL Blockset - configuring Active-HDL Co-Sim block To configure co-simulation parameters, double-click the Active-HDL Co-Sim symbol.

All materials updated on: September 30, Using Active-HDL Blockset - configuring Active-HDL Co-Sim block Reference Period Defines relationship between Active-HDL and Simulink time domains and specifies a base sampling rate for all HDL black-boxes. The value can be specified as a fraction (1/10 or 0.1), an integer value (25), or expression (100+1/5 or 10*pi). Additional arguments for 'asim' command In the Additional arguments for 'asim' command field, you can specify the additional parameters that will be passed to Active-HDL while initializing the simulation. Waveform File Name Allows specifying the name of a waveform file that will be used to display co-simulation results. Create ASDB Simulation Database Disables the use of the Standard Waveform Viewer and dumps simulation results to the ASDB Simulation Database that can be read by using the Accelerated Waveform Viewer. ASDB Simulation Database Refresh Time Specifies the refresh time for updating the ASDB Simulation Database by entering the refresh value in the ASDB Simulation Database Refresh Time (sec.) edit box. The refresh time can be defined after the Create ASDB Simulation Database option is checked. Enable Debug Mode Allows running the co-simulation in a special diagnostic mode, where the simulation is stopped after the design has been initialized and then you can set breakpoints, watch signals, and trace HDL source code. Quit Active-HDL after simulation is finished Forces Active-HDL to quit after the simulation is finished. Record Values in File Enables generation of a file that stores test vectors for the HDL-based part of the MATLAB design. The file can be used to perform a standalone simulation with the use of Active-HDL only. File Name The name of the file that stores data for a standalone simulation. It can be specified after the Record Values in File option is checked.

All materials updated on: September 30, Using Active-HDL Blockset - selecting black box configuration To associate HDL Black-Box with an HDL unit, double-click the symbol and select the block description file generated for this unit. NOTE: The Select HDL Black-Box Configuration dialog box lists all configuration files placed in the current working folder. However, you can specify any configuration file visible in the MATLAB path.

All materials updated on: September 30, Using Active-HDL Blockset - interface signals customization After you selected the configuration file for HDL Black-Box, you can configure interface signals, add internal signals, specify clocks, force formulas for control signals etc.

All materials updated on: September 30, Using Active-HDL Blockset - interface signals customization Ports Lists all ports of the simulated unit. Also displays internal signals added to black-box interface. Direction Displays the direction of port (In, Out). For ports selected in either Clocks or Stimulator tabs, displays the special function of such ports: Clock, Sync, Custom. Internal signals are indicated as Internal. Cast Specifies the numerical representation of a signal's value. Available types are:Boolean, SIGN and UNSIGN. Binary Point Specifies the binary point for a vector. Negative values and values greater than vector width are supported. Quantization Specifies the type of quantization method (available values are: truncate, round ). Overflow Specifies handling method of arithmetical overflow (available values are: saturate, wrap, error). Period Specifies the sampling period of the output signal. You can specify an integer value related to Reference Period or one of signals selected as Clock or Sync. When you need to specify several sampling periods, check the Multirate Sampling option and enter required sampling periods for each output separately. Trap Specifies whether a breakpoint will be set on the selected signal. Trace If this option is checked for selected signal, then it will be added to the waveform editor during simulation. Hidden Specifies whether port should be visible on the block graphical representation and thus available in the Simulink diagram Type Displays the type of the signal. Supported VHDL types are: BIT, BIT_VECTOR, STD_ULOGIC, STD_ULOGIC_VECTOR, STD_LOGIC, STD_LOGIC_VECTOR.

All materials updated on: September 30, Co-Simulation - Simulink simulation Model Active-HDL simulation Black-Box Simulink blocks Active-HDL co-simulation block This is only a preview. The step by step example of co-simulation will be shown later in the presentation.

All materials updated on: September 30, Co-Simulation - connection to Active-HDL 1. All HDL Black-Boxes from the Active-HDL Blockset are simulated with Active-HDL simulator. 2. Running simulation from the Simulink diagram automatically invokes Active-HDL and configures it to run co-simulation of code associated with all instantiated black-boxes. 3. User can review results in MATLAB as well as Active-HDL waveform. NOTE: Waveform is created in an automated way when “Trace” option has been selected

All materials updated on: September 30, Co-Simulation - simulation start Once Start Simulation button is pressed on the Simulink toolbar, the co-simulation process will be started. Aldec Black-box simulated with Active-HDL simulator inside of the new, automatically created design.

All materials updated on: September 30, Simulation with Simulink - view simulation results User can review the simulation results within Simulink and in the Active-HDL Waveform window

All materials updated on: September 30, Example of use – Active-HDL design Open simulink_example workspace. This workspace contains Modulator design. The design contains the following resource files: 1. abs.vhd VHDL equivalent model of the Simulink Abs block. 2. mult.vhd, mult1.vhd VHDL equivalent model of the Simulink Product block. 3. sign.vhd VHDL equivalent model of the Simulink Sign block. 4. Modulation.mdl Simulink models

All materials updated on: September 30, Design Example – generating block description files 1. Compile all files within design. 2. Use Generate Block Description for Simulink… for each entity in the library and assign created files to HDL Black-Box symbols on the Simulink diagram.

All materials updated on: September 30, Design Example - Simulink simulation model 1. Start MATLAB. 2. Start Simulink from the MATLAB toolbar. 3. Set the working folder to the Simulink subfolder of the simulink_example workspace and open Modulation.mdl model. The Simulink simulation model should look like pictured on this slide.

All materials updated on: September 30, Add Active-HDL Co-Sim to the Simulink model. 2. Add HDL Black-Box symbol to the Simulink model. 3. Inside the Select HDL Black-Box Configuration dialog box, select m_abs.m - this will assign HDL code of m_abs entity to the HDL Black-Box Design Example - using Active-HDL Blockset 4. Repeat steps for all remaining units.

All materials updated on: September 30, Design Example - configuring blocks Please, specify following values for all module parameters using HDL Black-Box Parameters dialog box: For SIGN block, set: Port In1: Cast = Signed, Binary Point = 24, Quantization = Truncate, Overflow = Saturate Port Out1: Cast = Signed, Binary Point = 0 For MULT block, set: Port Sin_wav1: Cast = Unsigned, Binary Point = 9, Quantization = Truncate, Overflow = Saturate Port Sin_wav2: Cast = Signed, Binary Point = 15, Quantization = Truncate, Overflow = Saturate Port Out1: Cast = Signed, Binary Point = 24 For MULT1 block, set: Port I_abs: Cast = Unsigned, Binary Point = 24, Quantization = Truncate, Overflow = Saturate Port I_sig: Cast = Signed, Binary Point = 0, Quantization = Truncate, Overflow = Saturate Port Out1: Cast = Signed, Binary Point = 24 For M_ABS block, set: Port In1: Cast = Signed, Binary Point = 24, Quantization = Truncate, Overflow = Saturate Port Out1: Cast = Unsigned, Binary Point = 24 NOTE: Please use “Trace” option for all signals and set “Period” to 1. Also, specify following values in the Active-HDL Co-Sim Parameters dialog box: Reference Period: In HDL Simulator: 1/20 sec In Simulink: As In Simulator This completes the preparation for co-simulation.

All materials updated on: September 30, Design Example - replacing blocks with HDL Black-Boxes Inside Modulation.mdl please replace the Simulink blocks with the corresponding black- boxes coming from the ALDEC blockset. Active-HDL Co-Sim block. HDL Black-Box corresponding to m_abs entity.

All materials updated on: September 30, Design Example - simulation Please run simulation using Start Simulation button from the Simulink toolbar. Simulation can be stopped using Stop Simulation button from the Simulink toolbar.

All materials updated on: September 30, Design Example - waveform settings Active-HDL waveform can display signal values in analog shape. Please use inside the waveform signal properties to define display parameters for m_abs symbol ports. Please set parameters: Signal In1: Radix - decimal, Notation - Signed 2`s Complement, Display - Analog, Height Signal Out1: Radix - decimal, Notation - Unsigned, Display - Analog, Height - 128