Commit d5e0972
cpu-o3: simplify fetch, only support decoupled BTB mode (#721)
* cpu-o3: simplify fetch, only support decoupled BTB mode
Change-Id: If39d11a07088d4f9237d5bf6c30a9dd8f53a1436
* cpu-o3: delete isDecoupledFrontend()
Change-Id: Ibac84ee677f597f90bc7ff70a0ff6a1b1d108586
* cpu-o3: fetch: move updateBranchPredictors to tick() start
now we can update BPU to supply fetch first, then let fetch to consume this ftq entry.
Change-Id: I922b899d7626e010b5f3589b39ad4c6cec6f7c2b
* cpu-o3: fetch: split usedUpFetchTargets
This update introduces a clearer separation of fetch state management by replacing the `usedUpFetchTargets` flag with `needFtqSupply` and `exhaustedFtqEntry`. The new flags enhance clarity in FTQ supply logic, ensuring that fetch operations correctly handle the availability of fetch targets. Additionally, the `trySupplyFtq` method is added to streamline FTQ supply attempts, improving overall fetch efficiency and maintainability.
Change-Id: Ie17a13ebf64aea7bd68f3c4c50917b3e3c9b830a
* cpu-o3: test remove ftq code
I thinks we can delete this, run spec06 for try.
Change-Id: If21eca420d21d8ca038dc1065e144fe346a23131
* cpu-o3: refactor fetch state management and FTQ handling
1. removes the `needFtqSupply` and `exhaustedFtqEntry` flags from the Fetch class, simplifying the fetch state management.
2. The logic for FTQ supply is streamlined, ensuring that fetch operations directly check the availability of fetch targets without maintaining additional state.
3. The `trySupplyFtq` method is also removed, as the fetch now operates in a head-driven FIFO manner. This change enhances clarity and maintainability of the fetch logic.
Change-Id: I7a8b312785a7cce526192de7125cea458b979c0e
* cpu-o3: fetch ftq rename some functions
1. Reset the instruction count for FTQ entries in multiple locations to ensure accurate tracking of fetched instructions.
2. Replace deprecated `updateBranchPredictors` method with direct calls to `dbpbtb->tick()` for improved clarity and maintainability.
3. Refactor fetch logic to utilize `ftqHasHead()` and `ftqHead()` methods, enhancing the readability of fetch target availability checks.
4. Introduce `consumeFetchTarget` method in the decoupled branch predictor to streamline the handling of consumed fetch targets.
These changes improve the overall structure and efficiency of the fetch stage, ensuring better integration with the branch predictor and FTQ management.
Change-Id: I7a8b312785a7cce526192de7125cea458b979c0e
* cpu-o3: remove decoupledPredict in fetch
1. Refactor the next PC prediction logic to directly compute from the FTQ head entry, improving clarity and efficiency.
2. Introduce checks for the current PC against the predicted takenPC, streamlining the fetch process for taken branches.
3. Update the handling of microops to ensure they advance the program counter correctly, maintaining accurate instruction flow.
These changes improve the overall structure and efficiency of the fetch stage, ensuring better integration with the branch predictor and FTQ management.
Change-Id: Iaed922245a386b695499799c9e0a3947208e0524
* cpu-o3: add some docs
Change-Id: I56c36d4757b2a78ad193225f6eef302fd2c986ad
* cpu-o3: remove useless source code in v3 BPU
Change-Id: I1c6093c1f63036b6346838572229e4440726d7f9
* util: remove unused scripts
- Updated `gem5-vec.cfg` to remove DRAMsim3 configuration.
- Changed `gem5.cfg` to use `kmhv3.py` instead of `fs.py` for task execution.
- Removed deprecated options from `Options.py` related to branch prediction.
- Adjusted `xiangshan.py` to enforce BTB-only branch prediction and streamline configuration.
- Deleted unused `fs.py` file and various scripts to clean up the repository.
- Updated example configurations to align with new branch prediction policies.
These changes enhance clarity and maintainability of the configuration files while ensuring compliance with the current branch prediction strategy.
Change-Id: I1c6093c1f63036b6346838572229e4440726d7f9
---------
Co-authored-by: Yakkhini <59007159+Yakkhini@users.noreply.github.com>1 parent 0025245 commit d5e0972
File tree
27 files changed
+543
-2233
lines changed- .github/workflows
- autotest
- configs
- common
- example
- docs/Gem5_Docs/frontend
- src/cpu
- o3
- trace
- pred
- btb
- test
- util
- memory_check
- pgo
- warmup_scripts
- xs_scripts
27 files changed
+543
-2233
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 174 | | |
191 | 175 | | |
192 | | - | |
193 | 176 | | |
194 | 177 | | |
195 | 178 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | 282 | | |
293 | 283 | | |
294 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 332 | | |
337 | 333 | | |
338 | 334 | | |
339 | 335 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
366 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
367 | 346 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
376 | 353 | | |
377 | 354 | | |
378 | 355 | | |
| |||
0 commit comments