• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

renode_scripts/04-Apr-2025-3223

src/04-Apr-2025-1,014813

README.mdD04-Apr-20251.9 KiB7056

requirements.txtD04-Apr-202513 21

README.md

1# Renode Guest Cache Modelling Analyzer
2
3## Generating traces from Renode:
4
5Add the following lines to the `resc` file:
6
7```text
8cpu MaximumBlockSize 1
9cpu CreateExecutionTracing "tracer" $ORIGIN/trace.log PCAndOpcode
10tracer TrackMemoryAccesses
11```
12
13## Usage:
14
15* Using build-in presets
16  ```text
17    ./renode_cache_interface.py trace.log presets 'fu740.u74'
18  ```
19
20* Custom cache configuration
21  ```text
22  ./renode_cache_interface.py trace.log config            \
23                            --memory_width 64             \
24                            --l1i_cache_width 15          \
25                            --l1i_block_width 6           \
26                            --l1i_lines_per_set 4         \
27                            --l1i_replacement_policy LRU  \
28                            --l1d_cache_width 15          \
29                            --l1d_block_width 6           \
30                            --l1d_lines_per_set 8         \
31                            --l1d_replacement_policy LRU  \
32  ```
33
34An example output of the analysis:
35
36```text
37$ ./renode_cache_interface.py trace.log presets fu740.u74
38l1i,u74 configuration:
39Cache size:          32768 bytes
40Block size:          64 bytes
41Number of lines:     512
42Number of sets:      128 (4 lines per set)
43Replacement policy:  RAND
44
45l1d,u74 configuration:
46Cache size:          32768 bytes
47Block size:          64 bytes
48Number of lines:     512
49Number of sets:      64 (8 lines per set)
50Replacement policy:  RAND
51
52Instructions read: 174620452
53Total memory operations: 68952483 (read: 50861775, write 18090708)
54Total I/O operations: 1875 (read: 181, write 1694)
55
56l1i,u74 results:
57Misses: 168
58Hits: 174620284
59Invalidations: 3
60Hit ratio: 100.0%
61
62l1d,u74
63Misses: 17320212
64Hits: 51632271
65Invalidations: 17319700
66Hit ratio: 74.88%
67```
68
69Full documentation on guest CPU cache modeling is available in the [Renode documentation](https://renode.readthedocs.io/en/latest/advanced/execution-tracing.html#guest-cpu-cache-modelling).
70