跳到主要导航 跳到搜索 跳到主要内容

Mercury: Instruction Pipeline Aware Code Generation for Simulink Models

  • Zehong Yu
  • , Zhuo Su*
  • , Yixiao Yang
  • , Jie Liang
  • , Yu Jiang*
  • , Aiguo Cui
  • , Wanli Chang
  • , Rui Wang
  • *此作品的通讯作者
  • Tsinghua University
  • Capital Normal University
  • Huawei Technologies Co., Ltd.
  • Hunan University

科研成果: 期刊稿件文章同行评审

摘要

Simulink is a widely used model-driven design environment for supporting the simulation and code generation of embedded applications. To improve the quality of the code generated from Simulink models, state-of-the-art code generators employ various high-level optimizations, like eliminating local variables. However, they overlook the compatibility between code and the low-level processor architecture, especially the instruction pipeline. Consequently, instruction pipeline stalls occur frequently, leading to additional delays in instruction execution, as well as limited efficiency for deployed the embedded software. In this article, we propose Mercury, an instruction pipeline aware code generator for Simulink models which utilizes data dependencies between actors to decrease the instruction pipeline stalls of the generated code. First, Mercury collects data dependencies through model dataflow traversal and records the property of each actor. Then, Mercury approximately estimates the execution latency of required instructions fetched from corresponding actors and uses a topology-based method to obtain candidate actors for code synthesis. Finally, Mercury adopts the least penalty priority to iteratively select the most suitable actor for code synthesis and releases data dependencies with its subsequent actors. We implemented and evaluated Mercury on benchmark Simulink models (Su et al., 2021) as well as a real industrial model. Compared to the official tool Simulink Embedded Coder and the state-of-the-art academic tool DFSynth, Mercury outperformed them by 9.7%-33.4% and 9.2%-59.4% in terms of the execution time of the generated code across different architectures, respectively. The statistics also demonstrate that the generated code of Mercury increases utilization of pipeline slots by 11.0%-37.1% and 10.6%-50.0%, respectively.

源语言英语
页(从-至)4504-4515
页数12
期刊IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
41
11
DOI
出版状态已出版 - 1 11月 2022
已对外发布

指纹

探究 'Mercury: Instruction Pipeline Aware Code Generation for Simulink Models' 的科研主题。它们共同构成独一无二的指纹。

引用此