OpenXiangShan / XiangShan

Open-source high-performance RISC-V processor
Other
4.45k stars 619 forks source link

StoreQueue: Commit storequeue entry by judging robidx #3020

Closed good-circle closed 4 weeks ago

good-circle commented 1 month ago

In the previous design, for scalar store commands, commits were made based on the scommit passed in by rob. That is, after rob commits n store commands in one cycle, it sets scommit to n, and the storequeue needs to commit n entries based on the value of scommit.

Due to the special nature of vector instructions, a vector store instruction may correspond to a maximum of 128 items, and it is not possible to use scommit commits, which are similar to scalar commits.

In this modification, both vector and scalar directives are compared against robidx, and the storequeue entry is committed when the uop stored in uop is equal to or older than the pendingptr passed in by rob. This has some improvement on timing.

Also, additional processing is currently required for vector instructions. When an exception occurs on an item, it needs to be handled with an out-of-queue, but not write sbuffer.

XiangShanRobot commented 4 weeks ago
[Generated by IPC robot] commit: 1ec246887ae1349b9de881a1d47f8d608f00379b commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
1ec2468 1.815 0.448 2.060 1.182 2.953 2.504 2.291 0.930 1.403 1.319 3.426 2.660 2.397 2.940
master branch: commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
cd467f7 1.821 0.448 2.054 1.173 2.950 2.500 2.291 0.923 1.376 1.265 3.448 2.667 2.398 2.940
75b44a5 1.821 0.448 2.054 1.173 2.950 2.500 2.291 0.923 1.376 1.265 3.448 2.667 2.398 2.940
321866f 1.821 0.448 2.054 1.173 2.950 2.500 2.291 0.924 1.376 1.265 3.448 2.667 2.398 2.940
082b30d 1.821 0.448 2.054 1.173 2.950 2.500 2.291 0.923 1.376 1.265 3.448 2.667 2.398 2.940
0e28018 1.823 0.448 2.054 1.172 2.950 2.500 2.292 0.923 1.376 1.265 3.449 2.656 2.398 2.943
df7130a 1.823 0.448 2.054 1.172 2.950 2.500 2.292 0.923 1.376 1.265 3.449 2.656 2.398 2.943
b51ac1c 1.823 0.448 2.054 1.172 2.950 2.500 2.292 0.923 1.376 1.265 3.449 2.656 2.398 2.943
79fadd7 1.868 0.448 2.096 1.166 2.945 2.603 2.333 0.952 1.377 1.298 3.424 2.659 2.468 2.945
f48d8a2 1.868 0.448 2.096 1.166 2.945 2.603 2.333 0.952 1.377 1.298 3.424 2.659 2.468 2.945
4ccb2e8 1.868 0.448 2.096 1.166 2.945 2.603 2.333 0.951 1.377 1.298 3.424 2.659 2.468 2.945