timing(MainPipe): fix critical path from Dir error to GrantBuffer#448
Merged
timing(MainPipe): fix critical path from Dir error to GrantBuffer#448
Conversation
Consider the following timing path: The `error` signal returned by Directory is used by forwarding snoop to determine whether to allocate an MSHR. If there is an error, a SnpResp is returned directly; otherwise, an MSHR needs to be allocated. This signal also affects the opcode sent to GrantBuffer. GrantBuffer uses whether the opcode is HintAck to decide whether to enqueue. However, the opcode is, either the opcode pre-set by MSHR in MSHR requests, or `sink_req_s3.bits.opcode` generated in s3. It can be determined simply by using `mshr_req_s3` because when `valid` output to GrantBuffer is false, we do not need an accurate opcode.
754dd2b to
bd8ff2b
Compare
Kumonda221-CrO3
approved these changes
Dec 1, 2025
yu-yake2002
added a commit
to OpenXiangShan/HBL2
that referenced
this pull request
Mar 6, 2026
Merge coupledL2 commits from 95e8de to 727a04c (xs/master), which is the latest on xs/master as of Mar 5, 2026. Squashed commit of the following: commit 62195c6 Author: zhanglinjuan <zhanglinjuan16@mails.ucas.ac.cn> Date: Mon Dec 01 17:59:00 2025 +0800 timing(MainPipe): fix critical path from Dir error to GrantBuffer (OpenXiangShan#448) commit fffb491 Author: Ding Haonan <kumonda@kucro3.org> Date: Thu Dec 04 11:36:48 2025 +0800 timing(TL2CHICoupledL2): 2-stage cap P-Credit Queue (OpenXiangShan#449) commit f118bca Author: Yanqin Li <maxpicca@qq.com> Date: Tue Dec 16 21:26:05 2025 +0800 refactor: refine prefetch statistics in topdown monitor (OpenXiangShan#452) commit b40da89 Author: Ma-YX <71326427+Ma-YX@users.noreply.github.com> Date: Wed Dec 17 18:58:51 2025 +0800 fix(TXDAT): fix wrong DataCheck generation when data invalid (OpenXiangShan#455) commit e4fd161 Author: Ma-YX <71326427+Ma-YX@users.noreply.github.com> Date: Wed Dec 17 21:36:01 2025 +0800 fix(CoupledL2): fix l2MissMatch io compilation error (OpenXiangShan#456) commit 4e4a6aa Author: Kunlin You <youkunlin20@mails.ucas.ac.cn> Date: Thu Dec 18 19:13:20 2025 +0800 feat(clockGate): support disable ClockGate with parameters (OpenXiangShan#451) commit feacfb5 Author: zhaohong1988 <156632870+zhaohong1988@users.noreply.github.com> Date: Fri Dec 19 00:24:20 2025 +0800 fix(MMIOBridge): modify TIMERRange from fix value to soc parameter (OpenXiangShan#453) commit c5ad8f4 Author: Yanqin Li <maxpicca@qq.com> Date: Fri Dec 19 00:24:53 2025 +0800 ci: add submodule check and remove the dependency of utility in OpenLLC (OpenXiangShan#454) commit ea0c313 Author: Ding Haonan <kumonda@kucro3.org> Date: Fri Dec 26 09:41:32 2025 +0800 fix(MMIOBridge): remove redundant BEU range exclusion in L2 (OpenXiangShan#457) commit f292774 Author: Ding Haonan <kumonda@kucro3.org> Date: Thu Jan 08 10:15:15 2026 +0800 fix(Opcode): missing SnpPreferUniqueFwd in SnpXFwd (OpenXiangShan#460) commit 59f3025 Author: Ma-YX <71326427+Ma-YX@users.noreply.github.com> Date: Wed Jan 14 15:59:43 2026 +0800 fix(MainPipe): fix l2Error_s3 generation logic (OpenXiangShan#463) commit 3c9525f Author: Haoyuan Feng <fenghaoyuan19@mails.ucas.ac.cn> Date: Mon Feb 02 10:17:49 2026 +0800 fix(ClockGate): fix bug that ICG is invalid when disable mbist (OpenXiangShan#470) commit 0d20557 Author: yulightenyu <145419941+yulightenyu@users.noreply.github.com> Date: Tue Mar 03 14:26:16 2026 +0800 fix(AsyncBridge): restore performance considering async depth is 4 (OpenXiangShan#472) commit ef2deb5 Author: Ding Haonan <kumonda@kucro3.org> Date: Wed Mar 04 16:20:19 2026 +0800 fix(MSHR): hold LikelyShared on retried writes (OpenXiangShan#474) commit 727a04c Author: Haoyuan Feng <fenghaoyuan19@mails.ucas.ac.cn> Date: Wed Mar 04 17:01:33 2026 +0800 feat(mmioBridge): increase mmioBridgeSize to 16 for better NC perf (OpenXiangShan#475)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consider the following timing path:
The
errorsignal returned by Directory is used by forwarding snoop to determine whether to allocate an MSHR. If there is an error, a SnpResp is returned directly; otherwise, an MSHR needs to be allocated. This signal also affects the opcode sent to GrantBuffer. GrantBuffer uses whether the opcode is HintAck to decide whether to enqueue.However, the opcode is, either the opcode pre-set by MSHR in MSHR requests, or
sink_req_s3.bits.opcodegenerated in s3. It can be determined simply by usingmshr_req_s3because whenvalidoutput to GrantBuffer is false, we do not need an accurate opcode.