-
Notifications
You must be signed in to change notification settings - Fork 244
Add the Zibi extension. #1507
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
base: master
Are you sure you want to change the base?
Add the Zibi extension. #1507
Conversation
|
You don't need to sell the point of the extension in the commit message / PR description, just what it actually does |
Did you read this message? |
|
I’ve fixed it . thank you for the hint! |
jordancarlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several (fairly minor) comments. Also make sure to add the extension to the README and Changelog.
|
if use: mapping clause assembly = BITYPE(imm, cimm, rs1, op)
<-> bitype_mnemonic(op) ^ spc() ^ reg_name(rs1) ^ sep() ^ hex_bits_signed_5(b_imm5(cimm)) ^ sep() ^ hex_bits_signed_13(imm)we will get: Type error:
extensions/Zibi/zibi_insts.sail:48.78-90:
48 | <-> bitype_mnemonic(op) ^ spc() ^ reg_name(rs1) ^ sep() ^ hex_bits_signed_5(b_imm5(cimm)) ^ sep() ^ hex_bits_signed_13(imm)
| b_imm5 is not a union constructor or mapping in mapping-pattern b_imm5(cimm)So the code ended up being written this way.
|
Timmmm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmundkur We should maybe use this as an example of how to add an extension when it is done since it is so nice and simple.
jordancarlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This will be great to merge as our first experimental extension.
Timmmm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I guess we should probably have some kind of policy on how far along the process extensions need to be before they can be merged into this model?
This page seems to have a fairly clear 6-step progression (Zibi is at 'Stabilization').
It probably also depends on how large and invasive the code is. I think it's @pmundkur's decision but at least in this case the code is small and neat and doesn't affect anything else, so I'd vote merge.
|
Agree that this seems okay to merge. "Stabilization" seems a reasonable stage to merge small self-contained extensions, more invasive ones could be frozen or ratification ready as the case may be? |
Spec: https://github.com/riscv/zibi/releases/
Info: riscv/zibi#2