Code Synthesis for Dataflow-Based Embedded Software Design
Zhuo Su,Dongyan Wang,Yixiao Yang,Yu Jiang,Wanli Chang,Liming Fang,Wen Li,Jiaguang Sun
DOI: https://doi.org/10.1109/tcad.2021.3055487
IF: 2.9
2022-01-01
IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
Abstract:Model-driven methodology has been widely adopted in embedded software design, and Dataflow is a widely used computation model, with strong modeling and simulation ability supported in tools such as Ptolemy. However, its code synthesis support is quite limited, which restricts its applications in real industrial practice. In this article, we focus on the automatic code synthesis of Dataflow, and implement DFSynth, a code generator that could support most of the widely used modeling features, such as the expression type and Boolean switch, more efficiently. First, we disassemble the Dataflow model into actors embedded in if-else or switch-case statements based on the schedule analysis, which bridges the semantic gap between the code and the original Dataflow model. Then, we design well-designed templates for each actor, and synthesize well-structured executable C and Java codes with sequential code assembly. Compared to the existing C and Java code generators of Dataflow model in Ptolemy-II, and the C code generator in Simulink, the lines of code synthesized by DFSynth are decreased by an average of 99.7%, 81.4%, and 61.9%, and the execution time of the synthesized code by DFSynth is also decreased by an average of 76.2%, 56.8%, and 22.7%, respectively.