Code Generation from Simulink Models with Task and Data Parallelism

Authors

  • Pin Xu Nagoya University
  • Masato Edahiro
  • Kondo Masaki

DOI:

https://doi.org/10.24297/ijct.v21i.9004

Keywords:

Simulink model, code generation, task parallelism, data parallelism

Abstract

In this paper, we propose a method to automatically generate parallelized code from Simulink models, while exploiting both task and data parallelism. Building on previous research, we propose a model-based parallelizer (MBP) that exploits task parallelism and assigns tasks to CPU cores using a hierarchical clustering method. We also propose a
method in which data-parallel SYCL code is generated from Simulink models; computations with data parallelism are expressed in the form of S-Function Builder blocks and are executed in a heterogeneous computing environment. Most parts of the procedure can be automated with scripts, and the two methods can be applied together. In the evaluation, the data-parallel programs generated using our proposed method achieved a maximum speedup of approximately 547 times, compared to sequential programs, without observable differences in the computed results. In addition, the programs generated while exploiting both task and data parallelism were confirmed to have achieved better performance than those exploiting either one of the two.

Downloads

Download data is not yet available.

References

Alpay, A. (2020). Hipsycl. Heidelberg University. Retrieved January 24, 2021, from

https://github.com/illuhad/hipSYCL

Cha, M., Kim, K. H., Lee, C. J., Ha, D., & Kim, B. S. (2011). Deriving high-performance real-time multicore systems based on simulink applications, In 2011 ieee ninth international conference on dependable, autonomic and secure computing. IEEE. https://doi.org/10.1109/DASC.2011.64

Cha, M., Kim, S., & Kim, K. (2012). An automatic parallelization scheme for simulink-based real-time multicore systems. Science & Engineering Reasearch Support Society, 5, 215–217. http://onlinepresent.org/proceedings/ vol5_2012/37.pdf

Cilardo, A., Socci, D., & Mazzocca, N. (2014). Asp-based optimized mapping in a simulink-to-mpsoc designflow. Journal of Systems Architecture, 60 (1), 108–118. https://doi.org/10.1016/j.sysarc.2013.10.004

Codeplay. (2020). Computecpp. Codeplay Software Ltd. Retrieved January 24, 2021, from

https://developer.codeplay. com/products/computecpp/ce/home/

Feautrier, P. (1996). Automatic parallelization in the polytope model. In The data parallel programming model (pp. 79– 103). Springer. https://doi.org/10.1007/3-540-61736-1_44

GNU. (2020). Gnu gprof. Free Software Foundation, Inc. Retrieved January 24, 2021, from http://sourceware.org/ binutils/docs/gprof/

Han, G., Di Natale, M., Zeng, H., Liu, X., & Dou, W. (2013). Optimizing the implementation of real-time simulink models onto distributed automotive architectures. Journal of Systems Architecture, 59 (10), 1115–1127. https: //doi.org/10.1016/j.sysarc.2013.08.009

Intel. (2020). Intel oneapi. Intel. Retrieved January 24, 2021, from

https://software.intel.com/content/www/us/en/ develop/tools/oneapi.html

Kasahara, H., & Narita, S. (1984). Practical multiprocessor scheduling algorithms for efficient parallel processing.IEEE Computer Architecture Letters, 33 (11), 1023–1029. https://doi.org/10.1109/TC.1984.1676376

Khronos. (2020). Sycl. The Khronos Group Inc. Retrieved January 24, 2021, from https://www.khronos.org/sycl/

Kumura, T., Nakamura, Y., Ishiura, N., Takeuchi, Y., & Imai, M. (2012). Model based parallelization from the simulink models and their sequential c code, In Proceedings of the 17th workshop on synthesis and system integration of mixed information technologies (sasimi 2012). http://sasimi.jp/new/sasimi2012/files/program/archive/pdf/ p186_R2-8.pdf

International Journal of Computer and Technology Vol 21 (2021) ISSN: 2277-3061 https://rajpub.com/index.php/ijct

Mathworks. (2020). Embedded coder. The MathWorks, Inc. Retrieved January 24, 2021, from https://www.mathworks. com/products/embedded-coder.html

Mathworks. (2020). Simulink. The MathWorks, Inc. Retrieved January 24, 2021, from

https://www.mathworks.com/ products/simulink.html

Tran, Q. M., Wilmes, B., & Dziobek, C. (2013). Refactoring of simulink diagrams via composition of transformation steps, In International conference on software engineering advances. Citeseer. https://doi.org/10.1.1.913.9975

triSYCL. (2020). Trisycl. Github, Inc. Retrieved January 24, 2021, from https://github.com/triSYCL/triSYCL

Tuncali, C. E., Fainekos, G., & Lee, Y.-H. (2015). Automatic parallelization of simulink models for multi-core architectures, In 2015 ieee 17th international conference on high performance computing and communications, 2015 ieee 7th international symposium on cyberspace safety and security, and 2015 ieee 12th international conference on embedded software and systems. IEEE.https://doi.org/10.1109/HPCC-CSS-ICESS.2015.232

Umeda, D., Suzuki, T., Mikami, H., Kimura, K., & Kasahara, H. (2015). Multigrain parallelization for modelbased design applications using the oscar compiler, In Languages and compilers for parallel computing. Springer. https://doi.org/10.1007/978-3-319-29778-1_8

Verdoolaege, S., Carlos Juega, J., Cohen, A., Ignacio Gomez, J., Tenllado, C., & Catthoor, F. (2013). Polyhedral parallel code generation for cuda. ACM Transactions on Architecture and Code Optimization (TACO), 9 (4), 1–23. https://doi.org/10.1145/2400682.2400713

Verdoolaege, S., & Grosser, T. (2012). Polyhedral extraction tool, In Second international workshop on polyhedral compilation techniques (impact’12), paris, france. https://doi.org/10.13140/RG.2.1.4213.4562

Yamaguchi, K., Takematsu, S., Iketa, Y., Li, R., Zhong, Z., Kondo, M., & Edahiro, M. (2015). Block-level parallelization of simulink models [In Japanese], In Embedded systems symposium 2015 proceedings (sigemb). In Japanese.

Zhong, Z., & Edahiro, M. (2018). Model-based parallelizer for embedded control systems on single-isa heterogeneous multicore processors, In 2018 international soc design conference (isocc). IEEE. https://doi.org/10.1109/ ISOCC.2018.8649919

Downloads

Published

2021-04-14

How to Cite

Xu, P., Edahiro, M., & Masaki, K. (2021). Code Generation from Simulink Models with Task and Data Parallelism. INTERNATIONAL JOURNAL OF COMPUTERS &Amp; TECHNOLOGY, 21, 1–13. https://doi.org/10.24297/ijct.v21i.9004

Issue

Section

Research Articles