Replies: 3 comments 7 replies
-
Version numbers are optional so you need to be able to separate the optional major and additional optional minor components from the extension name itself (I mean, you could turn the unversioned or "partially"-versioned names into canonically-versioned strings, but either way you need to have a full parser, so doesn't really matter which direction you go). |
Beta Was this translation helpful? Give feedback.
-
I think you need to parse version numbers and expose them to Sail, as we might well in the future run into the case where you need something like:
I looked at the riscv-config ISA string parser code and I think it misses a few cases, it also has the same issue as spike (from our perspective) where it only parses extensions it knows about. One case I noticed that isn't covered in most of the implementations I saw is that |
Beta Was this translation helpful? Give feedback.
-
There are some other complexities with the version numbers. Implicitly the major version is stated as being the last released version of the document (so as soon as RISC-V international releases a new spec for an extension, your string changes meaning unless you explicitly versioned everything). In my code I added a default_major_version argument. However I realise now this is incorrect as not every extension has the same default version. All the base extensions do, but various |
Beta Was this translation helpful? Give feedback.
-
One part of #175 concerns how to parse the ISA string from a
riscv-config
YAML file, in order to enable/disable extensions in the Sail model. We got a bit sidetracked (my fault) so I'm moving that discussion here. Summary so far:string_drop()
creating a new string. May not be an issue. Or if it is it may be possible to changesail.c
to use reference counted strings.Other things to note/question:
riscv-config
requires uppercase. The Sail model should probably be case insensitive.riscv-config
mandates its own strict canonical ordering (and no extraneous underscores). However neither of these affect the execution of the Sail model so IMO they should be ignored.P
extension you need to handle. No big deal; just something to be aware of.This could (any maybe should?) be done independently from the
riscv-config
work in #175 since it only needs a single string as input, and that's easy to add as a CLI parameter.Beta Was this translation helpful? Give feedback.
All reactions