-
Notifications
You must be signed in to change notification settings - Fork 40
Add CSR YAML files for Sscofpmf: scountovf #607
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: main
Are you sure you want to change the base?
Add CSR YAML files for Sscofpmf: scountovf #607
Conversation
@syedowaisalishah, did you intend to close this? |
Yes, I closed it because the regression test failed in this PR. I’ll address the issues and reopen it once everything passes. |
I've made all the suggested changes — just haven’t added the sw_read() yet due to an error. Will follow up on that soon. |
Derek was suggesting here to either explicitly describe all of the bits OF3-OF31, or parameterize their description using a layout like:
Since you've already done the former (describing each of them), you do not need the ".layout" file. (For reference, if you did choose to use a "layout" file, you'd need to have it explicitly handled in the |
@ThinkOpenly , @dhower-qc Added .layout file for OF3–OF31 YAML generation and updated the Rakefile accordingly (similar to mcountinhibit). Verified functionality with rake gen:arch. |
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.
Great, almost there. When using layout files, we also check in the generated files so that they are accessible via browsing GitHub. So, if you can add scountovf.yaml to the PR, then I think this looks good.
arch/csr/Sscofpmf/scountovf.layout
Outdated
[when="mhpmevent<%= of_num %>.EN == false"] | ||
This field is read-only zero because the event is not enabled. | ||
type(): | | ||
return mhpmevent<%= of_num %>.EN ? CsrFieldType::RO : CsrFieldType::RO-H; |
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.
This (and others) is actually:
return CSR[mhpmevent<%= of_num %>].EN ? # ...
That's why the regressions are failing.
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.
Thanks @dhower-qc — I updated the type() and reset_value() lines in scountovf.layout as you suggested, using CSR[mhpmevent<%= of_num %>].EN
instead of the bare mhpmevent<%= of_num %>.EN
However, I’m encountering issues:
When I run regressions and smoke test locally in VS Code, the test appears to hang during type-checking. It stalls here with no further output:
Type checking IDL code for rv32... [INFO] 2025-05-06 13:43:32: Allocating more SymbolTables Instructions: |========================================================| CSRs: |===================== |
When I pushed the changes, 4 tests failed in CI.
if I run the smoke without including the YAML file scountovf, the test completes successfully and all checks pass.
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.
The regressions are failing because it can't find CSR[mhpmeventX].OF
. That's because those fields don't exist yet...they are added by this extension!
We'll need to modify mhpmeventN.layout to add the fields [OF, MINH, SINH, UINH, VSINH, VUINH] to the event CSRs.
A few things to note: the OF and MINH fields are definedBy
Sscofpmf. The SINH field is definedBy: allOf: [S, Sscofpmf]
. Similar for the remaining *INH fields.
Why would the regression tests fail for this PR because of something added by this PR? (Maybe I don't understand.) I wonder if it could be because we're still defining everything twice, until |
I’ve updated mhpmeventN.layout to include the new fields (OF, MINH, SINH, UINH, VSINH, VUINH) as described, and regenerated the mhpmevent3–31 YAML files accordingly. However, the regressions are still failing, and when I run regress in VSCode, it hangs without producing any output. |
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.
Thanks for the hard work with this one!
Extension CSR YAML files for the
Sscofpmf
extension.CSR YAMLs for:
Closes Add Sscofpmf CSR #569