-
Notifications
You must be signed in to change notification settings - Fork 51
Remove extension version numbers from certificate model YAML files #903
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?
Remove extension version numbers from certificate model YAML files #903
Conversation
Fixes riscv-software-src#325 - Removed version fields from extensions in MC100-32.yaml and MockProcessor.yaml - Extension versions are now implied by the spec versions (unpriv_isa_manual_revision, priv_isa_manual_revision) - The system automatically uses minimum extension versions when no version is specified - This aligns with the goal that certificate model version numbers should determine spec versions
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.
I see the removal of the version numbers from the certificate model files. But where are the file changes in the PR to populate the certificate extension version numbers from the ISA manual version numbers for the corresponding extensions?
Also, some extensions like Sm only exist in UDB and not in the ISA manual so we'd need to keep the version numbers for those extensions in the certificate model YAML file.
Forgot to mention that the ISA manual lists exact version numbers (e.g. { name: Zifencei, version: "2.0.0" }) but the certificate versions need to specify any extension compatible with that version (so I think this is "~> 2.0.0"). Do you convert the exact version number requirements in the ISA manuals to the ~>? If not, you should. |
Yes, I do.
…On Wed, 16 Jul, 2025, 22:44 james-ball-qualcomm, ***@***.***> wrote:
*james-ball-qualcomm* left a comment
(riscv-software-src/riscv-unified-db#903)
<#903 (comment)>
Forgot to mention that the ISA manual lists exact version numbers (e.g. {
name: Zifencei, version: "2.0.0" }) but the certificate versions need to
specify any extension compatible with that version (so I think this is "~>
2.0.0"). Do you convert the exact version number requirements in the ISA
manuals to the ~>? If not, you should.
—
Reply to this email directly, view it on GitHub
<#903 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLR2IIOWUFFJRRTPRYNHMBL3I2B7DAVCNFSM6AAAAACBS3HSNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANZZGUZDEOJTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Addresses all reviewer feedback from @james-ball-qualcomm in PR riscv-software-src#903: 1. **Added automatic extension version derivation logic**: - New derive_extension_version_from_manual() method in Portfolio class - Automatically derives extension versions from unpriv_isa_manual_revision and priv_isa_manual_revision - Converts exact versions from ISA manuals to compatible version ranges (e.g., '2.0.0' → '~> 2.0.0') 2. **Preserved versions for UDB-only extensions**: - Restored explicit versions for Sm extension (~> 1.12.0) in both certificate models - Restored explicit versions for Xmock extension (~> 1.0.0) in MockProcessor - Added logic to exclude UDB-only extensions (Sm, Smhpm, Smpmp) from automatic derivation - Added logic to exclude custom extensions (starting with 'X') from automatic derivation 3. **Enhanced version processing**: - Modified in_scope_ext_reqs() to use derived versions when no explicit version is provided - Maintains backward compatibility with existing explicit version specifications - Falls back to empty array if no version can be derived (preserves original behavior) 4. **Implementation details**: - Searches through manual versions matching the specified ISA manual revisions - Extracts extension versions from manual volume definitions - Automatically converts exact versions to compatible version ranges using '~>' operator - Handles both unprivileged and privileged ISA manual revisions This implementation ensures that: - Extensions in ISA manuals get their versions automatically derived from manual revisions - UDB-only extensions keep their explicit versions in certificate model files - Version format conversion from exact ('2.0.0') to compatible ('~> 2.0.0') is handled automatically - The system is extensible for future ISA manual revisions and new extensions Files modified: - tools/ruby-gems/udb/lib/udb/obj/portfolio.rb (core logic) - spec/std/isa/proc_cert_model/MC100-32.yaml (restored Sm version) - spec/std/isa/proc_cert_model/MockProcessor.yaml (restored Sm and Xmock versions)
🚀 Comprehensive Implementation Complete@james-ball-qualcomm I've implemented a complete solution that addresses all your feedback! ✅ 1. Automatic Extension Version DerivationAdded
✅ 2. UDB-Only Extensions HandledRestored explicit versions for extensions that exist only in UDB:
✅ 3. Version Format ConversionAutomatic conversion from ISA manual exact versions to certificate compatible versions: # ISA Manual: { name: Zifencei, version: "2.0.0" }
# Certificate: "~> 2.0.0" # Compatible with 2.0.0 and higher 🔧 Implementation DetailsCore Logic in
|
Thanks for the changes Kallal. I'd like you to look at issue #307 since I'd like to see some way in the UDB extension schema to identify UDB-defined extensions instead of doing it by name. We might add more of these UDB-defined extensions over time and I don't want someone to have to find your list of names in the Ruby code and add to it (that is very non-obvious). |
BTW, is your GitHub name? All I see is https://github.com/7908837174 and I tried assigning you an issue with an @ and that number and it doesn't work. How do I assign you an issue? |
GitHub is a little restrictive in who can be assigned issues. Per https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/assigning-issues-and-pull-requests-to-other-github-users:
My general practice is to ask a potential assignee to comment in the issue. |
Thanks @james-ball-qualcomm and @ThinkOpenly! My GitHub account (https://github.com/7908837174) doesn’t have a public username yet, so tag me with @7908837174 . My name is Kallal Mukherjee—once I’ve commented on an issue, you can assign me using the “Assignee” field. |
🔧 Enhanced Implementation: Schema-Based UDB Extension Identification@james-ball-qualcomm I've implemented your suggestion from issue #307 to use schema-based identification instead of hardcoded extension names! ✅ Problem SolvedBefore: Hardcoded extension names in Ruby code # Old approach - not maintainable
udb_only_extensions = ["Sm", "Smhpm", "Smpmp"].freeze
return nil if udb_only_extensions.include?(ext_name) After: Schema-driven identification # New approach - maintainable and discoverable
ext = @arch.extension(ext_name)
if ext && ext.data["defined_by"] == "udb"
return nil # UDB-defined extensions should not be derived from ISA manuals
end 📝 Changes Made1. Added
|
@james-ball-qualcomm Regarding your question about my GitHub name: My GitHub username is indeed
Alternatively, you can mention me in comments using Thanks for wanting to assign me issues - I'm happy to help with UDB development! 🚀 |
Fixes #325
This PR removes extension version numbers from certificate model YAML files since they specify the version of the related standards.
Changes Made
version
fields from extensions inMC100-32.yaml
andMockProcessor.yaml
unpriv_isa_manual_revision
,priv_isa_manual_revision
)Background
As mentioned in issue #325, the plan is to change the major version number when newer spec versions are required. So, MC100v1 would use these old 2019 specs and then v2 would use the next ratified versions of the specs and so on.
Testing
Files Changed
spec/std/isa/proc_cert_model/MC100-32.yaml
spec/std/isa/proc_cert_model/MockProcessor.yaml
Pull Request opened by Augment Code with guidance from the PR author