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

prefetch i/r/w encoding overlaps with ORI instr #68

Open
akifejaz opened this issue Oct 20, 2024 · 3 comments
Open

prefetch i/r/w encoding overlaps with ORI instr #68

akifejaz opened this issue Oct 20, 2024 · 3 comments

Comments

@akifejaz
Copy link

Hey! I was reading out this spec last week and I was trying to implement it on my processor but I'm facing some issues related to decoding of instructions. I've already hooked up RV & RVV base ISA.

As per the ORI instruction, its encoding is like
image

and prefetch.i has encoding

image

Since the opcode, func3 are same, only distinguish thing I was expecting the func6 of prefetch, but seems like if we have ORI instr with let say 0-3 value as imm while decoding it will become hard to distinguish if the imm is for ORI or its func6 of prefetch.

can someone please clear me on this? Thanks!

@gfavor
Copy link

gfavor commented Oct 20, 2024

The prefetch instructions use HINT encodings reserved within the ORI encoding space. Look at the spec for HINT instructions.

@akifejaz
Copy link
Author

The prefetch instructions use HINT encodings reserved within the ORI encoding space. Look at the spec for HINT instructions.

Thanks for response, so if I'm not wrong, for prefetch instr the 'offset[4:0] or rd will be zero always.

@gfavor
Copy link

gfavor commented Oct 21, 2024

Yes.

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