HCG: Optimizing Embedded Code Generation of Simulink with SIMD Instruction Synthesis

Zhuo Su,Zehong Yu,Dongyan Wang,Yixiao Yang,Yu Jiang,Rui Wang,Wanli Chang,Jiaguang Sun
DOI: https://doi.org/10.1145/3489517.3530582
2022-01-01
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.
What problem does this paper attempt to address?