Cheap stats-only read, no allocation. Called every step.
(
&self,
)
| 143 | // Create three-level cache hierarchy |
| 144 | // L3: 8MB, 64-byte blocks, 16-way set associative |
| 145 | let ram = Ram::new(RAM_BASE, RAM_SIZE_DEFAULT); |
| 146 | let l3_params = CacheParams { |
| 147 | size: 8 * 1024 * 1024, // 8MB |
| 148 | block_size: 64, |
| 149 | associativity: 16, |
| 150 | write_back: true, |
| 151 | read_only: false, |
| 152 | }; |
| 153 | let l3_cache = Cache::new(l3_params, ram); |
| 154 | |
| 155 | // L2: 256KB, 64-byte blocks, 8-way set associative |
| 156 | let l2_params = CacheParams { |
| 157 | size: 256 * 1024, // 256KB |
| 158 | block_size: 64, |
| 159 | associativity: 8, |
no test coverage detected