Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLB Timing interface not match with MMIO instruction fetch in IFU #2658

Open
euphgh opened this issue Jan 18, 2024 · 1 comment
Open

TLB Timing interface not match with MMIO instruction fetch in IFU #2658

euphgh opened this issue Jan 18, 2024 · 1 comment
Labels
bug Confirmed bugs

Comments

@euphgh
Copy link
Contributor

euphgh commented Jan 18, 2024

Issue Description:

I have a question about the timing interface for accessing the TLB during MMIO instruction fetches. Although I may not have fully understood the code which is linked in below url. I'm unsure about the behavior of the IFU's (Instruction Fetch Unit) MMIO fetch state machine when checking the TLB's return result.
https://github.com/OpenXiangShan/XiangShan/blob/8fae59bba57fd80fcd1d85aadbf87895b97d167a/src/main/scala/xiangshan/frontend/IFU.scala#L590C1-L590C1

It seems that whenever the condition req.valid && !resp.bits.miss is observed within the same cycle, the state will change. However, the TLB requires at least one cycle to return the correct resp.bits.miss, even though the MMIO TLB is blocking. Suppose a TLB request for a specific MMIO is miss, due to the delayed response by one cycle, the MMIO state machine sees miss == false.B. However, the data in the TLB interface is incorrect.

Personally, I wonder if using resp.valid would be better than resp.bits.miss in this case.

@chenguokai
Copy link
Member

Seems to be a problem. Thanks for your report!

@chenguokai chenguokai added the bug Confirmed bugs label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs
Projects
None yet
Development

No branches or pull requests

2 participants