# Real-Time Optimization of RISC-V Processors Based on Branch Prediction and Division Data Dependency
## 2 Related Work
Conversely, if the speed of the processor is much more critical than its stability, the value of A can be set to 1. This flexibility allows users to tailor the assessment to their specific needs. \(\mathrm{T_{wot}}\) represents the worst-case execution time (WCET) of the hardware when executing a specific segment of program instructions. There are various methods for calculating this parameter, which are not extensively discussed in this paper. For detailed information, please refer to [18; 19; 20], etc. \(\mathrm{T_{d}}\) represents the real-time constraint time allocated to the processor by the real-time system. This parameter is distributed by the real-time system and is not extensively discussed in the paper. When \(\mathrm{T_{wot}}\) is less than \(\mathrm{T_{d}}\), it indicates that the processor meets the system's real-time requirements during the execution of a specific computation, and \(\mathrm{T_{k}}\) is set to 1. Otherwise, \(\mathrm{T_{k}}\) is set to 0. When \(\mathrm{H_{rfp}}=0\), it signifies that the processor fails to meet the real-time requirements specified by the real-time system. In cases where \(\mathrm{H_{rfp}}\
eq 0\), a smaller value of \(\mathrm{H_{rfp}}\) indicates that the processor, while satisfying the system's real-time requirements, exhibits superior execution speed and stability, thereby demonstrating enhanced real-time performance. Conversely, a larger value of \(\mathrm{H_{rfp}}\) suggests inferior real-time performance. In addition to the above statements, some further clarifications regarding \(\mathrm{H_{rfp}}\) are as follows:  
* The hardware real-time performance parameter (\(\mathrm{H_{rfp}}\)) does not conflict with the real-time performance of computer systems (or embedded systems) mentioned earlier. \(\mathrm{H_{rfp}}\) is an extension of the foundational concept of system real-time performance and does not negate or invalidate the existing concept of real-time performance in computer systems (or embedded systems). * Depending on the specific program executed by the processor, the independent hardware real-time performance parameter \(\mathrm{H_{rfp}}\) can have multiple sub-cases. For example, there can be a parameter \(\mathrm{H_{rfp\_taskA}}\) corresponding to the execution of Task A and a parameter \(\mathrm{H_{rfp\_co}}\)corresponding to the execution of the CoreMark benchmark program. * The input parameters \(\mu\) and \(\sigma^{2}\) for \(\mathrm{H_{rfp}}\) are statistical data obtained from the actual operation of the processor. The sample size is determined based on the processor's application context, typically using large sample sizes (generally greater than 80). * This paper does not directly use \(\sigma^{2}\) to evaluate the real-time performance of the processor because \(\sigma^{2}\) is a qualitative measure of stability rather than a quantitative one. For example, consider an extreme case where two processors execute the same program segment:  
Processor A: \(\mu\) = 5 s, \(\sigma^{2}\) = 3 s; Processor B: \(\mu\) = 50 s, \(\sigma^{2}\) = 5 s.  
If we simply compare \(\sigma^{2}\), Processor A appears to have better stability because 3 s < 5 s. However, when considering the variability as a percentage of the mean, observe the following:  
Processor A: Variability = 3/5 \(\times\) 100% = 60%; Processor B: Variability = 5/50 \(\times\) 100% = 10%. From this perspective, Processor B clearly demonstrates better stability. This approach to analysis is more reasonable and provides a more accurate assessment of the processor's real-time performance.