skip to main content
10.1145/3489517.3530582acmconferencesArticle/Chapter ViewAbstractPublication PagesdacConference Proceedingsconference-collections
research-article
Open access

HCG: optimizing embedded code generation of simulink with SIMD instruction synthesis

Published: 23 August 2022 Publication History

Abstract

Simulink is widely used for the model-driven design of embedded systems. It is able to generate optimized embedded control software code through expression folding, variable reuse, etc. However, for some commonly used computing-sensitive models, such as the models for signal processing applications, the efficiency of the generated code is still limited.
In this paper, we propose HCG, an optimized code generator for the Simulink model with SIMD instruction synthesis. It will select the optimal implementations for intensive computing actors based on adaptively pre-calculation of the input scales, and synthesize the appropriate SIMD instructions for batch computing actors based on the iterative dataflow graph mapping. We implemented and evaluated its performance on benchmark Simulink models. Compared to the built-in Simulink Coder and the most recent DFSynth, the code generated by HCG achieves an improvement of 38.9%-92.9% and 41.2%-76.8% in terms of execution time across different architectures and compilers, respectively.

References

[1]
Gérard Berry. 2007. SCADE: Synchronous design and validation of embedded control software. In Next Generation Design and Verification Methodologies for Distributed Embedded Control Systems. Springer, 19--33.
[2]
Jeff Bilmes, Krste Asanovic, Chee-Whye Chin, and Jim Demmel. 1997. Optimizing matrix multiply using PHiPAC: a portable, high-performance, ANSI C coding methodology. In ACM International Conference on Supercomputing 25th Anniversary Volume. 253--260.
[3]
Joseph Buck, Soonhoi Ha, Edward A. Lee, and David G. Messerschmitt. 2002. Ptolemy: A Framework for Simulating and Prototyping Heterogeneous Systems. In Readings in Hardware/Software Co-Design, Giovanni De Micheli, Rolf Ernst, and Wayne Wolf (Eds.). Morgan Kaufmann, San Francisco, 527--543.
[4]
ARM Developer. [n.d.]. Arm Neon technology. https://developer.arm.com/architectures/instruction-sets/simd-isas/neon
[5]
Intel Developer. 2021. Intel® Intrinsics Guide. https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html
[6]
Matteo Frigo and Steven G Johnson. 1998. FFTW: An adaptive software architecture for the FFT. In Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing, Vol. 3. IEEE, 1381--1384.
[7]
Vector Informatik GmbH. [n.d.]. DaVinci Developer. https://www.vector.com/us/en-us/products/solutions/autosar-classic/
[8]
Karim Jahed and Juergen Dingel. 2019. Enabling model-driven software development tools for the internet of things. In Proceedings of the 11th International Workshop on Modelling in Software Engineerings. IEEE Press, 93--99.
[9]
Yu Jiang, Houbing Song, Yixiao Yang, Han Liu, Ming Gu, Yong Guan, Jiaguang Sun, and Lui Sha. 2018. Dependable model-driven development of cps: From stateflow simulation to verified implementation. ACM Transactions on Cyber-Physical Systems 3, 1 (2018), 12.
[10]
Yu Jiang, Mingzhe Wang, Zhuo Su, Yixiao Yang, and Huihui Wang. 2021. Formal Design of Multi-Function Vehicle Bus Controller. IEEE Transactions on Intelligent Transportation Systems 22, 6 (2021), 3880--3889.
[11]
Yu Jiang, Hehua Zhang, Zonghui Li, Yangdong Deng, Xiaoyu Song, Ming Gu, and Jiaguang Sun. 2015. Design and optimization of multiclocked embedded systems using formal techniques. IEEE Transactions on Industrial Electronics 62, 2 (2015), 1270--1278.
[12]
Paul Le Guernic, Jean-Pierre Talpin, and Jean-Christophe Le Lann. 2003. Polychrony for system design. Journal of Circuits, Systems, and Computers 12, 03 (2003), 261--303.
[13]
Faruk Pasic. 2018. Model-driven development of condition monitoring software. In Proceedings of the 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings. ACM, 162--167.
[14]
David A. Patterson and John L. Hennessy. 1990. Computer Architecture: A Quantitative Approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA.
[15]
Florian Rademacher, Jonas Sorgalla, Sabine Sachweh, and Albert Zündorf. 2019. A model-driven workflow for distributed microservice development. In Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing. ACM, 1260--1262.
[16]
Simulink and Matlab. [n.d.]. Simulink Documentation. https://www.mathworks.com/help/simulink/index.html
[17]
Claudia M Sosa-Reyna, Edgar Tello-Leal, and David Lara-Alabazares. 2018. Methodology for the model-driven development of service oriented IoT applications. Journal of Systems Architecture 90 (2018), 15--22.
[18]
Zhuo Su, Dongyan Wang, Yixiao Yang, Yu Jiang, Wanli Chang, Liming Fang, Wen Li, and Jiaguang Sun. 2021. Code Synthesis for Dataflow Based Embedded Software Design. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (2021).
[19]
Jiaguang Sun and Lui Sha. 2016. Safety-Assured Formal Model-Driven Design of the Multifunction Vehicle Bus Controller. Formal Methods LNCS 9995 (2016), 757.

Cited By

View all
  • (2025)Knight: Optimizing Code Generation for Simulink Models With Loop ReshapingIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2024.343869144:2(444-457)Online publication date: Feb-2025
  • (2024)AccMoS: Accelerating Model Simulation for Simulink via Code GenerationProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3656218(1-6)Online publication date: 23-Jun-2024
  • (2024)Efficient Code Generation for Data-Intensive Simulink Models via Redundancy EliminationProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3656217(1-6)Online publication date: 23-Jun-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
DAC '22: Proceedings of the 59th ACM/IEEE Design Automation Conference
July 2022
1462 pages
ISBN:9781450391429
DOI:10.1145/3489517
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 August 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. SIMD instruction
  2. code generation
  3. model-driven design
  4. simulink

Qualifiers

  • Research-article

Funding Sources

  • NSFC
  • National Key Research and Development Project

Conference

DAC '22
Sponsor:
DAC '22: 59th ACM/IEEE Design Automation Conference
July 10 - 14, 2022
California, San Francisco

Acceptance Rates

Overall Acceptance Rate 1,770 of 5,499 submissions, 32%

Upcoming Conference

DAC '25
62nd ACM/IEEE Design Automation Conference
June 22 - 26, 2025
San Francisco , CA , USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)127
  • Downloads (Last 6 weeks)9
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Knight: Optimizing Code Generation for Simulink Models With Loop ReshapingIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2024.343869144:2(444-457)Online publication date: Feb-2025
  • (2024)AccMoS: Accelerating Model Simulation for Simulink via Code GenerationProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3656218(1-6)Online publication date: 23-Jun-2024
  • (2024)Efficient Code Generation for Data-Intensive Simulink Models via Redundancy EliminationProceedings of the 61st ACM/IEEE Design Automation Conference10.1145/3649329.3656217(1-6)Online publication date: 23-Jun-2024
  • (2024)Task Mapping and Scheduling on RISC-V MIMD Processor With Vector Accelerator Using Model-Based ParallelizationIEEE Access10.1109/ACCESS.2024.337390212(35779-35795)Online publication date: 2024
  • (2023)PHCG: Optimizing Simulink Code Generation for Embedded System With SIMD InstructionsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2022.319750442:4(1072-1084)Online publication date: 1-Apr-2023
  • (2023)Partition Based Differential Testing for Finding Embedded Code Generation Bugs in Simulink2023 60th ACM/IEEE Design Automation Conference (DAC)10.1109/DAC56929.2023.10247877(1-6)Online publication date: 9-Jul-2023

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media