sail-riscv icon indicating copy to clipboard operation
sail-riscv copied to clipboard

Support multiple spec versions

Open Timmmm opened this issue 1 year ago • 3 comments

Currently the model doesn't really say what version of any of the specifications it is implementing. We need to add functions in the model to allow switching on the versions.

In the medium term these can be controlled by command line flags. In the long term they can come from the riscv-config YAML. That has entries for the privileged and unprivileged specs which they have confusingly called User_Spec_Version for some reason.

More spec versions are required for all the extensions that are supported (e.g. bitmanip, vector). Those two would be a start though.

Timmmm avatar Oct 10 '23 12:10 Timmmm

Officially, there are no spec versions, just extensions - except the priv spec has extension names with numbers in them. (e.g. priv 1.11, 1.12, and eventually 1.13 I suppose). There are some chips out there that have implemented unratified versions of specs - those are considered custom extensions. Whether we want to support those in Sail is a different discussion.

On Tue, Oct 10, 2023 at 5:26 AM Tim Hutt @.***> wrote:

Currently the model doesn't really say what version of any of the specifications it is implementing. We need to add functions in the model to allow switching on the versions.

In the medium term these can be controlled by command line flags. In the long term they can come from the riscv-config YAML. That has entries for the privileged and unprivileged specs https://riscv-config.readthedocs.io/en/stable/yaml-specs.html#user-spec-version which they have confusingly called User_Spec_Version for some reason.

More spec versions are required for all the extensions that are supported (e.g. bitmanip, vector). Those two would be a start though.

— Reply to this email directly, view it on GitHub https://github.com/riscv/sail-riscv/issues/319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPXVJQWUVJP6STPSVXUXEDX6U5HXAVCNFSM6AAAAAA52IUOPWVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTKMRSHEYTOMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

allenjbaum avatar Oct 10 '23 12:10 allenjbaum

I've assigned myself this issue.

I'll be working on PRs for implementation of priv 1.13 features.

billmcspadden-riscv avatar Aug 01 '24 14:08 billmcspadden-riscv

I think it's probably a good idea to add the mechanism for specifying the priv/unpriv spec version (i.e. a version enum, checking function and command line flags) before adding any new features. Also 1.13 doesn't seem to exist - it uses date based versions now apparently.

Timmmm avatar Aug 01 '24 20:08 Timmmm