Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation

Similar documents
Modeling a 4G LTE System in MATLAB

Optimize DSP Designs and Code using Fixed-Point Designer

MATLAB/Simulink in der Mechatronik So einfach geht s!

Introduction to C and HDL Code Generation from MATLAB

Model-Based Design: Generating Embedded Code for Prototyping or Production

Model-Based Design for Video/Image Processing Applications

Hardware-Software Co-Design and Prototyping on SoC FPGAs Puneet Kumar Prateek Sikka Application Engineering Team

Model-Based Design for Altera FPGAs Using HDL Code Generation The MathWorks, Inc. 1

Addressing Fixed Point Design Challenges

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

개발과정에서의 MATLAB 과 C 의연동 ( 영상처리분야 )

Accelerating FPGA/ASIC Design and Verification

Implementing MATLAB Algorithms in FPGAs and ASICs By Alexander Schreiber Senior Application Engineer MathWorks

Embarquez votre Intelligence Artificielle (IA) sur CPU, GPU et FPGA

What's new in MATLAB and Simulink for Model-Based Design

Integrated Workflow to Implement Embedded Software and FPGA Designs on the Xilinx Zynq Platform Puneet Kumar Senior Team Lead - SPC

Optimization and Implementation of Embedded Signal Processing Algorithms Jonas Rutström Senior Application Engineer

Modeling a 4G LTE System in MATLAB

Model-Based Design: Design with Simulation in Simulink

Targeting Motor Control Algorithms to System-on-Chip Devices

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

2015 The MathWorks, Inc. 1

2015 The MathWorks, Inc. 1

Intro to System Generator. Objectives. After completing this module, you will be able to:

Designing and Targeting Video Processing Subsystems for Hardware

Making the Most of your MATLAB Models to Improve Verification

Four Best Practices for Prototyping MATLAB and Simulink Algorithms on FPGAs by Stephan van Beek, Sudhir Sharma, and Sudeepa Prakash, MathWorks

Accelerate FPGA Prototyping with

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

Real-Time Testing in a Modern, Agile Development Workflow

Ein Modell - viele Zielsysteme

Hardware Implementation and Verification by Model-Based Design Workflow - Communication Models to FPGA-based Radio

How Real-Time Testing Improves the Design of a PMSM Controller

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

USING THE SYSTEM-C LIBRARY FOR BIT TRUE SIMULATIONS IN MATLAB

Hardware and Software Co-Design for Motor Control Applications

What s New with the MATLAB and Simulink Product Families. Marta Wilczkowiak & Coorous Mohtadi Application Engineering Group

[Sub Track 1-3] FPGA/ASIC 을타겟으로한알고리즘의효율적인생성방법및신기능소개

Introduction to MATLAB application deployment

Simulink 를이용한 효율적인레거시코드 검증방안

Codegenerierung für Embedded Systeme leicht gemacht So geht s!

Rapid Development Platform for C-Programmable DSP using MATLAB and Simulink

Modeling and Verifying Mixed-Signal Designs with MATLAB and Simulink

Applications of Program analysis in Model-Based Design

Avnet Speedway Design Workshop

Modelling and Simulation Made Easy with Simulink Tiffany Liang Application Engineer MathWorks

컴퓨터비전의최신기술 : Deep Learning, 3D Vision and Embedded Vision

Hardware and Software Co-Design for Motor Control Applications

Using Model-Based Design to Design Real-Time Video Processing Systems

Introducing Simulink R2012b for Signal Processing & Communications Graham Reith Senior Team Leader, UK Application Engineering

Connecting MATLAB & Simulink with your SystemVerilog Workflow for Functional Verification

Simulation, prototyping and verification of standards-based wireless communications

Reducing Design Errors in Complex State Machines using Model-Based Design

Reducing the cost of FPGA/ASIC Verification with MATLAB and Simulink

Speeding up MATLAB Applications Sean de Wolski Application Engineer

Hardware and Software Co-Design for Motor Control Applications

Getting Started with MATLAB Francesca Perino

Design and Verification of FPGA Applications

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc.

Model-Based Design Using Simulink, HDL Coder, and DSP Builder for Intel FPGAs By Kiran Kintali, Yongfeng Gu, and Eric Cigan

Design and Verification of FPGA and ASIC Applications Graham Reith MathWorks

Accelerating System Simulations

What s New in MATLAB and Simulink

2015 The MathWorks, Inc. 1

Introduction to DSP/FPGA Programming Using MATLAB Simulink

Production Code Generation Introduction and New Technologies

2015 The MathWorks, Inc. 1

Introducing Simulink Release 2012b for Control System Development Mark Walker MathWorks

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

Introduction to Simulink. Todd Atkins

From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak

Verification and Validation of Models for Embedded Software Development Prashant Hegde MathWorks India Pvt. Ltd.

System-Level ASIC Algorithm Simulation Platform using Simulink

Simulink Matlab To Vhdl Route For Full Custom Fpga Rapid

Multi-Target Modelling for Embedded Software Development for Automotive Applications

Integrating MATLAB Analytics into Business-Critical Applications Marta Wilczkowiak Senior Applications Engineer MathWorks

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

What s New in Simulink in R2015b and R2016a

Using Model-Based Design to Accelerate FPGA Development for Automotive Applications

Control System Design and Rapid Prototyping Using Simulink Chirag Patel Sr. Application Engineer Modeling and Simulink MathWorks India

Model-Based Design for Safety-Critical and Mission-Critical Applications Bill Potter Technical Marketing April 17, 2008

In-depth algorithmic evaluation at the fixed-point level helps avoid expensive surprises in the final implementation.

Scaling MATLAB. for Your Organisation and Beyond. Rory Adams The MathWorks, Inc. 1

Optimizing and Accelerating Your MATLAB Code

Sharing and Deploying MATLAB Programs Sundar Umamaheshwaran Amit Doshi Application Engineer-Technical Computing

Overview. CSE372 Digital Systems Organization and Design Lab. Hardware CAD. Two Types of Chips

Wordlength Optimization

MATLAB 에서작업한응용프로그램의공유 : App 에서부터웹서비스까지

Parallel and Distributed Computing with MATLAB The MathWorks, Inc. 1

Hardware in the Loop Functional Verification Methodology

What s New in MATLAB and Simulink The MathWorks, Inc. 1

Avnet Speedway Design Workshop

Embedded Target for TI C6000 DSP 2.0 Release Notes

Simulink Verification and Validation

MathWorks Products and Prices North America January 2018

Signal Processing Algorithms into Fixed Point FPGA Hardware Dennis Silage ECE Temple University

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

EEM870 Embedded System and Experiment Lecture 4: SoC Design Flow and Tools

Transcription:

Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation Houman Zarrinkoub, PhD. Product Manager Signal Processing Toolboxes The MathWorks Inc. 2007 The MathWorks, Inc.

Outline Challenges in fixed-point signal processing Traditional design workflow Advantages of Model-Based Design workflow Streamlined Float-to-fixed conversion Acceleration of fixed-point simulation Automatic C code generation Demo Summary 2

Fixed-point signal processing applications Tasks Design and analyze fixed-point algorithms Verify fixed point implementations Hardware targets FPGA or ASIC Fixed-point DSP chip 3

Traditional Development flow Requirements and Specifications Design Implementation Test and Verification Text-based - Prevents rapid iteration Physical prototypes - Incomplete and expensive Manual coding - Introduces human error Traditional testing - Errors found too late in the process 4

Multiple truths in traditional workflows Re-implement as you go down the level of abstraction Algorithm Algorithm specification specification Software Software simulation simulation Hardware Hardware implementation implementation Equations Block Block diagrams M-code M-code C/C++ C/C++ code code Assembly code code VHDL/Verilog code code 5

Examine a fixed-point algorithm design Traditional workflow 1. Set-up simulation flow 2. Express your floating-point algorithm Focus on algorithmic integrity, proof of concept 3. Simulate (floating-point) Iterate on algorithm trade-offs Validate against requirements 4. Convert design to fixed-point Focus of design viability based on implementation constraints 5. Simulate (fixed-point) Iterate on implementation trade-offs Validate against original requirements 6. Generate code for implementation 7. Validate and verify design after deployment MATLAB C/C++ Assembly or HDL 6

Problems with traditional workflow Multiple truths (Copies of same algorithm) Floating-point M code Floating-point C code Fixed-point C code Assembly code Verilog/VHDL code Error-prone process Using different tools Exchange data across tools Multiple update/test of code 7

Model-Based Design Workflow Requirements and Specifications Design Implementation Test and Verification Continuous Verification Model Elaboration Executable models - Unambiguous - Only one truth Simulation - Reduces real prototypes - Systematic what-if analysis Automatic code generation - Minimizes coding errors Test with Design - Detects errors earlier 8

Examine a fixed-point algorithm design Model-based Design workflow 1. Set-up simulation flow 2. Express your floating-point algorithm Focus on algorithmic integrity, proof of concept 3. Simulate (floating-point) Iterate on algorithm trade-offs Validate against requirements 4. Convert design to fixed-point Focus on design viability based on implementation constraints 5. Simulate (fixed-point) Iterate on implementation trade-offs Validate against original requirements 6. Generate code for implementation 7. Validate and verify design after deployment MATLAB & Simulink 9

Advantages of Model-Based Design workflow Maintain One Truth One integrated design environment MATLAB benefit: Integrated visualization, analysis & design No sacrifice of simulation speed Automatic path to implementation 10

How does Model-Based Design makes fixed-point design faster and easier? Streamline process of converting your MATLAB algorithms to fixedpoint Simulate fixed-point algorithms with large data sets at compiled-c-code speed Integrate with system-level design in Simulink Generate embeddable C code for implementation with Real-Time Workshop 11

Streamlined floating-to-fixed conversion: introducing Data-type override Turn on the logging mode Set data type override parameters Observe dynamic range of variables in your M-code Set the best fixed-point attributes to avoid overflow/underflow & large quantization errors 12

Tools for scaling a fixed-point variable Data logging Steps involved with dynamic range analysis to convert a design into fixed-point 1. Compute the range based on the min/max logs 2. Compute the integer part to fit variable within range 3. Compute the fraction length as the rest of bit budget 4. Construct the fixed-point numeric type object 13

Fixed-point acceleration: introducing new emlmex function Fast simulation through code generation Automatic generation of C-MEX function from M-function M-code confined to embedded MATLAB language subset Compile C-code execution speed (beyond 100x acceleration in MATLAB) 14

Integrate MATLAB design with Simulink Embedded MATLAB Function block Change parameters and run Simulink simulations from MATLAB Embedded MATLAB Function Integration of Embedded MATLAB Functions in Simulink 15

Automatic fixed-point C code generation Real-Time Workshop Enabled via Simulink Fixedpoint Real-Time Workshop Real-Time Workshop Embedded Coder Supports up to 32-bit fixedpoint numbers Uses only native C integer data types 16

Hands-on Demonstration 1. Implement the algorithm with floating-point data types in M. 2. Convert to fixed-point data types in M and run with default settings; observe scaling issues! 3. Log the full numerical range of variables (data logging and data type override) 4. Use the logged minimum and maximum values to set the fixed-point scaling. 5. Validate the fixed-point solution interactively. 6. Convert M to MEX using EMLMEX function for fast simulation and large test-set verification. 7. Convert M to C in Simulink Embedded MATLAB Function block with Real-Time Workshop for embedded implementation. 17

For more information Fixed-point signal processing webinars Fixed-Point Programming in MATLAB http://www.mathworks.com/cmspro/req11440.html?eventid=32477 Fixed-Point Signal Processing with MATLAB and Simulink http://www.mathworks.com/cmspro/req12157.html?eventid=35522 About MATLAB and Simulink signal processing products http://www.mathworks.com/products/product_listing/index.html Relevant product demos http://www.mathworks.com/products/demos/index.html User-contributed examples in MATLAB Central http://www.mathworks.com/matlabcentral 18

Summary Model-based design Single-truth, integrated design environment for development of a design from idea all the way to realizable implementation Benefits Integrated modeling, simulation and prototyping for signal processing systems Easy conversion to fixed-point data types and trade-off analyses Automatic generation of C-code for DSPs Construct test harnesses for real-time hardware verification 19