Accelerate FPGA Prototyping with

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

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

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

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

Accelerating FPGA/ASIC Design and Verification

Introduction to C and HDL Code Generation from MATLAB

Design and Verification of FPGA and ASIC Applications Graham Reith MathWorks

Modeling a 4G LTE System in MATLAB

Making the Most of your MATLAB Models to Improve Verification

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

Optimize DSP Designs and Code using Fixed-Point Designer

Design and Verification of FPGA Applications

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

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

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

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

Model-Based Design for Video/Image Processing Applications

Connecting MATLAB & Simulink with your SystemVerilog Workflow for Functional Verification

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

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

Quartus Counter Example. Last updated 9/6/18

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

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

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

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

Designing and Targeting Video Processing Subsystems for Hardware

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

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

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

In our case Dr. Johnson is setting the best practices

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

Addressing Fixed Point Design Challenges

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

What s New in Simulink in R2015b and R2016a

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

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

Assignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture

MODEL BASED HARDWARE DESIGN WITH SIMULINK HDL CODER

Fixed and Floating Point Packages

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

Test Benches - Module 8

Modeling and Verifying Mixed-Signal Designs with MATLAB and Simulink

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

Summary of FPGA & VHDL

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

TKT-1212 Digitaalijärjestelmien toteutus. Lecture 7: VHDL Testbenches Ari Kulmala, Erno Salminen 2008

Model-Based Design: Design with Simulation in Simulink

VHDL: Code Structure. 1

Modeling HDL components for FPGAs in control applications

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

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

ECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University

MATLAB/Simulink in der Mechatronik So einfach geht s!

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

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

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

XPLANATION: FPGA 101. The Basics of. by Adam Taylor Principal Engineer EADS Astrium FPGA Mathematics

Real-Time Testing in a Modern, Agile Development Workflow

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices

EITF35: Introduction to Structured VLSI Design

2015 The MathWorks, Inc. 1

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Part 4: VHDL for sequential circuits. Introduction to Modeling and Verification of Digital Systems. Memory elements. Sequential circuits

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

TSIU03, SYSTEM DESIGN LECTURE 2

Sequential Logic - Module 5

ECE 545 Lecture 4. Simple Testbenches. George Mason University

Hardware and Software Co-Design for Motor Control Applications

VHDL for Logic Synthesis

FPGA briefing Part II FPGA development DMW: FPGA development DMW:

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

Lecture 4. VHDL Fundamentals. George Mason University

Hardware and Software Co-Design for Motor Control Applications

Targeting Motor Control Algorithms to System-on-Chip Devices

FPGA design with National Instuments

Hardware and Software Co-Design for Motor Control Applications

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

Simulink Matlab To Vhdl Route For Full Custom Fpga Rapid

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

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

1 ST SUMMER SCHOOL: VHDL BOOTCAMP PISA, JULY 2013

Design Progression With VHDL Helps Accelerate The Digital System Designs

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

Lecture 6. Advanced Testbenches. George Mason University

Model to Code, Made Simple and Easy Sebastien Dupertuis Application Engineer Applications Engineering Group MathWorks Switzerland June 11, 2015

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

VHDL Simulation. Testbench Design

ECE 545 Lecture 7. Advanced Testbenches. George Mason University

Tutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy

CCE 3202 Advanced Digital System Design

VHDL/Verilog Simulation. Testbench Design

Sign here to give permission to return your test in class, where other students might see your score:

VHDL And Synthesis Review

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

Sequential Statement

DSP Builder User Guide

Design Guidelines for Using DSP Blocks

ECE 545 Lecture 17 RAM. George Mason University

OUTLINE SYSTEM-ON-CHIP DESIGN. GETTING STARTED WITH VHDL September 3, 2018 GAJSKI S Y-CHART (1983) TOP-DOWN DESIGN (1)

ECE 545: Lecture 11. Programmable Logic Memories

Transcription:

Accelerate FPGA Prototyping with MATLAB and Simulink September 21 st 2010 Stephan van Beek Senior Application Engineer 1

From Idea to Implementation DESIGN Algorithm Development MATLAB Simulink Stateflow Need for FPGA prototyping: Real-Time Simulation Modeling accuracy Interfacing with peripherals 2

Key Takeaways Automation of manual steps in FPGA prototyping allowing shorter iteration cycles Integration of FPGA development tools enhances verification Automatic ti HDL Code generation can be adapted d to meet your requirement 3

From Idea to Implementation (manual) DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion HDL Code Creation HDL Verification FPGA Prototyping 4

MathWorks Solutions DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion Fixed-Point IMPLEMENTATION C, C++ VHDL, Verilog SPICE MCU DSP FPGA ASIC Analog Hardware TES ST & VERIFIC CATION HDL Code Creation HDL Verification FPGA Prototyping INTEGRATION 5

MathWorks Solutions DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion Fixed-Point IMPLEMENTATION C, C++ VHDL, Verilog SPICE MCU DSP FPGA ASIC Analog Hardware TES ST & VERIFIC CATION HDL Code Creation HDL Verification FPGA Prototyping INTEGRATION 6

How to Handle Fixed-Point Conversion? MATLAB Simulink Pi = 3.141592653589793 Stateflow Pi = 3.141601562500000 Signed, 14-bits, 11 bits fraction Resources? Overflow? Precision? Error=8.9089e-6 FPGA Pi = 01100100100010 MathWorks solution: Fixed-Point i Tools 7

Simulink Fixed-Point Convert floating point to fixed point models Automatic tracking of signal range (also intermediate quantities) Fraction lengths recommendation Bit-true models in the same environment 8

MathWorks Solutions DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion Fixed-Point IMPLEMENTATION C, C++ VHDL, Verilog SPICE MCU DSP FPGA ASIC Analog Hardware TES ST & VERIFIC CATION HDL Code Creation HDL Verification FPGA Prototyping INTEGRATION 9

-- ------------------------------------------------------------ -- -- File Name: hdlsrc\stage1 -- Created: 2010-06-22 15:42:41 -- Generated by MATLAB 7.11 and Simulink HDL Coder 2.0 -- -- ------------------------------------------------------------ -- -- -- ------------------------------------------------------------ -- -- Module: Stage1 -- Source Path: m03_ddc_hdlgen/ddc_hdl/lowpass Filter/Stage1 -- -- ------------------------------------------------------------ -- LIBRARY IEEE; USE IEEE.std_logic_1164.all; USE IEEE.numeric_std.ALL; ENTITY Stage1 IS PORT( clk : IN std_logic; enb_1_1_1 : IN std_logic; reset : IN std_logic; Stage1_in_re : IN std_logic_vector(17 DOWNTO 0); -- sfix18_en16 Stage1_in_im : IN std_logic_vector(17 DOWNTO 0); -- sfix18_en16 Stage1_out_re : OUT std_logic_vector(17 DOWNTO 0); -- sfix18_en16 Stage1_out_im : OUT std_logic_vector(17 DOWNTO 0) -- sfix18_en16 ); END Stage1; ---------------------------------------------------------------- --Module Architecture: Stage1 ---------------------------------------------------------------- ARCHITECTURE rtl OF Stage1 IS -- Local Functions -- Type Definitions iti TYPE input_pipeline_type IS ARRAY (NATURAL range <>) OF signed(17 DOWNTO 0); -- sfix18_en16 -- Constants CONSTANT coeffphase1_1 : signed(17 DOWNTO 0) := to_signed(20991, 18); -- sfix18_en18 CONSTANT coeffphase1_2 : signed(17 DOWNTO 0) := to_signed(65368, 18); -- sfix18_en18 CONSTANT coeffphase2_1 : signed(17 DOWNTO 0) := to_signed(65368, 18); -- sfix18_en18 CONSTANT coeffphase2_2 : signed(17 DOWNTO 0) := to_signed(20991, 18); -- sfix18_en18 CONSTANT coeffphase3_1 : signed(17 DOWNTO 0) := to_signed(89431, 18); -- sfix18_en18 CONSTANT coeffphase3_2 : signed(17 DOWNTO 0) := to_signed(0, 18); -- sfix18_en18 -- Signals SIGNAL ring_count : unsigned(2 DOWNTO 0); -- ufix3 SIGNAL phase_0 : std_logic; -- boolean SIGNAL phase_1 : std_logic; -- boolean SIGNAL phase_2 : std_logic; -- boolean SIGNAL input_typeconvert_re : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL input_typeconvert_im : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL input_pipeline_phase0_re : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL input_pipeline_phase0_im : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL input_pipeline_phase1_re : input_pipeline_type(0 TO 1); -- sfix18_en16 SIGNAL input_pipeline_phase1_im : input_pipeline_type(0 TO 1); -- sfix18_en16 SIGNAL input_pipeline_phase2_re : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL input_pipeline_phase2_im : signed(17 DOWNTO 0); -- sfix18_en16 SIGNAL product_phase0_1_re : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL product_phase0_1_im : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL mul_temp : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL mul_temp_1 : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL product_phase0_2_re : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL product_phase0_2_im phase0 : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL mul_temp_2 : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL mul_temp_3 : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL product_phase1_1_re : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL product_phase1_1_im : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL mul_temp_4 : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL mul_temp_5 : signed(35 DOWNTO 0); -- sfix36_en34 SIGNAL product_phase1_2_re : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL product_phase1_2_im : signed(47 DOWNTO 0); -- sfix48_en48 SIGNAL mul temp 6 : signed(35 DOWNTO 0); -- sfix36 En34 BEGIN -- Block Statements ce_output : PROCESS (clk, reset) BEGIN IF reset = '1' THEN ring_ count <= to_ unsigned(1, 3); ELSIF clk'event AND clk = '1' THEN IF enb_1_1_1 = '1' THEN ring_count <= ring_count(0) & ring_count(2 DOWNTO 1); END IF; END IF; END PROCESS ce_output; phase_0 <= ring_count(0) AND enb_1_1_1; phase_1 <= ring_count(1) AND enb_1_1_1; phase_2 <= ring_count(2) AND enb_1_1_1; input_typeconvert_re _ <= signed(stage1_in_re); _ input_typeconvert_im <= signed(stage1_in_im); Delay_Pipeline_Phase0_process : PROCESS (clk, reset) BEGIN IF reset = '1' THEN input_pipeline_phase0_re <= (OTHERS => '0'); input_pipeline_phase0_im <= (OTHERS => '0'); ELSIF clk'event AND clk = '1' THEN IF phase_0 = '1' THEN input_pipeline_phase0_re <= input_typeconvert_re; input_pipeline_phase0_im <= input_typeconvert_im; END IF; END IF; END PROCESS Delay_Pipeline_Phase0_process; Delay_Pipeline_Phase1_process : PROCESS (clk, reset) BEGIN IF reset = '1' THEN input_pipeline_phase1_re(0 TO 1) <= (OTHERS => (OTHERS => '0')) input_pipeline_phase1_im(0 TO 1) <= (OTHERS => (OTHERS => '0')) ELSIF clk'event AND clk = '1' THEN IF phase_1 = '1' THEN input_pipeline_phase1_re(0) <= input_typeconvert_re; input_pipeline_phase1_re(1) <= input_pipeline_phase1_re(0); input_pipeline_phase1_im(0) <= input_typeconvert_im; input_pipeline_phase1_im(1) <= input_pipeline_phase1_im(0); END IF; END IF; END PROCESS Delay_Pipeline_Phase1_process; Delay_Pipeline_Phase2_process : PROCESS (clk, reset) BEGIN IF reset = '1' THEN input_pipeline_phase2_re <= (OTHERS => '0'); 10

Manual HDL Code Creation Typical HDL designs contain many lines of code Days or maybe weeks to develop? How to implement Fixed Point in HDL? What if the specification changes? MathWorks solution: Automatic ti HDL Code Generation 11

Simulink HDL Coder Simulink HDL Coder generates bit-true, cycle-accurate, synthesizable HDL code from Simulink models, Stateflowt charts, and MATLAB code Accelerates generation and verification i of vendor independent, readable RTL code 12

MathWorks Solutions DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion Fixed-Point IMPLEMENTATION C, C++ VHDL, Verilog SPICE MCU DSP FPGA ASIC Analog Hardware TES ST & VERIFIC CATION HDL Code Creation HDL Verification FPGA Prototyping INTEGRATION 13

HDL Verification Design the Test Bench twice 10-to-1 1 ratio of Test bench LOC to Design LOC Many stimuli-files from MATLAB These are ideal references which require pre- and post-processing How to analyze results? MathWorks solution: Re-Use System Level Testbench 14

Co-Simulation with HDL Simulator 15

Co-Simulation with HDL Simulator Re-use of MATLAB/Simulink testbench Extended analysis capabilities Dynamic Testbench (closed loop verification, multi domain) Automatic creation of co-simulation models Integrating handwritten HDL code 16

MathWorks Solutions DESIGN Algorithm Development MATLAB Simulink Stateflow Fixed Point Conversion Fixed-Point IMPLEMENTATION C, C++ VHDL, Verilog SPICE MCU DSP FPGA ASIC Analog Hardware TES ST & VERIFIC CATION HDL Code Creation HDL Verification FPGA Prototyping INTEGRATION 17

FPGA Prototyping Building confidence Tool flow automation ti Interfacing with peripherals MathWorks solution: Integration ti with 3 rd party solutions 18

FPGA-in-the-Loop Simulation FPGA development board 19

FPGA Workflow Advisor Automated workflow from model to FPGA prototyping 20

HDL Coder Only for Prototyping? Folding to reduce area Automatically ti add Pipelining to improve timing 21

Summary Automation of manual steps in FPGA prototyping allowing shorter iteration cycles Assisted Fixed Point Conversion Automatic HDL Code Generation FPGA Turnkey Flow Integration of FPGA development tools enhances verification Improved analysis, closed loop verification, multi domain Automatic HDL Code generation can be adapted to meet your requirements Optimization for area and speed 22

Next steps.. Visit www.mathworks.nl/fpga for more information Request a free guided Simulink HDL Coder trial Contact your local sales rep Watch our Simulink HDL Coder webinars: http://www.mathworks.nl/company/events/webinars Questions?? 23