OpenXiangShan / XiangShan

Open-source high-performance RISC-V processor
https://xiangshan.cc
Other
4.87k stars 665 forks source link

fix(loadUnit): rollback should be used for flush #3913

Open Anzooooo opened 4 days ago

Anzooooo commented 4 days ago

According to the backend instructions, currently, we have a total of three signals that can notify the backend to generate a flush pipe:

flushPipe, replayInst, and rollback

Among these, flushPipe and replayInst will be combined into the same flush signal in the backend, and the flush will be generated only when the command reaches the Rob dequeue pointer. The rollback signal will flush as soon as it is sent, so flushing the pipe via the rollback signal is faster. Currently in MemBlock, store/load MisalignBuffer will flush via flushPipe, RAR violations and mismatch of virtual and physics addresses in the forward will flush via both flushPipe and rollback, and RAW and uncached nack will flush via rollback. When flushPipe and rollback are triggered at the same time, flushPipe is triggered when the rob dequeue pointer is selected, rather than rollback being triggered immediately.

This commit removes the flushPipe signal in the RAR violation and the mismatch of virtual and physics addresses in the forward, and only triggers flush through rollback.

Any subsequent flushes that may occur should give priority to whether they can be triggered immediately via the rollback signal, and flushPipe/replayInst should only be used if a non-speculative flush is required. The flushPipe generated by store/load MisalignBuffer is temporarily retained, considering that store/load MisalignBuffer is actually being refactored.

XiangShanRobot commented 4 days ago
[Generated by IPC robot] commit: 240669a30d112bcd75ae50b6707194879ea2467f commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
240669a 1.918 0.450 2.701 1.223 2.840 2.464 2.398 0.918 1.430 2.069 3.437 2.716 2.387 3.263
master branch: commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
92bcee1 1.917 0.450 2.701 1.230 2.840 2.464 2.398 0.921 1.430 2.069 3.437 2.716 2.387 3.261
09910ab
531dd12
6639e9a