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

HLV/HSV flushes pipeline #3521

Open
yuxuanliuuu opened this issue Nov 6, 2023 · 1 comment
Open

HLV/HSV flushes pipeline #3521

yuxuanliuuu opened this issue Nov 6, 2023 · 1 comment

Comments

@yuxuanliuuu
Copy link

In the Rocket-chip h-extension, HLV/HSV instructions flush pipeline every time. It requires 5 or 6 cycles to finish HLV/HSV instruction.
So the question is:
Is it necessary to flush the pipeline for instruction HLV/HSV?
Is it possible to prevent flushing the pipeline and how to do that?

@psherman42
Copy link

Maybe unrelated or specific chip idiosyncracy, but pipeline flush also occurs on, for example, when a series of amoxor.w instructions are rapidly executed and those instructions specify register x0 for their rd. Specifying any othr register (e.g., x1..x31) for rd produce write hazards and, thus, no pipeline flush for repeated invocations of amoxor.w.

Maybe something to think about for x0 (zero), atomics, and the pipeline?

See github repo psherman42/Understanding-AMO for more description and observation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants