
Model Composer User Guide Vivado Design Suite UG1262 (v2018.2) June 6, 2018 Revision History Revision History The following table shows the revision history for this document. Section Revision Summary 06/06/2018 Version 2018.2 Chapter 3: Importing C/C++ Code as Custom Blocks Changed all instances of xmcCreateLibrary command to xmcImportFunction command. Command has been renamed to better indicate its function. Modified all screen displays showing the Block Parameters dialog box for the Library Function block. The dialog box has been redesigned in this release. Model Composer Blocks Added a description of QR Inverse block, new in this release. Modified data type support for Abs and Pow blocks. Integer and fixed point data types are now supported for these blocks. Added parameter information for Complex to Real-Imag and Real-Imag to Complex blocks. Modified the description of the Histogram Equalization block to explain the function of the two separate block inputs. 04/04/2018 Version 2018.1 Managing Overflow Added a discussion of managing wrap or saturate on overflow settings. Chapter 3: Importing C/C++ Code as Custom Blocks Significant edits throughout this chapter. Defining Blocks Using Function Templates Added detail that function declaration, pragma usage, and function body must be specified in header file for function templates. Function Templates for Data Types Documented the use of function templates to define data types for functions and classes, including the use of SUPPORTED_TYPES and UNSUPPORTED_TYPES pragmas. Defining Customization Parameters Documented the methods for creating customization parameters using function templates or PARAMETER pragma. SUPPORTS_STREAMING and BUFFER_DEPTH Pragmas Documented use case for SUPPORTS_STREAMING and BEFFER_DEPTH pragmas. Updating Available Devices or Boards Added information on updating the boards or devices available for use with Model Composer. UG1262 (v2018.2) June 6, 2018 www.xilinx.com Send F [placeholdereedback text] Model Composer User Guide 2 Table of Contents Revision History...............................................................................................................2 Chapter 1: Introduction.............................................................................................. 5 What is Model Composer........................................................................................................... 5 Chapter 2: Creating a Model Composer Design.............................................9 Launching Model Composer......................................................................................................9 Creating a New Model.............................................................................................................. 10 Adding Blocks to a Model.........................................................................................................11 Connecting Blocks.....................................................................................................................13 Working with Data Types......................................................................................................... 14 Creating a Top-Level Subsystem Module...............................................................................21 Chapter 3: Importing C/C++ Code as Custom Blocks................................23 Introduction............................................................................................................................... 23 Using the xmcImportFunction Command............................................................................. 23 Importing C/C++ into Model Composer................................................................................. 27 Defining Blocks Using Function Templates............................................................................29 SUPPORTS_STREAMING and BUFFER_DEPTH Pragmas........................................................42 Adding Your Library to Library Browser.................................................................................46 Chapter 4: Generating Outputs...........................................................................48 Introduction............................................................................................................................... 48 Adding the Model Composer Hub.......................................................................................... 48 Defining the Interface Specification....................................................................................... 51 Generating Packaged IP for Vivado........................................................................................ 55 Generating System Generator IP............................................................................................ 59 Generating C++ Code................................................................................................................64 Chapter 5: Simulating and Verifying Your Design..................................... 67 Introduction............................................................................................................................... 67 Simulating in Simulink.............................................................................................................. 68 Managing the Model Composer Cache..................................................................................68 UG1262 (v2018.2) June 6, 2018 www.xilinx.com Send F [placeholdereedback text] Model Composer User Guide 3 Verifying the C++ Code............................................................................................................. 69 Verifying the C/RTL Code......................................................................................................... 71 Appendix A: Select Target Device or Board....................................................72 Select Device Dialog Box.......................................................................................................... 72 Updating Available Devices or Boards....................................................................................73 Appendix B: Model Composer Block Library................................................. 74 Supported Simulink Blocks...................................................................................................... 74 Model Composer Block Taxonomy......................................................................................... 75 Model Composer Blocks...........................................................................................................80 Appendix C: Additional Resources and Legal Notices........................... 202 References................................................................................................................................202 Please Read: Important Legal Notices................................................................................. 203 UG1262 (v2018.2) June 6, 2018 www.xilinx.com Send F [placeholdereedback text] Model Composer User Guide 4 Chapter 1 Introduction What is Model Composer Model Composer is a Model-Based design tool that enables rapid design exploration within the MathWorks Simulink® environment and accelerates the path to production for Xilinx programmable devices through automatic code generation. Simulink, an add-on product to MATLAB, provides an interactive, graphical environment for modeling, simulating, analyzing and verifying system-level designs. Model Composer is built as a Xilinx toolbox that fits into the MathWorks Simulink environment and allows algorithm developers to fully leverage all the capabilities of Simulink’s graphical environment for algorithm design and verification. You can express your algorithms in Simulink using blocks from the Model Composer library as well as custom user-imported blocks. Model Composer transforms your algorithmic specifications to production-quality IP implementations using automatic optimizations and leveraging the high-level synthesis technology of Vivado HLS. Using the IP integrator in the Vivado Design Suite you can then integrate the IP into a platform that, for example, may include a Zynq device, DDR3 DRAM, and a software stack running on the Arm® processor. Model Composer provides a library of over 80 optimized blocks for use within the Simulink environment. These include basic functional blocks for expressing algorithms like Math, Linear Algebra, Logic and Bit-wise operations and others. It also includes a number of application- specific blocks for Image Processing and Computer Vision. The Xilinx Model Composer block library contains the following categories of elements: Table 1: Xilinx Model Composer Block Library Library Description Computer Vision Blocks that support the analysis, manipulation and optimization of a digitized image. Logic and Bit Operations Blocks that supports the compound logical operations and bit-wise operations. Lookup Tables Block set that performs a one dimensional lookup operation with an input index. Math Functions Blocks that implement mathematical functions. UG1262 (v2018.2) June 6, 2018 www.xilinx.com Send F [placeholdereedback text] Model Composer User Guide 5 Chapter 1: Introduction Table 1: Xilinx Model Composer Block Library (cont'd) Library Description Ports and Subsystems Blocks that allow creation of subsystems and input/output ports. Relational Operations Block set to define some kind of relation between two entities (e.g.: Numerical Equality and inequalities).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages204 Page
-
File Size-