Presentation Title

Similar documents
2/80 2

Value Chain ~ (E-Business RD / Pre-Sales / Consultant) APS, Advanc

使用基于模型的设计 进行产品化控制算法开发(II)

Microsoft PowerPoint ARIS_Platform_en.ppt

D C 93 2

rz_Newsletter2016_en_ indd

邏輯分析儀的概念與原理-展示版

Presentation Title

XXX专业本科人才培养方案

Guide to Install SATA Hard Disks

会 议 组 织 研 讨 会 主 席 : 周 巢 尘 院 士 ( 中 国 科 学 院 软 件 研 究 所 ) 程 序 委 员 会 主 席 : 段 振 华 教 授 ( 西 安 电 子 科 技 大 学 ) 董 云 卫 教 授 ( 西 北 工 业 大 学 ) 工 业 专 题 主 席 : 叶 宏 研 究 员

untitled

目次 

Microsoft PowerPoint - ch6 [相容模式]

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與

Microsoft PowerPoint - Aqua-Sim.pptx

Microsoft PowerPoint - ARC110_栾跃.ppt

Computer Architecture

IP TCP/IP PC OS µclinux MPEG4 Blackfin DSP MPEG4 IP UDP Winsock I/O DirectShow Filter DirectShow MPEG4 µclinux TCP/IP IP COM, DirectShow I


前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii

Microsoft PowerPoint - TTCN-Introduction-v5.ppt

CH01.indd

untitled

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

GH1220 Hall Switch

K7VT2_QIG_v3

(baking powder) 1 ( ) ( ) 1 10g g (two level design, D-optimal) 32 1/2 fraction Two Level Fractional Factorial Design D-Optimal D

untitled

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

~ Capability Maturity Model Integration, CMMI CMMI

EK-STM32F

1-2

Microsoft Word - Datastream5.1_使用說明201110

/3 CAD JPG GIS CAD GIS GIS 1 a CAD CAD CAD GIS GIS ArcGIS 9. x 10 1 b 1112 CAD GIS 1 c R2VArcscan CAD MapGIS CAD 1 d CAD U

藍牙網路在資訊家電的應用

WWW PHP

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

Process Data flow Data store External entity 6-10 Context diagram Level 0 diagram Level 1 diagram Level 2 diagram

PowerPoint プレゼンテーション

untitled

甄試報告1125.PDF

热设计网

Epson

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

epub83-1

國家圖書館典藏電子全文

Microsoft Word _4.doc

國立中山大學學位論文典藏.PDF

Microsoft Word - bxyj2007_01_zongdi225.doc

1.3

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

Chapter 2

Cube20S small, speedy, safe Eextremely modular Up to 64 modules per bus node Quick reaction time: up to 20 µs Cube20S A new Member of the Cube Family

BYOD IP+Optical (IP NGN) API 4. End-to-End (Service Aware) 5. IP NGN (IP Next Generation Network) ( ) Prime Carrier Management Access Edge Co

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

Ác Åé å Serial ATA ( Sil3132) S A T A (1) SATA (2) BIOS SATA (3)* RAID BIOS RAID (4) SATA (5) SATA (a) S A T A ( S A T A R A I D ) (b) (c) Windows XP

coverage2.ppt

投影片 1

Windows RTEMS 1 Danilliu MMI TCP/IP QEMU i386 QEMU ARM POWERPC i386 IPC PC104 uc/os-ii uc/os MMI TCP/IP i386 PORT Linux ecos Linux ecos ecos eco

Chapter 24 DC Battery Sizing

CDWA Mapping. 22 Dublin Core Mapping

OOAD PowerDesigner OOAD Applying PowerDesigner CASE Tool in OOAD PowerDesigner CASE Tool PowerDesigner PowerDesigner CASE To

投影片 1

mvc

Designing a Custom AXI Peripheral

附 件 一 : IBM 暑 期 实 习 生 项 目 介 绍 2013 蓝 色 之 路 暑 期 实 习 计 划 是 为 即 将 毕 业 于 2014 年 的 本 科 硕 士 博 士 和 MBA 学 生 量 身 打 造 的 暑 期 实 习 计 划 招 聘 几 乎 涵 盖 IBM 所 有 的

三維空間之機械手臂虛擬實境模擬

13 A DSS B DSS C DSS D DSS A. B. C. CPU D. 15 A B Cache C Cache D L0 L1 L2 Cache 16 SMP A B. C D 17 A B. C D A B - C - D

RunPC2_.doc

Our Mission ICAPlants has been working since a long time in industrial automation, developing specific solutions for many industrial purposes to satis



(Electronic Data Interchange) (Executive Information System) (Economic Order Quantity) (Enterprise Resource Planning) (Flexible Manufacture System) (F

<4D F736F F D20C9CFBAA3BFC6BCBCB4F3D1A7D0C5CFA2D1A7D4BA C4EAC7EFBCBEC8EBD1A7B2A9CABFD7CAB8F1BFBCCAD4CAB5CAA9CFB8D4F22D C8B7B6A8B8E5>

案例正文:(幼圆、小三、加粗)(全文段前与段后0

FAQ -PowerDesigner9.5.DOC

PTS7_Manual.PDF

Multi-national Company Operation and Public...

Oracle 4

<4D F736F F F696E74202D20C8EDBCFEBCDCB9B9CAA6D1D0D0DEBDB2D7F92E707074>

Master Thesis_專門用來製作目錄.doc

EJB-Programming-3.PDF

ERP-1

第二十四屆全國學術研討會論文中文格式摘要

致 谢 本 论 文 能 得 以 完 成, 首 先 要 感 谢 我 的 导 师 胡 曙 中 教 授 正 是 他 的 悉 心 指 导 和 关 怀 下, 我 才 能 够 最 终 选 定 了 研 究 方 向, 确 定 了 论 文 题 目, 并 逐 步 深 化 了 对 研 究 课 题 的 认 识, 从 而 一

Cadence Poqi

Microsoft Word 記錄附件

内容 Outline 1 中国机动化进程及其影响 Motorization and its effects 2 中国道路交通安全发展及形势 Road traffic development and trends 3 中国客车特大事故特征及政策回顾 Fatal crash analysis and s

<B7E2C3E6B7E2B5D72E6169>

PROFIBUS3.doc

南華大學數位論文

OSWorkflow Documentation

untitled

FEJC **.pdf

Chinese oil import policies and reforms 随 着 经 济 的 发 展, 目 前 中 国 石 油 消 费 总 量 已 经 跃 居 世 界 第 二 作 为 一 个 负 责 任 的 大 国, 中 国 正 在 积 极 推 进 能 源 进 口 多 元 化, 鼓 励 替 代

ebook140-9

Microsoft Word - 刘 慧 板.doc

UDC 厦门大学博硕士论文摘要库

ERP ERP ERP ERP ERP 13

Transcription:

嵌入式代码自动生成 周玲 / Ling.Zhou@mathworks.cn 应用工程师 201406 2014 The MathWorks, Inc. 1

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 2

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 3

BLACK BOX P O W E R V R C S I N P U T B L U E G R E E N R E D 核心算法的代码自动生成 Communication Interfaces Comm Drivers Core Software Algorithms and Logic Output Drivers M Actuators Sensors A B C Input Drivers Special Device Drivers RGBSplit-4 Special Interfaces CCP ASAP2 Most Development is on Core Software Algorithms Scheduler/Operating System And Support Utilities 4

代码量的爆炸式增长 Estimated Source Lines of Code (LOC) Today s powertrain: 500,000 LOC Today s vehicles: 1,000,000 LOC 2015 vehicles: 100,000,000 LOC Management trends: High-level architectural planning Algorithm development with models Automatic generation of code from models Industry-wide standardization of interfaces and common functionality Growth of top end automotive embedded software has been exponential. Robert Gee Director of Strategy for Motorola Automotive No longer possible to validate and verify functionality by brute force testing alone. Jim Kolhoff Director of Software Engineering at GM Powertrain Automotive Engineering, Managing for Software Success Aug 2006 sae.org/automag/electronics/08-2006/1-114-8-34.pdf 5

使用更高效的算法开发平台 6

代码自动生成 7

代码自动生成工具 Embedded Coder Embedded Coder Generate C and C++ from MATLAB and Simulink optimized for embedded systems Simulink Coder Simulink Coder Generate C and C++ from Simulink and Stateflow MATLAB Coder MATLAB Coder Generate C and C++ from MATLAB 8

代码自动生成已成为行业趋势 Click for User Story 9

代码自动生成基本流程 模型被充分测试验证以后 : 运行 Model Advisor 配置代码生成选项 生成代码 查看代码报告 代码测试 10

示例 - 简单滤波器算法的代码生成 11

示例 - 代码生成报告 Hyperlink between code and model. Hyperlink within C code files. 12

示例 - 可配置的代码生成 13

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 14

默认入口函数原型 <model>_initialize() initialize signals, states and parameters prior to first time step <model>_step() execute one time step <model>_terminate() Optional. Cleanup after last simulation step. 15

可配置入口函数原型 16

子系统生成单独函数 Virtual Atomic 17

被多次引用的子系统代码重用 18

参数化调用被引用模型 19

代码生成文件控制 20

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 21

Simulink 里的数据 Data in Simulink Data characteristics Signal Parameter State Memory size Storage class Organization Data type External Internal Scalar Array Bus Built-in Local Global Reusability Format exportability Float Integer Fixed-point Precision Word size Signed/unsigned Word size Signed/unsigned Scaling 22

定义数据类型 23

定义存储类型 model.c model_private.h 24

算法模型与数据保持独立 Description Name Value Data type Storage class Rest of model (algorithm, system dynamics, etc.) 25

定义数据对象关联模型数据 Simulink Data Objects which specify characteristics data type, dimensions Signals States parameters Source of data (M-files or MAT-files) Data Algorithm 26

自定义信号的存储类型 Create a signal data object. Use the object name to label a signal in the model. Indicate the signal must resolve to a signal data object. 27

自定义参数的存储类型 Create a parameter data object. Use the parameter as a block parameter in the model. Enable Inline parameters in the model s configuration parameters. 28

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 29

代码生成统计报告 30

移除不需要的代码或数据支持 Removing initialization code (Optimization pane) Removing termination code (Interface pane) Removing data support (Interface pane) Disabling MAT-File Logging (Interface pane) Conditional Input Branch Execution (Optimization pane) No termination function 31

优化数据存储结构 Signal Storage Reuse (Signals and Parameters pane) Enabling Local Block Outputs (Signals and Parameters pane) Reusing Block Outputs (Signals and Parameters pane) Expression Folding (Signals and Parameters pane) Reusing Global Variables (Signals and Parameters pane) Inlining Parameters (Signals and Parameters pane) Block Reduction (Optimization pane) Boolean Logic (Optimization pane) 32

代码优化工具 33

目录 代码生成概述 代码结构控制 模型数据管理 代码生成的优化 代码生成相关 34

其它话题 Scheduler Multi-rate Multi-tasking Optimizing Code Customer Code Integration Customer Storage Class Target Language Compiler AUTOSAR Support Learn more from MathWorks Training Service - Embedded Coder for Production Code Generation (3 days) 35

MathWorks 在中国的技术支持体系 在中国提供多层次的技术支持 应用工程师 : 负责产品层面的支持, 有丰富产品和行业知识 Pilot 工程师 : 结合用户实际项目, 提供指导支持, 有实际项目经验同时对工具链熟悉 技术咨询顾问团队 : 全部是行业和产品专家, 有着丰富的实际项目经验, 目前主要在北美和欧洲, 服务于全球, 在中国已经开始建立团队 培训服务 : 提供公开课和现场的收费培训, 可以针对行业定制 技术支持热线 : 对服务期内正版用户提供 5 8 的电话技术支持 www.mathworks.cn/support/contact_us/ 36

联系我们 官方网站 :www.mathworks.cn 官方微博 : MATLAB 官方社区 ( 英文 ): 中文社区 : 联系电话 ( 总机 ):010 59827000 联系地址 : 迈斯沃克软件 ( 北京 ) 有限公司北京市海淀区科学院南路 2 号融科资讯中心 C 座南楼 3 层 301 迈斯沃克软件 ( 北京 ) 有限公司上海分公司上海市浦东新区竹林路 101 号陆家嘴基金大厦 1702 单元 37