In recent years, the complexity and scale of embedded systems, especially in the rapidly developing field of autonomous driving systems, have increased significantly. This has led to the adoption of software and hardware approaches such as Robot Operating System (ROS) 2 and multi-core processors. Traditional manual program parallelization faces challenges, including maintaining data integrity and avoiding concurrency issues such as deadlocks. While model-based development (MBD) automates this process, it encounters difficulties with the integration of modern frameworks such as ROS 2 in multi-input scenarios. This paper proposes an MBD framework to overcome these issues, categorizing ROS 2-compatible Simulink models into event-driven and timer-driven types for targeted parallelization. As a result, it extends the conventional parallelization by MBD and supports parallelized code generation for ROS 2-based models with multiple inputs. The evaluation results show that after applying parallelization with the proposed framework, all patterns show a reduction in execution time, confirming the effectiveness of parallelization.
翻译:近年来,嵌入式系统(尤其是在快速发展的自动驾驶系统领域)的复杂性和规模显著增加。这促使了诸如机器人操作系统(ROS)2与多核处理器等软硬件方法的采用。传统的手动程序并行化面临诸多挑战,包括保持数据完整性以及避免死锁等并发问题。虽然基于模型的开发(MBD)可自动化此过程,但在多输入场景下与现代框架(如ROS 2)的集成仍存在困难。本文提出一种MBD框架以克服这些问题,将兼容ROS 2的Simulink模型分类为事件驱动型与定时器驱动型,以实现有针对性的并行化。由此,该框架扩展了传统MBD的并行化能力,并支持具有多输入的基于ROS 2模型的并行化代码生成。评估结果表明,应用所提框架进行并行化后,所有模式均显示出执行时间的减少,从而验证了并行化的有效性。