The duration of a particular program is the time it takes from the start of the program to the end of execution.
The duration of the program depends on which path is performed on different possible paths. Program performance
time will also affect the hardware performance on which the program performs. Worst-Case Execute Time (WCET)
means the longest of these hours required to perform on a particular hardware without being interrupted by other
programs (processors, tasks, etc.).
The WCET of a program is 10ms, which means that the program has no more than 10ms of time.
Worst-Case Execution Time Analysis(WCETA)
The goal is to predict (measure or calculate) the longest and most
accurate time to be followed. The longest-time analysis techniques include dynamic and static techniques.
Dynamic analysis
Dynamic techniques are a method of measuring by performing a program directly. Perform the program's performable
path and measure its time to select the largest of the measured times as the longest action time. This technique
is time-consuming and expensive because the program actually needs to run multiple times. In addition, it is
difficult to apply if the number of executable paths increases. The paths a particular program can perform have
a number of different cases, and in the worst case, the number of paths that can be performed occurs in a limit.
Therefore, typically, you will extract the typical run paths and add additional correction values to the longest
path of them to choose the longest execution time
However, the safety of the results is not guaranteed in that there may be routes that have not been executed that
take longer than the longest measured time.
Static Analysis
Static techniques are a method of analyzing program structures to predict the longest time to follow. HKSAT
calculates the longest performance time based on the IPET technique among static techniques.
Static analysis requires the analysis of the characteristics of the target hardware along with the program
control structure. This is because the duration depends on the nature of the hardware that is performed even
with the same program.
Static techniques use abstraction techniques to ensure safety during the calculation process, so the longest
processing time calculated by them will have a value greater than the actual longest performance time.
Therefore, the actual performance time is guaranteed to be no greater than the longest calculated carry-out
time.
For static techniques, the more information you extract from the program structure, the less difference between
the calculated value and the actual value. HKSAT automatically extracts program flow information to perform
calculations, and if necessary, users can add information to improve the accuracy of the results.
For a list of compilers that HKSAT supports WCET analysis,see Compiler Support
Add Module button: You can add a new module to use.
Compile Options: Specify the compile options to apply when generating the
binary for analysis.
Compile Options Edit Button: Displays the compile options editing screen.
Modules targeted at the longest time are often created by splitting them into units that contain only
the source code of the hourly task.
In other words, if the embedded software has multiple tasks with a carry cycle of 10ms, 5ms, etc.,
create modules separately for each task cycle and predict the longest carry-on time for each.
WCET analysis targets one module. If you want to analyze multiple modules, you need to perform as many
analyses as you want.
The target module task for the longest run time analysis can also mosa the analysis for multiple tasks
by specifying different root functions for one module, including all code. In this case, modules
containing the entire code can become overly large, which can take a very long time to analyze or push
the tool's analysis limits.
Root Function
Left List: Shows the functions available for selection in the module.
Right list: Shows the function selected as the root function in the module.
Function: The name of the function
Caller IN: The number of functions that call that function.
Callee OUT: The number of functions that the function calls.
On the Root Functions tab, functions with a 0 call function (IN) that have a high probability of become
a root function are selected by default.
The selected function is treated as the root function during analysis. At each root function, the
analysis target includes all functions that can be reached through the call.
Click the table header to sort the list of functions. Sorting makes it easier to find functions by name.
When using the AUTRON AUTOSAR platform, task-specific function information refers to sub-functions
called from the \Generated\Bsw_Output\src\Rte.c in-file task function (e.g. OsTask_ASW_FG1_10ms)
generated by the development tool Mobilgene/ODIN environment.
Function Execution Time Assumption
Function: The name of the function that exists in the target module.Function: The name of the function that
exists in the target module.
Is External?: You cannot specify whether an external option is arbitrary, and it is designated as an
external
only if there is no source code. The external function must provide the assumed value of the cycle. (Even if
it is a system function, it does not have source code and can be specified as an external function.)
Is Assumed?: Time assumptions or not. If you want a time family, check the Time Family check box, or enter a
positive number for the assumed number of cycles.
Assumed Cycle: Assumed number of cycles. The number of assumed hours of carrying out for the function
converted
to cycles. -1 is displayed if the time assumption is not made.
External functions that cannot be sourced cannot be used to calculate the time performed through code
analysis, so you must make assumptions about the time to perform. You can also assume the time to
perform a particular function as needed, even if the source code exists.
A function that assumes the time to perform is used without a separate analysis, and the assumed time is
considered the longest performing time of that function.
Default: The default value used for the external action performing assumption. You can change it in
preferences.
Apply library function time Home: Gets the longest performance time for a system API that has been prepared
by performing in advance.
Library function time-based application provides WCET values for the main APIs of the four AUTRON
AUTOSAR platforms (for SPC560x, SPC58, RH850, and Artemis).
If you are importing the time assumptions for the AUTRON AUTOSAR platform, the source code must contain
the file Bsw_Output \Generated\.c\src\Rte.
Assume the maximum number of iteration of loops
Circular statement ID: ID for the loop present in the module. The tool granted.
Function: Displays the function name and the defined file.
Assumed: Whether the loop is assumed. If automatic extraction is successful, it is not checked, otherwise it
is checked.
Assumption: Displays the maximum number of times the loop can be repeated, the extracted value if automatic
extraction is successful, and the default value if it fails.
Assuming that loop bounds are underestimated, the value of the final calculated longest perform time may
be less than the value of the actual longest performing time. Therefore, loop bounds should be carefully
decided, and if they cannot be inferred correctly, they should be used with a sufficiently large value
that can never be exceeded.
The maximum number of iterations in the loop is required to analyze the longest time of action. Some
loops can be code-analyzed to get that value, but otherwise the user must enter it.
Loop bound 1 means that the loop repeats up to once (loop conditions are checked up to twice).
The loop bound value processed by the macro constant on the source code is automatically specified.
However, the loop bound value treated as a variable is not specified by the nature of the variable.
The maximum number of half times of circular statements extracted by the tool is disabled and cannot be
modified.
Default: The default value used for the external action performing assumption. You can change it in
preferences.
Source code: Whether to show the source code corresponding to the circular statement selected in the list.
Target Settings
To setup the target
The processor settings screen depends on the compiler set up in the project.
For processors that support pipeline analysis, display options to enable it. If you choose to use a pipeline
architecture, the WCET is calculated based on the cycles saved by pipeline application, otherwise the WCET
is calculated assuming that all pipelines are not applied.
The maximum duration depends on the type and speed of the target processor.
Criteria
It displays the duplicate code evaluation criteria of the Hyundai/Kia ES
specification.
Displays a summary of the number of root items analyzed and the number of assessments.
Detailed results
Function: root functions
Unit cycle: The number of CPU cycles required to perform a function once.
Assumed: Whether the function is assumed to be in the time of action.
Execution Count: If the longest execution time is required, the number of times the function is executed
Total Cycles: The sum of cpu cycles spent for the function to occur.
WCET: Displays the longest time of a function as a time
Verdict: Pass, Conditional Pass, or Fail
When you expand a function node, it displays information about the called function.
Displays the WCET and evaluated root functions.
If you cannot limit the maximum time of the function, it is displayed as "Unbound."
If an infinite loop or recursive function exists in the function perform path, the function does not
have a limit on the longest duration of the action.
Check WCETA Bottleneck Nodes
After performing the analysis, you can check the analysis results in the graph view,
and you can easily check the nodes that take a lot of time through color.
You can check the results by clicking on the analysis results in the project view.
In addition, you can check the result by clicking the value of the longest running time (WCET) in the result
view.
At the top of the node, the cycle and the number of executions are displayed and displayed in the form of
[cycle x times].
When it is displayed as [(cycle1 + cycle2) x times], cycle1 is the cycle value of the node,
and cycle2 is the unit cycle value of the function called from the node.
Analysis results only show results for the whole root function.
If you click the sub-analysis result of the project view or the value of the longest execution time
(WCET) in the result view, the results for the root function and sub-functions are displayed,
and the longer the execution time (WCET), the redder the node.