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

Support Overriding the Decoding of "Optional" Instructions #6

Open
kathlenemagnus opened this issue Feb 16, 2024 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@kathlenemagnus
Copy link
Collaborator

There is a new RISC-V extension being proposed called Zimop which supports "may-be-opertions". The proposed instructions are like NOPs but are allowed to be redefined by later extensions. See "Zimop" May-Be-Operations Extension, Version 0.1

I'd like to discuss the best way to support this extension in Mavis, since I am still learning how the internals of Mavis work.

I set up a test to see what would happen if two instructions were defined with the same stencil (where test is a redefinition of a Zimop instruction) and I get this warning:

ALREADY A LEAF for stencil: 0xc5c04073, 'test' will alias to IFactory('mop.r.3'), stencil = 0xc5c04073

This could work if mop.r.3 was an alias to test instead of the other way around since test is a redefinition of mop.r.3. I could force this behavior by making sure all "optional" instruction factories are added to the DTable last.

Another option would be to replace the Factory (leaf node) for mop.r.3 in the DTable with the Factory for test. To support this, I would need to add a member to the Factory class to mark whether it is allowed to be overridden.

@david-murrell do you have a suggestion on which direction I should go? Or a better idea on how to support this new extension?

@kathlenehurt-sifive kathlenehurt-sifive added the help wanted Extra attention is needed label Feb 16, 2024
@Shubhf
Copy link
Contributor

Shubhf commented Aug 31, 2024

Hello @kathlenehurt-sifive can I try up this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants