| 103 | } |
| 104 | |
| 105 | void Cache::flush() { |
| 106 | if (!cache_config.enabled()) { |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | for (size_t assoc_index = 0; assoc_index < cache_config.associativity(); |
| 111 | assoc_index += 1) { |
| 112 | for (size_t set_index = 0; set_index < cache_config.set_count(); |
| 113 | set_index += 1) { |
| 114 | if (dt[assoc_index][set_index].valid) { |
| 115 | kick(assoc_index, set_index); |
| 116 | emit cache_update( |
| 117 | assoc_index, set_index, 0, false, false, 0, nullptr, false); |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | change_counter++; |
| 122 | update_all_statistics(); |
| 123 | } |
| 124 | |
| 125 | void Cache::sync() { |
| 126 | flush(); |
nothing calls this directly
no test coverage detected