Modeling a 4G LTE System in MATLAB

Similar documents
Introduction to C and HDL Code Generation from MATLAB

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

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

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

Modeling a 4G LTE System in MATLAB Idin Motedayen-Aval Senior Applications Engineer MathWorks

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

Accelerating FPGA/ASIC Design and Verification

MATLAB to iphone Made Easy

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

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

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Optimize DSP Designs and Code using Fixed-Point Designer

Making the Most of your MATLAB Models to Improve Verification

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

Accelerate FPGA Prototyping with

Model-Based Design for Video/Image Processing Applications

Connecting MATLAB & Simulink with your SystemVerilog Workflow for Functional Verification

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

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

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

Simulation, prototyping and verification of standards-based wireless communications

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

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

Design and Verification of FPGA Applications

2015 The MathWorks, Inc. 1

Modeling a 4G LTE System in MATLAB

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

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

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

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

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

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

2015 The MathWorks, Inc. 1

Designing and Targeting Video Processing Subsystems for Hardware

Optimizing and Accelerating Your MATLAB Code

Addressing Fixed Point Design Challenges

Modeling and Verifying Mixed-Signal Designs with MATLAB and Simulink

Introduction to DSP/FPGA Programming Using MATLAB Simulink

Case Study on DiaHDL: A Web-based Electronic Design Automation Tool for Education Purpose

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

Speeding up MATLAB Applications Sean de Wolski Application Engineer

Hardware and Software Co-Design for Motor Control Applications

NEW FPGA DESIGN AND VERIFICATION TECHNIQUES MICHAL HUSEJKO IT-PES-ES

Agenda. Introduction FPGA DSP platforms Design challenges New programming models for FPGAs

High-Level and Model-Based Design Targeting FPGAs and SoCs

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

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

Extending Model-Based Design for HW/SW Design and Verification in MPSoCs Jim Tung MathWorks Fellow

Motor Control: Model-Based Design from Concept to Implementation on heterogeneous SoC FPGAs Alexander Schreiber, MathWorks

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

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

Model-Based Design: Design with Simulation in Simulink

Simplifying FPGA Design for SDR with a Network on Chip Architecture

An Overview of a Compiler for Mapping MATLAB Programs onto FPGAs

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

Cover TBD. intel Quartus prime Design software

Real-Time Testing in a Modern, Agile Development Workflow

Cover TBD. intel Quartus prime Design software

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

AccelDSP tutorial 2 (Matlab.m to HDL for Xilinx) Ronak Gandhi Syracuse University Fall

Simulink Matlab To Vhdl Route For Full Custom Fpga Rapid

Accelerating System Simulations

OUTLINE RTL DESIGN WITH ARX

MODEL BASED HARDWARE DESIGN WITH SIMULINK HDL CODER

Method We follow- How to Get Entry Pass in SEMICODUCTOR Industries for 3rd year engineering. Winter/Summer Training

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

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

Targeting Motor Control Algorithms to System-on-Chip Devices

Developing a Data Driven System for Computational Neuroscience

Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

MATLAB/Simulink in der Mechatronik So einfach geht s!

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

Multi-Gigahertz Parallel FFTs for FPGA and ASIC Implementation

CO SIMULATION OF GENERIC POWER CONVERTER USING MATLAB/SIMULINK AND MODELSIM

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

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

Modeling HDL components for FPGAs in control applications

Fixed-point Simulink Designs for Automatic HDL Generation of Binary Dilation & Erosion

DSP Builder Handbook Volume 1: Introduction to DSP Builder

FPGA Based Digital Design Using Verilog HDL

Model-Based Embedded System Design

RFNoC : RF Network on Chip Martin Braun, Jonathon Pendlum GNU Radio Conference 2015

FPGA design with National Instuments

System Level Design with IBM PowerPC Models

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

Getting Started with MATLAB Francesca Perino

DSP Flow for SmartFusion2 and IGLOO2 Devices - Libero SoC v11.6 TU0312 Quickstart and Design Tutorial

VHDL Essentials Simulation & Synthesis

A Rapid Prototyping Methodology for Algorithm Development in Wireless Communications

Chapter 5. Hardware Software co-simulation

RTL Coding General Concepts

CMPE 415 Programmable Logic Devices Introduction

What s New in Simulink in R2015b and R2016a

FPGA for Software Engineers

ECC1 Core. Elliptic Curve Point Multiply and Verify Core. General Description. Key Features. Applications. Symbol

A Model-based Embedded Control Hardware/Software Co-design Approach for Optimized Sensor Selection of Industrial Systems

2015 The MathWorks, Inc. 1

ESL design with the Agility Compiler for SystemC

Keysight Technologies FPGA Prototyping Using Keysight SystemVue. Application Note

Transcription:

Modeling a 4G LTE System in MATLAB Part 3: Path to implementation (C and HDL) Houman Zarrinkoub PhD. Signal Processing Product Manager MathWorks houmanz@mathworks.com 2011 The MathWorks, Inc. 1

LTE Downlink processing Advanced channel coding MIMO OFDM Adapt Everything 2

Why Engineers translate MATLAB to C today? Integrate MATLAB algorithms w/ existing C environment using source code or static libraries Prototype MATLAB algorithms on desktops as standalone executables Accelerate user-written MATLAB algorithms Implement C/C++ code on processors or hand-off to software engineers 3

Automatic Translation of MATLAB to C iterate Algorithm Design and Code Generation in MATLAB verify / accelerate With MATLAB Coder, design engineers can Maintain one design in MATLAB Design faster and get to C/C++ quickly Test more systematically and frequently Spend more time improving algorithms in MATLAB 4

MATLAB Language Support for Code Generation visualization variable-sized data Java struct functions malloc sparse global numeric System objects nested functions complex arrays fixed-point classes persistent graphics 5

Supported MATLAB Language Features and Functions Broad set of language features and functions/system objects supported for code generation. Matrices and Arrays Data Types Programming Constructs Functions Matrix operations N-dimensional arrays Subscripting Frames Persistent variables Global variables Complex numbers Integer math Double/single-precision Fixed-point arithmetic Characters Structures Numeric classes Variable-sized data System objects Arithmetic, relational, and logical operators Program control (if, for, while, switch ) MATLAB functions and sub-functions Variable length argument lists Function handles Supported algorithms > 400 MATLAB operators and functions > 200 System objects for Signal processing Communications Computer vision 6

Fixed-Point Design: Motivation ASIC/FPGA or fixed-point DSP implementation Saves power and/or cost Introduces quantization errors L-N N overflow Integer + sign fractional Quantization L Word length and Fraction Length must be specified For every variable Degradation must be analyzed 7

Doing Fixed-Point in C is Hard No native fixed-point math libraries No built-in overflow / underflow checks No tools to determine optimal integer and fractional bits No visualization of floating and fixed-point representations 8

Fixed-Point Specification in MATLAB Quantizing data: x_fxp = fi( x, 1, 16, 15) % 16 bits, 15 fractional bits Architecture specification: 16,32,40 bits (DSP) vs flexible number of bits (FPGA) Arithmetic rules: full precision, keep MSB 9

MATLAB Accelerates Fixed-Point Design Streamline conversion of floatingpoint algorithms to fixed-point NumericTypeScope tool Simulate fixed-point algorithms Directly in MATLAB Handle large data sets Simulate with compiled-c-code speed Generate efficient and portable C code with MATLAB Coder codegen command 10

Path to implementation Bring it all to Simulink Elaborate your design Model System-level inaccuracies Compensate Add fixed-point Generate HDL 11

MATLAB to Hardware 2011 The MathWorks, Inc. 12

Why do we use FPGAs? Customized interfaces to peripherals High-speed communication interfaces to other processors Finite state machines, digital logic, timing and memory control Analog I/O Digital I/O Bridge Memory Memory Memory FPGA We are going to focus on this use case today ARM High speed, highly parallel DSP Algorithms DSP DSP Algorithms 13

Separate Views of DSP Implementation System Designer FPGA Designer Algorithm Design System Test Bench RTL Design RTL Verification Fixed-Point Environment Models IP Interfaces Behavioral Simulation Timing and Control Logic Analog Models Hardware Architecture Functional Simulation Architecture Exploration Digital Models Static Timing Analysis Algorithms / IP Algorithms / IP Timing Simulation Implement Design Back Annotation FPGA Requirements Hardware Specification Test Stimulus Synthesis Map Place & Route Hardware 14

What we will learn today MATLAB to Hardware Convert design to fixed-point Use Fixed-point Tool Use NumericTypeScope in MATLAB Verify against floating-point design Serialize design Implementation using HDL Coder Verify through software and/or hardware co-simulation 15

OFDM Transmitter 16

MATLAB to Hardware ifft(x, 2048, 1) Issue #1 x is 2048x4 matrix MATLAB does 2048-pt FFT along first dimension Output is also 2048x4 Cannot process samples this way in hardware! Serialize design Issue #2 MATLAB does double-precision floating-point arithmetic Floating point is expensive in hardware (power and area) Convert to fixed-point 17

HDL Workflow Floating Point Model Satisfies System Requirements Executable Specification MATLAB and/or Simulink Model Model Elaboration Develop Hardware Friendly Architecture in Simulink Convert to Fixed-Point Determine Word Length Determine Binary Point Location Implement Design Generate HDL code using Simulink HDL Coder Import Custom and Vendor IP Verification Software co-simulation with HDL simulator Hardware co-simulation System Requirements Floating Point Model Model Elaboration Implement Code Generation Verification Continuous Verification 20

Divide and conquer Save simulation data to use in development 21

MATLAB-based FFT Can be done Resources 120 LUTs (1%) 32 Slices (1%) 0 DSP48s Need 2048-point FFT 32-point FFT chokes synthesis tool! 22

Re-implement using Simulink blocks compare against original code 23

Convert to fixed-point compare against original code 24

What you just saw Simulink Fixed-Point to model fixed-point data types Word lengths Fraction lengths Fixed-Point Tool monitoring signal min/max, overflow optimization of data types 25

Use original testbench to optimize settings 26

Analyze BER to determine word length Anything beyond 8 bits is good enough 27

Recall ifft(x, 2048, 1) Issue #1 x is 2048x4 matrix MATLAB does 2048-pt FFT along first dimension Output is also 2048x4 Cannot process samples this way in hardware! Serialize design Issue #2 MATLAB does double-precision floating-point arithmetic Floating point is expensive in hardware (power and area) Convert to fixed-point 28

Serial & Fixed-point HDL ready 29

Automatically Generate HDL Code Simulink HDL Coder 30

What You Just Saw - Workflow Advisor Select ASIC, FPGA, Or FPGA Board Target Prepare Model For HDL Code Generation Generate HDL Code Physical Design and Critical Path Highlighting Program FPGA 31

What You Just Saw Generated HDL Code Readable, Portable HDL Code 32

LTE Frame Structure (FDD) 0.5 ms #0 #1 #2 #3 #19.. 1 Frame = 10ms 10ms 10 sub-frames per frame 2 slots per sub-frame (1 slot =.5ms) 7 OFDM symbols per slot 2048 subcarriers in our simulation IFFT output sample time 0.5ms 7 2048 = 3.4877 10 8 s OR 28.672MHz (30.72MHz after cyclic prefix) 33

Frame and Slot Structure 30.72 MHz = 15000 * 2048 25 * cdma2000 = 8 * W-CDMA = 30.72 MHz If we do 2048-length FFT, we can have 15 of them per millisecond But we need a cyclic prefix => Choose to have 14 symbols/ms (1 sub-frame) Split into two slots of 7 symbols 34

Review: Automatic HDL Code Generation Readable, portable HDL code Target ASIC and FPGA Standard Simulink libraries Push-button programming of Xilinx and Altera FPGA Optimize for area and speed Code traceability between model and code 35

FPGA Prototyping Shorter iteration cycles Automatic HDL code generation Integrated HDL verification MATLAB and Simulink System and Algorithm Design Behavioral Simulation Flexible automatic HDL Code generation Synthesizable RTL Back Annotation Speed Optimization Area Optimization Power saving options Resource utilization Validation models Implement Design Synthesis Map Place & Route Verification Functional Simulation Static Timing Analysis Timing Simulation FPGA Hardware 36

HDL Coder Generate VHDL and Verilog Code for FPGA and ASIC designs MATLAB HDL Coder Simulink New: MATLAB to HDL Automatic floating-point to fixed-point conversion HDL resource optimizations and reports Algorithm-to-HDL traceability Verilog and VHDL Integration with simulation & synthesis tools 37

HDL Verifier Verify VHDL and Verilog code using cosimulation and FPGAs MATLAB Simulink New: FPGA Hardware-in-the Loop Verification HDL Verifier Support for 15 Altera and Xilinx FPGA boards ModelSim and Incisive Xilinx and Altera boards Use with: HDL Coder Hand-written HDL code 38

HDL Workflow Floating Point Model Satisfies System Requirements Executable Specification MATLAB and/or Simulink Model Model Elaboration Develop Hardware Friendly Architecture Convert to Fixed-Point Determine Word Length Determine Binary Point Location System Requirements Floating Point Model Model Elaboration Implement Design Generate HDL code using HDL Coder Implement Import Custom and Vendor IP Code Generation Verification Software co-simulation with HDL simulator Hardware co-simulation Verification Continuous Verification 39

Communications Prototyping with USRP2 MATLAB and Simulink for communications system design and verification Behavioral modeling, fixed-point, C/HDL code-gen Reuse simulation model as verification environment with interface to USRP2 radio Experiment and verify with realworld signals and systems MATLAB + Simulink Communications Model UDP Gigabit Ethernet UDP USRP2 40

Summary MATLAB is an ideal language for LTE modeling and simulation Communications System Toolbox extend breadth of MATLAB modeling tools You can accelerate simulation with a variety of options in MATLAB Parallel computing, GPU processing, MATLAB to C Address implementation workflow gaps with Automatic MATLAB to C/C++ and HDL code generation Hardware-in-the-loop verification 41