## 3 The Proposed Framework for Testing  
The proposed framework considers an embedded system with multiple PEs connected to each other using different types of interfaces. In this framework, the communication across multiple processors is simulated using multi simulators for detecting and localizing bugs.  
We assume that there are n numbers of processors connected in an embedded system. These processors communicate with each other through high-speed physical synchronous interfaces. All individual segments of the embedded system have been functionally tested for their correctness. When these PEs start to communicate with each other using the high-speed synchronous interfaces, synchronization errors start occurring. These errors can occur, not due to the functionality of a specific PE, but rather due to inter-PE communication. To narrow down the specific interface that has malfunctioned, we generated a ramp continuously, as it is the easiest signal to identify for any errors occurring in a system, and found the outputs at each interface through the emulator in order to record their outputs. These outputs are used to narrow down and identify the specific interface causing errors. Depending on different scenarios, a different interface can malfunction. Test data are generated which accommodate all scenarios in multiple interfaces to check whether the communication happens with or without any synchronization issues and the results are used to generate the knowledge base. The test data are then provided to the simulators. For the cases where there is a specific problem, the scenario is saved in a database that acts as a knowledge base. A typical approach for creating test cases from the use cases is scenario analysis. Use cases are a useful tool when developing test cases for a system.  
Firstly, we generated test cases through use case scenarios where the communications at different links happened in a synchronization sink. At a few links there were also synchronization issues. This allowed us to generate all possible perceivable results. Several synchronization bugs were identified in inter-processor communication. These bugs were simulated in MATLAB. Simulation of these bugs helps in building a knowledge base. The knowledge base contains test cases, synchronization bugs, and simulated waveforms of the synchronization bugs.  
Once the actual testing is done on the actual system through emulators and in the case where the expected results do not match, then a comparison is done with the results stored in the knowledge base. Then, correlations between the actual and simulated results are computed. We compared incoming waveforms of high-speed interfaces with the stored simulated synchronization bugs' waveforms from the knowledge base. The closest correlation is matched with the specific use case of a communication system.  
Synchronization failure is automatically extracted from the database and is then used to localize bugs. Figure 1 explains the proposed framework for testing a real-time embedded system.  
The first step of the proposed framework was the creation of a knowledge base through simulations and the second step was to capture data using emulators and test the actual system, shown in Figure 2.