Simulink ® Interface Course 13 Active-HDL Interfaces.

Slides:



Advertisements
Similar presentations
1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
Advertisements

Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Document Properties: adding information to your Microsoft Office documents Step 1: Add information to Document Properties What are Document Properties.
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
Using Macros and Visual Basic for Applications (VBA) with Excel
XP Tutorial 4 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Personalizing Your Windows Environment Tutorial 4.
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
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.
ECE 272 Xilinx Tutorial. Workshop Goals Learn how to use Xilinx to: Draw a schematic Create a symbol Generate a testbench Simulate your circuit.
How to use the VHDL and schematic design entry tools.
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.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction To Form Builder
Introduction To Form Builder
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
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.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Access Tutorial 10 Automating Tasks with Macros
Working with Drivers and Printers Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Understanding Drivers and Devices Install and configure.
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
Simulink ® Interface Course 13 Active-HDL Interfaces.
Project 9 Using Visual Basic for Applications (VBA) to Customize and Automate Excel Jason C. H. Chen, Ph.D. Professor of Management Information Systems.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
Introduction to Design Tools COE Review: Tools, functions, design flow Four tools we will use in this course – HDL Designer Suite FPGA Advantage.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
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.
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.
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.
Key Applications Module Lesson 21 — Access Essentials
ECEN/MAE 3723 – Systems I MATLAB Lecture 2. Lecture Overview What is Simulink? How to use Simulink  Getting Start with Simulink  Building a model Example.
With Windows 7 Introductory© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Windows 7 Introductory Chapter 3 Advanced File Management and Advanced.
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
Programmable Logic Training Course HDL Editor
Design Verification Code and Toggle Coverage Course 7.
© 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,
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VII Introduction to SIMULINK Rajeev Madazhy
Modeling of Power Converters using Matlab and Simulink
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
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.
1 VHDL & Verilog Simulator. Modelsim. 2 Change the directory to where your files exist (All of the files must be in a same folder). Modelsim.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
1 After completing this lesson, you will be able to: Use a Word template. Create a template. Use a wizard to create a document.
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.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Introduction to Vivado
VAB™ for INFINITY Tutorial
- Graphical extension to MATLAB for modeling and simulation of systems
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Digital Image Processing
Founded in Silicon Valley in 1984
Presentation transcript:

Simulink ® Interface Course 13 Active-HDL Interfaces

All materials updated on: September 30, 2004 OverviewOverview The MathWorks' MATLAB®/Simulink® simulation environment provides a powerfull 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, Using Co-Simulation Wizard for Simulink 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 specify environment settings for Active-HDL and set the path to the interface files delivered with the Active-HDL installation. 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. You need to also specify the search path (also referred to as the MATLAB Path) to the directory where the Simulink Interface files are stored. MATLAB will use this path to find files required during co-simulation.

All materials updated on: September 30, 2004 Simulation 13.1a Using Co-Simulation Wizard for Simulink 1. Start MATLAB. 2. Choose the Set Path command from the File menu. This command allows to specify the search path (also referred to as the MATLAB Path) to the directory where the Simulink Interface files are stored. MATLAB will use this path to find files required during co- simulation. 3. Click the Add Folder button and browse for $ALDEC\Matlab subdirectory. Then, click OK.

All materials updated on: September 30, Using Co-Simulation Wizard for Simulink - units for co-simulation This step can be done by using the Co-Simulation Wizard for Simulink. To run the Co-Simulation Wizard for Simulink in Active-HDL: 1.Open the Active-HDL design that contains units to be co-simulated and compile sources. 2.Expand a source file (e.g. abs.vhd) that contains a design unit that will be used as a black-box. 3.Right-click this unit (e.g. m_abs(beh)) and choose the Co-Simulation Wizard for Simulink option or choose the Co-Simulation Wizard for Simulink option from the Tools menu To start the co-simulation process in MATLAB environment, first you need to create configuration files (MATLAB M-Files) for Simulink and then select units to be co- simulated.

All materials updated on: September 30, Using Co-Simulation Wizard for Simulink - interface signals The Co-Simulation Wizard for Simulink dialog box opens. The first Wizard's window displays all interface signals of the unit.

All materials updated on: September 30, Using Co-Simulation Wizard for Simulink - interface signals 1. Entity/Module Allows you to select an entity or module to be co-simulated. You can select an entity/architecture pair or module that you want to co-simulate (black-box) from the pop-up menu in the Design Browser window or you can choose the Co-Simulation Wizard for Simulink option from the Tools menu. 2. Architecture Allows you to select an architecture associated to the entity specified in the Entity list box. 3. Dedicated ports This column lets you specify the ‘special’ interface signals – clock and clock enable inputs. 4. Clock Enable Specifies the active level of the Clock Enable signal.

All materials updated on: September 30, Using Co-Simulation Wizard for Simulink - interface signals customization

All materials updated on: September 30, Using Co- Simulation Wizard for Simulink - interface signals customization 1. Ports Lists all ports of the simulated unit. If you have specified the clock (CLK) and clock enable (CE) signals in the first window, these ports are not displayed in the Ports column. 2. Cast Specifies the numerical representation of a signal's value. Available types are:Boolean for scalars, SIGN (2's Complement) and UNSIGN for vectors. 3. Number of Bits Specifies the width of the selected signal. 4. Fractional Part Specifies how many bits are available to the right side of the binary point (i.e. the size of the fraction). The binary point position must fit between zero and the number of bits specified in the Number of Bits column. 5. Quantization Specifies the type of quantization method (available values are: truncate, round ). 6. Overflow Specifies handling method of arithmetical overflow (available values are: saturate, wrap, error). 7. Type Displays the type of the signal. Supported VHDL types are: BIT, BIT_VECTOR, STD_ULOGIC, STD_ULOGIC_VECTOR, STD_LOGIC, STD_LOGIC_VECTOR. 8. Output File Specifies the name of the configuration file generated by Wizard. Folder containng this file should be either added to MATLAB Search Path or set as the current directory during co-simulation. 9. Add signals to waveform If this option is checked then interface signals selected in the last wizard window will be added to the waveform editor during simulation.

All materials updated on: September 30, Using Simulink Co-Simulation Wizard - ALDEC Blockset library The Co-Simulation Wizard for Simulink creates the configuration files (MATLAB M-Files) dedicated for ALDEC Active-HDL Co-Sim Toolbox library, common for all Active-HDL designs. This library can be found in MATLAB's Simulink Library Browser NOTE: Output Directory. By default output files generated by Wizard are created in $WSP/Matlab folder.

All materials updated on: September 30, Simulation with MATLAB Active-HDL Design Output Directory selection inside MATLAB. 1. Start MATLAB. 2. Choose the Set Path option form the File menu. This option allows you to specify the path to the directory(ies) containing file(s) that you have specified in the Output File field of the Co-Simulation Wizard for Simulink window. 2. Click the Add Folder button and browse for folder containing Output File. Then, click OK. 3. Choose the Save option and close the Set Path window by pressing the Close button.

All materials updated on: September 30, 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 ALDEC Active-HDL Co-Sim Toolbox is displayed. The Active-HDL Co-Sim, HDL Block, and System Generator Compatible HDL Block blocks are visible in the Toolbox Simulation with MATLAB - using simulation black boxes The ALDEC Active-HDL Co-Sim Toolbox is available inside the Simulink library browser.

All materials updated on: September 30, Simulation with MATLAB - using simulation black boxes User can use: 1. Active-HDL Co-Sim 2. HDL Block, 3. System Generator Compatible HDL Block from the ALDEC Active-HDL Co-Sim Toolobox and other MATLAB simulation libraries to create his own simulation Model. Before user starts co-simulation, he needs to add the Active-HDL Co-Sim block 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 Co-Simulation Wizard for Simulink can be simulated after their parameters are setup.

All materials updated on: September 30, Simulation with MATLAB - using simulation black boxes To replace HDL Block with a unit generated by the Wizard, double-click the symbol and specify its parameters In the Black-Box Name field specify the name of configuration file specified in the Output File field of Co-Simulation Wizard for Simulink.

All materials updated on: September 30, Simulation with MATLAB - MATLAB simulation Model Active-HDL simulation Black-box block Simulink blocks Active-HDL co-simulation block

All materials updated on: September 30, Co-Simulation between Active-HDL and MATLAB 1. All Aldec black boxes library are simulated with Active-HDL simulator. 2. Run simulation from MATLAB in automatic way create inside Active-HDL all required processes to run co-simulation with used simulation black-boxes. 3. User can review results in MATLAB as also inside Active-HDL waveform. NOTE: Waveform is created in automated way when “Add signals to Waveform” option inside the Co-Simulation Wizard for Simulink has been selected

All materials updated on: September 30, Co-Simulation between Active-HDL and MATLAB After press Start Simulation button from the Simulink toolbar, 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 MATLAB - view simulation results User can review simulation results inside MATLAB as also inside the Active-HDL waveform

All materials updated on: September 30, Example of use – Active-HDL design Open MATLAB_Example workspace. This workspace contain 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 – Co-Simulation Wizard for Simulink 1. Compile all files inside design 2. Use Co-Simulation Wizard for Simulink and create simulation black-box symbols and MATLAB library NOTE: Next slide describes all required parameters which need to be set inside the Co-Simulation Wizard for Simulink.

All materials updated on: September 30, Design Example - Co-Simulation Wizard for Simulink Please specify all required parameters for listed below modules with using Co- Simulation Wizard for Simulink: Black-Box Sample Period = 1/20 Active-HDL CoSim block Sample Period = 1/20 For SIGN block set: Port In1: Cast = sign, Number of Bits = 31, Fractional Part = 24, Quantization = truncate, Overflow = saturate Port Out1: Cast = sign, Number of Bits = 2, Fractional Part = 0 For MULT block set: Port Sin_wav1: Cast = unsign, Number of Bits = 16, Fractional Part = 9, Quantization = truncate, Overflow = saturate Port Sin_wav2: Cast = sign, Number of Bits = 16, Fractional Part = 15, Quantization = truncate, Overflow = saturate Port Out1: Cast = sign, Number of Bits = 31, Fractional Part = 24 For MULT1 block set: Port I_abs: Cast = unsign, Number of Bits = 31, Fractional Part = 24, Quantization = truncate, Overflow = saturate Port I_sig: Cast = sign, Number of Bits = 2, Fractional Part = 0, Quantization = truncate, Overflow = saturate Port Out1: Cast = sign, Number of Bits = 31, Fractional Part = 24 For ABS block set: Port In1: Cast = sign, Number of Bits = 31, Fractional Part = 24, Quantization = truncate, Overflow = saturate Port Out1: Cast = unsign, Number of Bits = 31, Fractional Part = 24 NOTE: Please use in all symbols “Add signals to Waveform” option. This item finishes the task with Co-Simulation Wizard for Simulink. All required parameters and MATLAB design have been completed.

All materials updated on: September 30, Design Example - MATLAB simulation model 1. Start MATLAB. 2. Set Path’ to the Simulink Interface files and to the Output File’s folder. 3. Start Simulink from the MATLAB toolbar. 4. Choose Open and open Modulator.mdl file stored inside the Active-HDL example design Matlab_example. Then you will have the MATLAB Simulation model as displayed in this slide.

All materials updated on: September 30, 2004 Please, add Active-HDL Co-Sim and HDL Block symbol to the Matlab Simulation Model. Then select m_abs_beh.m inside the Configuration dialog- this will assign Active-HDL black box to the HDL block Design Example - MATLAB simulation model

All materials updated on: September 30, 2004 Specify the sample period of both blocks in the dialog appearing after double-click. For both, please set 1/ Design Example - MATLAB simulation model

All materials updated on: September 30, Design Example - create co-simulation model Inside Modulator.mdl please replace the Simulink blocks with the corresponding black-boxes coming from the ALDEC blockset. Active-HDL Co-Sim block. m_abs_beh Black-box symbol from the Aldec library

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 paramaters: Signal In1: Radix - decimal, Notation - Signed 2`s Complement, Display - Analog, Height Signal Out1: Radix - decimal, Notation - Unsigned, Display - Analog, Height - 128