MFrodo: Efficient and Memory-Sensitive Simulink Code Generation via Redundancy Elimination

IF 3.6 3区 计算机科学 Q2 COMPUTER SCIENCE, HARDWARE & ARCHITECTURE
Zehong Yu;Yixiao Yang;Zhuo Su;Haowei Qiu;Rui Wang;Aiguo Cui;Zhan Shu;Yu Jiang
{"title":"MFrodo: Efficient and Memory-Sensitive Simulink Code Generation via Redundancy Elimination","authors":"Zehong Yu;Yixiao Yang;Zhuo Su;Haowei Qiu;Rui Wang;Aiguo Cui;Zhan Shu;Yu Jiang","doi":"10.1109/TCAD.2025.3628786","DOIUrl":null,"url":null,"abstract":"Simulink has emerged as the fundamental infrastructure that supports modeling, simulation, verification, and code generation for embedded software development. To improve the performance of the code generated from Simulink models, state-of-the-art code generators employ various optimization techniques, such as expression folding, variable reuse, and parallelism. However, they overlook the presence of redundant calculations within data-intensive models widely used to perform substantial data processing in embedded scenarios, which can significantly degrade the performance and introduce additional memory usage. This article proposes <sc>MFrodo</small>, an efficient and memory-sensitive code generator for data-intensive Simulink models through redundancy elimination. <sc>MFrodo</small> begins by conducting model analysis to construct the dataflow graph and derive the input/output (I/O) mapping of each block. Then, for each block within the dataflow graph, <sc>MFrodo</small> recursively determines its calculation range by leveraging the I/O mapping of its subsequent blocks and marks optimization blocks whose calculation range is eliminated. For optimizable blocks, <sc>MFrodo</small> eliminates the redundant calculations and reduces the memory space associated with these calculations. Finally, <sc>MFrodo</small> rebuilds the I/O mappings of these optimizable blocks to ensure code correctness and synthesizes the embedded code for deployment. We implemented and evaluated <sc>MFrodo</small> on benchmark Simulink models, in terms of execution duration, memory usage, and code generation overhead across different compilers and architectures. The results show that, compared with the Simulink Embedded Coder, DFSynth, and HCG, <sc>MFrodo</small> achieves performance improvements ranging from <inline-formula> <tex-math>$1.17\\times $ </tex-math></inline-formula> to <inline-formula> <tex-math>$8.55\\times $ </tex-math></inline-formula>, while reducing BSS segment usage by 12.00%–52.71%. Besides, <sc>MFrodo</small> reduces compile time by 91.8%–98.7% and code synthesis time by 94.3%–99.6% compared with Simulink Embedded Coder, while incurring comparable overhead to DFSynth and HCG.","PeriodicalId":13251,"journal":{"name":"IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems","volume":"45 7","pages":"3455-3468"},"PeriodicalIF":3.6000,"publicationDate":"2026-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11225908/","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/11/4 0:00:00","PubModel":"Epub","JCR":"Q2","JCRName":"COMPUTER SCIENCE, HARDWARE & ARCHITECTURE","Score":null,"Total":0}
引用次数: 0

Abstract

Simulink has emerged as the fundamental infrastructure that supports modeling, simulation, verification, and code generation for embedded software development. To improve the performance of the code generated from Simulink models, state-of-the-art code generators employ various optimization techniques, such as expression folding, variable reuse, and parallelism. However, they overlook the presence of redundant calculations within data-intensive models widely used to perform substantial data processing in embedded scenarios, which can significantly degrade the performance and introduce additional memory usage. This article proposes MFrodo, an efficient and memory-sensitive code generator for data-intensive Simulink models through redundancy elimination. MFrodo begins by conducting model analysis to construct the dataflow graph and derive the input/output (I/O) mapping of each block. Then, for each block within the dataflow graph, MFrodo recursively determines its calculation range by leveraging the I/O mapping of its subsequent blocks and marks optimization blocks whose calculation range is eliminated. For optimizable blocks, MFrodo eliminates the redundant calculations and reduces the memory space associated with these calculations. Finally, MFrodo rebuilds the I/O mappings of these optimizable blocks to ensure code correctness and synthesizes the embedded code for deployment. We implemented and evaluated MFrodo on benchmark Simulink models, in terms of execution duration, memory usage, and code generation overhead across different compilers and architectures. The results show that, compared with the Simulink Embedded Coder, DFSynth, and HCG, MFrodo achieves performance improvements ranging from $1.17\times $ to $8.55\times $ , while reducing BSS segment usage by 12.00%–52.71%. Besides, MFrodo reduces compile time by 91.8%–98.7% and code synthesis time by 94.3%–99.6% compared with Simulink Embedded Coder, while incurring comparable overhead to DFSynth and HCG.
MFrodo:通过冗余消除高效和内存敏感的Simulink代码生成
Simulink已经成为支持嵌入式软件开发的建模、仿真、验证和代码生成的基础架构。为了提高由Simulink模型生成的代码的性能,最先进的代码生成器采用了各种优化技术,例如表达式折叠、变量重用和并行性。然而,它们忽略了数据密集型模型中冗余计算的存在,这些模型广泛用于在嵌入式场景中执行大量数据处理,这可能会显著降低性能并引入额外的内存使用。本文提出了MFrodo,一个高效和内存敏感的代码生成器,通过冗余消除数据密集型Simulink模型。MFrodo首先进行模型分析,构建数据流图,并推导出每个块的输入/输出(I/O)映射。然后,对于数据流图中的每个块,MFrodo通过利用其后续块的I/O映射递归地确定其计算范围,并标记计算范围被消除的优化块。对于可优化的块,MFrodo消除了冗余计算并减少了与这些计算相关的内存空间。最后,MFrodo重建这些可优化块的I/O映射,以确保代码的正确性,并合成用于部署的嵌入式代码。我们在基准Simulink模型上实现并评估了MFrodo,包括跨不同编译器和体系结构的执行时间、内存使用和代码生成开销。结果表明,与Simulink嵌入式编码器、DFSynth和HCG相比,MFrodo实现了1.17 ~ 8.55倍的性能改进,同时减少了BSS段的使用12.00% ~ 52.71%。此外,与Simulink Embedded Coder相比,MFrodo的编译时间减少了91.8%-98.7%,代码合成时间减少了94.3%-99.6%,而产生的开销与DFSynth和HCG相当。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
5.60
自引率
13.80%
发文量
500
审稿时长
7 months
期刊介绍: The purpose of this Transactions is to publish papers of interest to individuals in the area of computer-aided design of integrated circuits and systems composed of analog, digital, mixed-signal, optical, or microwave components. The aids include methods, models, algorithms, and man-machine interfaces for system-level, physical and logical design including: planning, synthesis, partitioning, modeling, simulation, layout, verification, testing, hardware-software co-design and documentation of integrated circuit and system designs of all complexities. Design tools and techniques for evaluating and designing integrated circuits and systems for metrics such as performance, power, reliability, testability, and security are a focus.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书