Skip to content

Conversation

@challenger1024
Copy link
Contributor

@challenger1024 challenger1024 commented Jan 29, 2026

@jrtc27
Copy link
Collaborator

jrtc27 commented Jan 29, 2026

You don't need to sell the point of the extension in the commit message / PR description, just what it actually does

@jrtc27
Copy link
Collaborator

jrtc27 commented Jan 29, 2026

As this is a scattered union clause, this could also be caused by using a type defined after the 'scattered union' declaration

Did you read this message?

@challenger1024
Copy link
Contributor Author

I’ve fixed it . thank you for the hint!

Copy link
Collaborator

@jordancarlin jordancarlin left a 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.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Test Results

2 117 tests  +2   2 117 ✅ +2   23m 35s ⏱️ -6s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 2f9b1c7. ± Comparison against base commit 0b4a9f2.

♻️ This comment has been updated with latest results.

@jordancarlin jordancarlin added the extension Adds support for a RISC-V extension label Jan 30, 2026
@challenger1024
Copy link
Contributor Author

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.
last commit:

  • add zibi extension to README.md and doc/ChangeLog.md;
  • move currentlyEnabled() function to model/extensions/Zibi/zibi_insts.sail
  • modify assembly mapping of zibi

Copy link
Collaborator

@Timmmm Timmmm left a 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.

@pmundkur pmundkur changed the title add zibi extension Add the Zibi extension. Jan 31, 2026
Copy link
Collaborator

@jordancarlin jordancarlin left a 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.

Copy link
Collaborator

@Timmmm Timmmm left a 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.

@pmundkur
Copy link
Collaborator

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?

@pmundkur pmundkur added the will be merged Scheduled to be merged soon if nobody objects label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension Adds support for a RISC-V extension will be merged Scheduled to be merged soon if nobody objects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants