MathWorks - Mobile View
  • 碻形冰暨硞 MathWorks 帐憷碻形冰暨硞 MathWorks 帐憷
  • Access your MathWorks Account
    • 我的帐户
    • 我的社区资料
    • 关联许可证
    • 登出
  • 产品
  • 解决方案
  • 学术
  • 支持
  • 社区
  • 活动
  • 获取 MATLAB
MathWorks
  • 产品
  • 解决方案
  • 学术
  • 支持
  • 社区
  • 活动
  • 获取 MATLAB
  • 碻形冰暨硞 MathWorks 帐憷碻形冰暨硞 MathWorks 帐憷
  • Access your MathWorks Account
    • 我的帐户
    • 我的社区资料
    • 关联许可证
    • 登出

视频与网上研讨会

  • MathWorks
  • 视频
  • 视频首页
  • 搜索
  • 视频首页
  • 搜索
  • 联系销售
  • 试用软件
  Register to watch video
  • Description
  • Full Transcript
  • Related Resources

FPGA Design with MATLAB, Part 1: Why Use MATLAB and Simulink

From the series: FPGA Design with MATLAB

Raghu Sivakumar, MathWorks

HDL Coder™ generates synthesizable VHDL® or Verilog® RTL from MATLAB® functions, Simulink® models, and Stateflow® charts that can be used to target FPGA or ASIC hardware. This tutorial uses a simple signal-processing algorithm to show the typical steps our customers follow to adapt their high-level algorithms with hardware architecture detail so they can be implemented efficiently in hardware and verified at each step.

This video covers:

  • Key considerations for hardware design: streaming data and fixed resources
  • Strengths of MATLAB and Simulink and how to leverage each for hardware design
  • Overview of the workflow, including verification of each step
  • HDL Coder Self-Guided Tutorial overview
  • Introduction to the MATLAB golden reference algorithm
  • Adapting the frame-based algorithm to a streaming algorithm

Welcome to the HDL Coder Video Series. In this video series we will learn a popular production proven path to take a MATLAB digital signal processing algorithm through Simulink, Fixed-Point Designer, and HDL Coder to target an FPGA.

 In the first part of the video series we will discuss the strength of MATLAB and Simulink and provide an overview of the HDL Coder Self-Guided Tutorial available on the MathWorks File Exchange website.

 HDL Coder generates synthesizable VHDL or Verilog from MATLAB functions, Simulink models, and Stateflow charts that can be used to target FPGA or ASIC hardware.

MATLAB is a high-level language and interactive environment where complex mathematical operations can be easily performed on large sets of data. This ability of MATLAB makes it an ideal tool to develop digital signal-processing algorithms. To target such a powerful language onto hardware, we need to understand that the FPGA hardware is a fixed set of resource. The FPGA hardware has limited bandwidth of resources consisting of input/output blocks, memory, and DSP slices which must be effectively used to achieve an optimized design architecture while achieving the desired outcome. As resources are fixed in hardware, to perform operations on large data sets we will work on stream of bits while coordinating the timing to obtain the right answer.

Simulink provides an environment where you can describe how the algorithm design will work with the stream of data and simulate before moving to hardware implementation. Simulink has a built-in sense of time and aids in visualizing the data types and sizes, propagation through operations which are key to creating a good hardware architecture. Simulink has an HDL-optimized library with more than 250 blocks and compatible with HDL Code Generation.

Thus, to deploy MATLAB algorithm on a FPGA, the recommended workflow is to use MATLAB and Simulink together to combine textual and graphical programming in a simulation environment. We will use the MATLAB algorithm as a golden reference, describe the hardware architecture in Simulink, convert to fixed point, and utilize Simulink’s visualization to optimize the generated HDL code. Thus, each step in Simulink can be verified in MATLAB and utilizes MATLAB as a test and visualization environment.

To illustrate the workflow, we will utilize the HDL Coder Self-Guided Tutorial example from MathWorks File Exchange website.

The tutorial comes with a visual guide and provides step-by-step instructions to implement a MATLAB algorithm onto a FPGA. In addition, the tutorial provides the necessary MATLAB and test bench scripts.

In the MATLAB Reference Script, the pulse to detect is created and is inserted in a transmit signal. Noise is added to represent a real world receive signal. To detect the pulse in MATLAB we will utilize the entire “frame” of the received signal and pass it through a matched filter with desired coefficients. This algorithm will be our MATLAB golden reference, which will detect the peak value and its location.

Hardware works on a continuous stream of bits, and peak detection is obtained by sliding a window over a sample of the bit-stream. To ensure this method gives us the desired result, we create a MATLAB algorithm which represents the hardware implementation. This we will call the hardware-friendly algorithm.

The hardware implementation algorithm detects the peak within a sliding window of the last 11 samples under the criteria. The middle sample is the largest and the middle sample is greater than a pre-determined threshold. This algorithm will be utilized to verify and compare the output of the Simulink model implementation.

In the first part of this video series on the HDL Coder, we have discussed the strengths of MATLAB and Simulink environment and provided an overview of the Pulse Detector MATLAB algorithm, which will be used to highlight the HDL Coder Workflow required to implement a MATLAB algorithm on a FPGA.

In the next video we will design the Simulink implementation of the Pulse Detector Algorithm and compare it to the MATLAB golden reference.

Related Products

  • HDL Coder
  • Fixed-Point Designer
  • HDL Verifier

Learn More

Get HDL Coder Self-Guided Tutorial
Related Information
Request HDL Coder Trial

Feedback

Featured Product

HDL Coder

  • Request Trial
  • Get Pricing

Up Next:

Use Simulink and HDL-ready blocks to design and visualize the high-level architecture of your FPGA design.
4:42
Part 2: Modeling Hardware in Simulink
View full series (5 Videos)

Related Videos:

20:02
A Guided Workflow for Zynq Using MATLAB and Simulink
30:14
Rapid Deployment of MATLAB and Simulink Designs on Xilinx...
2:01
Course Preview: Programming Xilinx Zynq SoCs with MATLAB...
19:50
How to Build Custom Motor Controllers for Zynq SoCs with...
19:41
Prototyping SoC-based Motor Controllers with MATLAB and...

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 联系销售
  • 试用软件

了解产品

  • MATLAB
  • Simulink
  • 学生版软件
  • 硬件支持
  • 文件交换

试用或购买

  • 下载
  • 试用软件
  • 联系销售
  • 定价和许可
  • 如何购买

如何使用

  • 文档
  • 教程
  • 示例
  • 视频与网上研讨会
  • 培训

获取支持

  • 安装帮助
  • MATLAB 问答社区
  • 咨询
  • 许可中心
  • 联系支持

关于 MathWorks

  • 招聘
  • 新闻室
  • 社会愿景
  • 联系销售
  • 关于 MathWorks

MathWorks

Accelerating the pace of engineering and science

MathWorks 公司是世界领先的为工程师和科学家提供数学计算软件的开发商。

发现…

  • Select a Web Site United States
  • 专利
  • 商标
  • 隐私权政策
  • 防盗版
  • 应用状态

京ICP备12052471号

© 1994-2021 The MathWorks, Inc.

  • Weibo
  • WeChat

    WeChat

  • Bilibili
  • Youku
  • Facebook
  • Twitter
  • LinkedIn
  • RSS

关注我们