As systems become more complex, the demand for thorough testing and virtual prototyping grows. To simulate whole systems, multiple tools are usually needed to cover different parts. These parts include the hardware of a system and the environment with which the system interacts. The Functional Mock-up Interface (FMI) standard for co-simulation can be used to connect these tools. The control part of modern systems is usually a computing unit, such as a System-on-a-Chip (SoC) or Microcontroller Unit (MCU), which executes software from a connected memory and interacts with peripherals. To develop software without requiring access to physical hardware, full-system simulators, the so-called Virtual Platforms (VPs), are commonly used. The IEEE-standardized framework for VP development is SystemC TLM. SystemC provides interfaces and concepts that enable modular design and model exchange. However, SystemC lacks native FMI support, which limits the integration into broader co-simulation environments. This paper presents a novel framework to control and interact with SystemC-based VPs using the FMI. We present a case study showing how a simulated temperature sensor in a SystemC simulation can obtain temperature values from an external tool via FMI. This approach allows the unmodified target software to run on the VP and receive realistic environmental input data such as temperature, velocity, or acceleration values from other tools. Thus, extensive software testing and verification is enabled. By having tests ready and the software pre-tested using a VP once the physical hardware is available, certifications like ISO 26262 can be done earlier.
翻译:随着系统日益复杂,对全面测试和虚拟原型设计的需求不断增长。为模拟整个系统,通常需要多种工具来覆盖不同部分,包括系统硬件及系统交互的环境。功能模拟接口(FMI)协同仿真标准可用于连接这些工具。现代系统的控制部分通常是计算单元(如片上系统(SoC)或微控制器单元(MCU)),其执行来自连接存储器的软件并与外设交互。为在不依赖物理硬件的情况下开发软件,全系统模拟器(即虚拟平台(VP))被广泛采用。IEEE标准化的VP开发框架是SystemC事务级建模(TLM)。SystemC提供的接口和概念支持模块化设计与模型交换,但缺乏原生FMI支持,这限制了其在更广泛协同仿真环境中的集成。本文提出一种新颖框架,利用FMI控制和交互基于SystemC的VP。我们通过案例研究展示SystemC仿真中的模拟温度传感器如何通过FMI从外部工具获取温度值。该方法使得未经修改的目标软件可在VP上运行,并从其他工具接收真实环境输入数据(如温度、速度或加速度值),从而实现广泛的软件测试与验证。通过提前准备测试用例并利用VP对软件进行预测试,一旦物理硬件可用,便可更早完成如ISO 26262等认证流程。