TL;DR
This paper presents a rigorous, automated method for generating and analyzing system-level models of mixed hardware/software (HW/SW) embedded systems. By combining application software models with hardware architecture descriptions, their approach enables accurate performance estimation and design space exploration, crucial for complex multicore systems.
What Problem Does This Paper Address?
Designing complex embedded systems, especially those with multicore or distributed hardware/software architectures, presents a significant challenge. Developers need methods to model and analyze these systems at a high level, ensuring both functional correctness and performance. Existing approaches often struggle with:
- Lack of Rigor: Many methods produce executable models but lack formal semantics, making formal verification difficult.
- Complexity Explosion: Integrating hardware and software aspects can lead to overwhelming complexity.
- Inadequate Performance Analysis: Simulating at a detailed level is often too slow, while abstract models may not capture crucial hardware interactions like bus contention or memory conflicts accurately.
- Difficulty in Design Space Exploration: It's hard to systematically explore different hardware configurations or software mappings to find optimal solutions.
This paper aims to bridge this gap by providing a formal, component-based framework that allows for the construction of a unified system model from separate software and hardware descriptions, facilitating rigorous analysis and optimization.
Methods
The core of this work lies in a three-step process for deriving a rigorous system model in the BIP (Behavior Interaction Priority) framework:
- Application Software Modeling: The application software, described in the Kahn process network model (using DOL specifications), is translated into a BIP model. This involves converting processes into atomic BIP components and channels into predefined BIP components (FIFO-Write, FIFO-Read, FIFO-Buffer). Crucially, the atomicity of read/write operations is broken, and interactions with a processor scheduler are introduced.
- Hardware Architecture Modeling: The hardware architecture, described in DOL, is also translated into a BIP model. This involves representing computational resources (processors, memories) and communication paths (buses) as BIP components. Predefined BIP libraries are used for bus components (MasterInterface, VirtualLink, SlaveInterface) and bus schedulers.
- System Model Construction: The BIP models of the application software and hardware architecture are then composed. This step involves:
- Transformation: Decomposing SW-channels and breaking the atomicity of SW-process operations.
- Allocation: Mapping the transformed software components (processes and FIFO routines) onto hardware processors and data buffers onto hardware memories, according to a provided mapping. This step fills in the placeholder hardware components.
The resulting system model is a BIP model that integrates both hardware and software aspects, allowing for simulation and formal analysis. For performance estimation, the system model is instrumented with a profiling API. This, combined with a "weight table" that characterizes the execution time of elementary instructions on the target processor, allows for dynamic estimation of computation and communication delays during BIP simulation.
Datasets
The paper evaluates their method using two benchmark applications:
- MJPEG Decoder: A process network with five processes and nine communication channels.
- MPEG-2 Decoder: A process network with seven processes and six communication channels.
These applications are mapped onto a simulated multi-core ARM architecture (MPARM) with five tiles. The authors do not introduce new benchmark datasets but rather use these established applications to demonstrate their methodology.
Key Insights and Ideas
- Unified Formal Model: The core idea is to create a single, formal BIP model that captures the intricate interactions between software and hardware. This unified view is essential for rigorous analysis.
- Correct-by-Construction: The system model is derived through a series of transformations that are proven to preserve the input/output behavior of the original application software. This ensures that the generated model is a faithful representation.
- Separation of Concerns: The method clearly separates the design of application software from the hardware architecture, allowing for independent modeling and then systematic integration.
- Performance Analysis through Simulation: By instrumenting the BIP model and using weight tables, the authors enable fine-grained, dynamic estimation of performance metrics (computation and communication delays, bus/memory conflicts) directly from the system model.
- Design Space Exploration Enabler: The automated nature of the model generation and the ability to explore different mappings and hardware configurations make this approach ideal for design space exploration.
Key Results
The paper demonstrates the effectiveness of their method through experiments with MJPEG and MPEG-2 decoders on a simulated 5-tile MPARM architecture.
- Performance Estimation: The system model, when instrumented, accurately estimates computation and communication delays, as well as bus and memory conflicts. Figure 15 (MJPEG) and Figure 17 (MPEG-2) show how different mappings significantly impact these performance metrics.
- Impact of Mapping: The results highlight that the choice of mapping (how software processes and channels are assigned to hardware resources) has a substantial impact on performance. For instance, balancing the computation load across processors (Mapping 3 for MJPEG) and utilizing local memories to reduce shared bus contention (Mapping 7 for MPEG-2) leads to better throughput.
- Tractability: The method is shown to be tractable, generating system models with tens of BIP components and thousands of lines of BIP and C code for simulation, which is manageable for analysis.
Limitations and Future Work
- Limitations:
- The current translation of software processes has restrictions, including no use of global variables or
gotostatements, and inlining of functions with read/write calls.
- The current translation of software processes has restrictions, including no use of global variables or
- The model does not explicitly represent the allocation of process data in memory, assuming a high cache hit rate.
- The current work focuses on specific types of hardware architectures and communication paths.
- Future Work:
- Extend the framework to support other programming models for application software.
- Incorporate richer hardware architecture models, such as DMA controllers, bus bridges, and Network-on-Chip (NoC) communication.
- Integrate statistical model checking for analyzing systems with multiple applications running on complex multicore architectures.
- Further explore the impact of scheduling policies and other design choices on system behavior.
Summary updated