First steps


mark
 

I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Greg Favor
 

A few comments inserted below:

On Mon, May 23, 2022 at 9:19 AM mark <markhimelstein@...> wrote:
Extensions may also include other extensions.

Unless I'm missing something, this sounds misleading.  Every RV extension is a separate standalone entity that either is or isn't supported.  Inter-dependencies only stem from one extension requiring another extension to be present or to not be present.  Myself, I wouldn't express the former (i.e. requiring presence) as one extension including another such that one only needs to indicate support for the former and can expect that to "expand" into a spec that both it and its "parent" extension are supported.  Put differently, irrespective of whether one extension depends on the presence of another, both should be required to be explicitly specified as being present.  This also sidesteps the question of whether an extension "macro" expands into a spec of what other extensions it is Incompatible with (and hence must not be indicated as present).


Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

My preceding comment would suggest that ISA bases and ISA extensions never expand as macros.  The only macros are those explicitly defined by RVI, e.g. "G" and ISA profiles.

 
How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Yes, this TG is developing a "low level discovery method".  How low-level software (e.g. boot software) uses that to populate higher-level discovery structures (e.g. Device Tree or ACPI tables), is out of scope for this TG.
 

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

All in the context of only trying and needing to be a "low level" discovery method that generally M-mode software would use (whereas an OS and hypervisor like Linux and KVM will use industry standard DT/ACPI tables).


The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

Profiles don't have any parameters of their own.  Just extensions have optionality and parameters.
 
I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

This would be my hope.  Expressing the supported options and parameters for an extension is "just" additional information about an extension past the information of whether it is present or not.

Greg


Philipp Tomsich
 

Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Allen Baum
 

And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Irma T Flores-Mendoza <irma.t.flores-mendoza@...>
 

Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Robert Chyla
 

Hi,


I think it is important to do the following:


1. Identify all ratified (as of today) extensions

1.1. Consider 'tree-structure' of extensions

1.2. Consider fact that extension A may require extension B

1.3. Consider fact that extension A may EXCLUDE extension B (even in different tree branch ...)

1.4. Consider fact that some extensions have 'parameters' (like size of virtual address ...)

1.4.1.  These 'parameters' may be static (fixed) or dynamic (adjusted in run time) I assume


2. Identify all extensions to be ratified soon as we do not want to create 'a standard' which may need to change next day. Zc is good example from two reasons:

2.1. It may be ratified together with 'config-structure'

2.2. Some of Zc sub-extensions exclude double precision float extension ...).


IMO only after doing all above, we should be looking at a way (simple way ...) to encode/express/describe all of above in Schema (which I think is possible)


Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

-Robert Chyla
Sr. Staff Engineer, Debug and Trace
cell: 1-805-990-1511, www.sifive.com
On 7/18/2022 8:37 AM, Irma T Flores-Mendoza wrote:

Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Greg Favor
 

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

One small correction:  Each profile covers all ratified extensions (relevant to that profile, e.g. all Supervisor-level extensions for an 'S' profile), and categories each extension in one of four categories (Mandatory, Supported Optional, Unsupported Optional, Incompatible).

So in one sense a profile is a set of ALL relevant ratified extensions.  But from a perspective of which extensions are Mandated by a profile, that of course is a subset of all relevant ratified extensions.  When people have talked about treating profiles like extensions in tech-config insofar as discovery of whether a profile is implemented or not, that has been wrt to the Mandatory subset of the profile.  Any Supported Optional extensions within a profile that are actually implemented by a design would still have to be separately discovered as being implemented.

Greg


 


Robert Chyla
 

Agree - I did mean 'all Mandatory extensions' but I said 'all extensions'.

/Robert

On 7/18/2022 10:50 AM, Greg Favor wrote:

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

One small correction:  Each profile covers all ratified extensions (relevant to that profile, e.g. all Supervisor-level extensions for an 'S' profile), and categories each extension in one of four categories (Mandatory, Supported Optional, Unsupported Optional, Incompatible).

So in one sense a profile is a set of ALL relevant ratified extensions.  But from a perspective of which extensions are Mandated by a profile, that of course is a subset of all relevant ratified extensions.  When people have talked about treating profiles like extensions in tech-config insofar as discovery of whether a profile is implemented or not, that has been wrt to the Mandatory subset of the profile.  Any Supported Optional extensions within a profile that are actually implemented by a design would still have to be separately discovered as being implemented.

Greg


 


Allen Baum
 

My list is attached. I am quite sure it is not complete, and is not bug free.
It may be a bit cryptic; sheets 3&4 were used to construct the first sheet.
This is primarily derived from the Imperas simulator options, with additions and comments by myself. 
Note that when something is described as "can use CSR definition", that is specifically referring to the riscv-config schema, 
which can describe a CSR bit as RW/RO1/ROZ, and (for WARL fields) also describes the legal value ranges, and the mappings from illegal to legal ranges,
and any dependencies on other CSR fields which may affect which values are legal.

I'm not sure I agree with many of Robert's points above; The ACT's have a completely separate stage (riscv-config)
that does a sanity check on the YAML formatted file that describes what the core is doing.
Those sanity check rules need to be described (a different YAML formatted file IIRC) but that is an entirely separate schema, 
and is core independent, (e.g., it understands that D requires F (or D implies F), or Zicntr requires Zicsr (ditto), or F and Zfinx can't coexist)

Our thought is that the same approach should be taken for named profiles; 
i.e there are no profile tests, but there could be a sanity check that a hart implements: 
  - all mandatory extension, 
  - no incompatible extensions, 
  - conforms to any optional behavior ranges required by the profile.
It shouldn't need to care about optional extensions, whether supported or unsupported (which are probably everything not in the above categories)

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi,


I think it is important to do the following:


1. Identify all ratified (as of today) extensions

1.1. Consider 'tree-structure' of extensions

1.2. Consider fact that extension A may require extension B

1.3. Consider fact that extension A may EXCLUDE extension B (even in different tree branch ...)

1.4. Consider fact that some extensions have 'parameters' (like size of virtual address ...)

1.4.1.  These 'parameters' may be static (fixed) or dynamic (adjusted in run time) I assume


2. Identify all extensions to be ratified soon as we do not want to create 'a standard' which may need to change next day. Zc is good example from two reasons:

2.1. It may be ratified together with 'config-structure'

2.2. Some of Zc sub-extensions exclude double precision float extension ...).


IMO only after doing all above, we should be looking at a way (simple way ...) to encode/express/describe all of above in Schema (which I think is possible)


Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

-Robert Chyla
Sr. Staff Engineer, Debug and Trace
cell: 1-805-990-1511, www.sifive.com
On 7/18/2022 8:37 AM, Irma T Flores-Mendoza wrote:
Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Robert Chyla
 

Hi Allen.

This what you provided is very deeply elaborated and very valuable 'set' of data driven from practical use-cases of (different?) simulators in ACT's.

Nut my understanding was that we need to first define (simple?) 'yes/no' for all ratified (up to date ...) extensions.

Once this is 'settled', we should go deeper with dependencies/conditions and parameters .... needless to say some of these (say 'endian' ...) are of critical importance, so we cannot stop at allowing only yes/no to be 'ratified' as it will have no practical value.

PS. I am very skeptical about '???_version' fields. IMO these can/should be there for informative purposes ONLY and rather NOT used in code ... If there is a need for 'conditional' handling it should be rather defined as separated boolean/numeric parameter with well defined semantic.

Thanks,

/Robert


On 7/18/2022 11:17 AM, Allen Baum wrote:

My list is attached. I am quite sure it is not complete, and is not bug free.
It may be a bit cryptic; sheets 3&4 were used to construct the first sheet.
This is primarily derived from the Imperas simulator options, with additions and comments by myself. 
Note that when something is described as "can use CSR definition", that is specifically referring to the riscv-config schema, 
which can describe a CSR bit as RW/RO1/ROZ, and (for WARL fields) also describes the legal value ranges, and the mappings from illegal to legal ranges,
and any dependencies on other CSR fields which may affect which values are legal.

I'm not sure I agree with many of Robert's points above; The ACT's have a completely separate stage (riscv-config)
that does a sanity check on the YAML formatted file that describes what the core is doing.
Those sanity check rules need to be described (a different YAML formatted file IIRC) but that is an entirely separate schema, 
and is core independent, (e.g., it understands that D requires F (or D implies F), or Zicntr requires Zicsr (ditto), or F and Zfinx can't coexist)

Our thought is that the same approach should be taken for named profiles; 
i.e there are no profile tests, but there could be a sanity check that a hart implements: 
  - all mandatory extension, 
  - no incompatible extensions, 
  - conforms to any optional behavior ranges required by the profile.
It shouldn't need to care about optional extensions, whether supported or unsupported (which are probably everything not in the above categories)

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi,


I think it is important to do the following:


1. Identify all ratified (as of today) extensions

1.1. Consider 'tree-structure' of extensions

1.2. Consider fact that extension A may require extension B

1.3. Consider fact that extension A may EXCLUDE extension B (even in different tree branch ...)

1.4. Consider fact that some extensions have 'parameters' (like size of virtual address ...)

1.4.1.  These 'parameters' may be static (fixed) or dynamic (adjusted in run time) I assume


2. Identify all extensions to be ratified soon as we do not want to create 'a standard' which may need to change next day. Zc is good example from two reasons:

2.1. It may be ratified together with 'config-structure'

2.2. Some of Zc sub-extensions exclude double precision float extension ...).


IMO only after doing all above, we should be looking at a way (simple way ...) to encode/express/describe all of above in Schema (which I think is possible)


Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

-Robert Chyla
Sr. Staff Engineer, Debug and Trace
cell: 1-805-990-1511, www.sifive.com
On 7/18/2022 8:37 AM, Irma T Flores-Mendoza wrote:
Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Allen Baum
 

I don't disagree, and make no claim that this list should simply be copied for tech-config.

This is just a catalog of (most of)  the architecturally valid options defined by the RISC-V privileged and unprivileged specs.
It's a menu that this group can pick and choose from, and was intended only to illustrate the available choices.
Which of these are needed in the config-struct will be decided by tech-config.

The first version of tech-config will be binary choices, (e.g. is this extension implemented or not...) but that won't last in all probability.
The exact evolution of which of the options are exposed by the config-struct is up to this group, not me.

Regarding version numbers:
This list was taken from the Imperas simulator originally (with their permission), 
My understanding is that ALL of these (including version numbers) were required to be able to test actual hardware that they've been asked to verify. 
The version numbers reflect the fact that vendors design (and ship) their HW before RISC-V specs have been frozen.
In essence, these version could be considered a custom extension that is mostly, but not completely, compatible. 
But they are (or will be) shipping, so there will be tools and SW that need to know this (at least, from those vendor's perspective).

It is up to tech-config to decide if there should be support for that in the config-struct. 
It's an interesting question, and I don't lean in any particular direction. 
From an ACT perspective, we will be testing only valid architectural options (until we're told otherwise). 
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices
(though an ennumeration might be a better way to do it).

On Mon, Jul 18, 2022 at 11:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi Allen.

This what you provided is very deeply elaborated and very valuable 'set' of data driven from practical use-cases of (different?) simulators in ACT's.

Nut my understanding was that we need to first define (simple?) 'yes/no' for all ratified (up to date ...) extensions.

Once this is 'settled', we should go deeper with dependencies/conditions and parameters .... needless to say some of these (say 'endian' ...) are of critical importance, so we cannot stop at allowing only yes/no to be 'ratified' as it will have no practical value.

PS. I am very skeptical about '???_version' fields. IMO these can/should be there for informative purposes ONLY and rather NOT used in code ... If there is a need for 'conditional' handling it should be rather defined as separated boolean/numeric parameter with well defined semantic.

Thanks,

/Robert


On 7/18/2022 11:17 AM, Allen Baum wrote:
My list is attached. I am quite sure it is not complete, and is not bug free.
It may be a bit cryptic; sheets 3&4 were used to construct the first sheet.
This is primarily derived from the Imperas simulator options, with additions and comments by myself. 
Note that when something is described as "can use CSR definition", that is specifically referring to the riscv-config schema, 
which can describe a CSR bit as RW/RO1/ROZ, and (for WARL fields) also describes the legal value ranges, and the mappings from illegal to legal ranges,
and any dependencies on other CSR fields which may affect which values are legal.

I'm not sure I agree with many of Robert's points above; The ACT's have a completely separate stage (riscv-config)
that does a sanity check on the YAML formatted file that describes what the core is doing.
Those sanity check rules need to be described (a different YAML formatted file IIRC) but that is an entirely separate schema, 
and is core independent, (e.g., it understands that D requires F (or D implies F), or Zicntr requires Zicsr (ditto), or F and Zfinx can't coexist)

Our thought is that the same approach should be taken for named profiles; 
i.e there are no profile tests, but there could be a sanity check that a hart implements: 
  - all mandatory extension, 
  - no incompatible extensions, 
  - conforms to any optional behavior ranges required by the profile.
It shouldn't need to care about optional extensions, whether supported or unsupported (which are probably everything not in the above categories)

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi,


I think it is important to do the following:


1. Identify all ratified (as of today) extensions

1.1. Consider 'tree-structure' of extensions

1.2. Consider fact that extension A may require extension B

1.3. Consider fact that extension A may EXCLUDE extension B (even in different tree branch ...)

1.4. Consider fact that some extensions have 'parameters' (like size of virtual address ...)

1.4.1.  These 'parameters' may be static (fixed) or dynamic (adjusted in run time) I assume


2. Identify all extensions to be ratified soon as we do not want to create 'a standard' which may need to change next day. Zc is good example from two reasons:

2.1. It may be ratified together with 'config-structure'

2.2. Some of Zc sub-extensions exclude double precision float extension ...).


IMO only after doing all above, we should be looking at a way (simple way ...) to encode/express/describe all of above in Schema (which I think is possible)


Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

-Robert Chyla
Sr. Staff Engineer, Debug and Trace
cell: 1-805-990-1511, www.sifive.com
On 7/18/2022 8:37 AM, Irma T Flores-Mendoza wrote:
Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Robert Chyla
 

I think we are in-sync - I think this what you provided is very valuable super-set (most likely incomplete, but still very valuable!)

According to Mark's (reasonable!) request we should be focusing on yes/no for ALL (ratified) extensions. But we know it will not be enough as some extensions (without 'parameters' ...) are NOT precise enough.

/Robert

On 7/19/2022 7:32 AM, Allen Baum wrote:

I don't disagree, and make no claim that this list should simply be copied for tech-config.

This is just a catalog of (most of)  the architecturally valid options defined by the RISC-V privileged and unprivileged specs.
It's a menu that this group can pick and choose from, and was intended only to illustrate the available choices.
Which of these are needed in the config-struct will be decided by tech-config.

The first version of tech-config will be binary choices, (e.g. is this extension implemented or not...) but that won't last in all probability.
The exact evolution of which of the options are exposed by the config-struct is up to this group, not me.

Regarding version numbers:
This list was taken from the Imperas simulator originally (with their permission), 
My understanding is that ALL of these (including version numbers) were required to be able to test actual hardware that they've been asked to verify. 
The version numbers reflect the fact that vendors design (and ship) their HW before RISC-V specs have been frozen.
In essence, these version could be considered a custom extension that is mostly, but not completely, compatible. 
But they are (or will be) shipping, so there will be tools and SW that need to know this (at least, from those vendor's perspective).

It is up to tech-config to decide if there should be support for that in the config-struct. 
It's an interesting question, and I don't lean in any particular direction. 
From an ACT perspective, we will be testing only valid architectural options (until we're told otherwise). 
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices
(though an ennumeration might be a better way to do it).

On Mon, Jul 18, 2022 at 11:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi Allen.

This what you provided is very deeply elaborated and very valuable 'set' of data driven from practical use-cases of (different?) simulators in ACT's.

Nut my understanding was that we need to first define (simple?) 'yes/no' for all ratified (up to date ...) extensions.

Once this is 'settled', we should go deeper with dependencies/conditions and parameters .... needless to say some of these (say 'endian' ...) are of critical importance, so we cannot stop at allowing only yes/no to be 'ratified' as it will have no practical value.

PS. I am very skeptical about '???_version' fields. IMO these can/should be there for informative purposes ONLY and rather NOT used in code ... If there is a need for 'conditional' handling it should be rather defined as separated boolean/numeric parameter with well defined semantic.

Thanks,

/Robert


On 7/18/2022 11:17 AM, Allen Baum wrote:
My list is attached. I am quite sure it is not complete, and is not bug free.
It may be a bit cryptic; sheets 3&4 were used to construct the first sheet.
This is primarily derived from the Imperas simulator options, with additions and comments by myself. 
Note that when something is described as "can use CSR definition", that is specifically referring to the riscv-config schema, 
which can describe a CSR bit as RW/RO1/ROZ, and (for WARL fields) also describes the legal value ranges, and the mappings from illegal to legal ranges,
and any dependencies on other CSR fields which may affect which values are legal.

I'm not sure I agree with many of Robert's points above; The ACT's have a completely separate stage (riscv-config)
that does a sanity check on the YAML formatted file that describes what the core is doing.
Those sanity check rules need to be described (a different YAML formatted file IIRC) but that is an entirely separate schema, 
and is core independent, (e.g., it understands that D requires F (or D implies F), or Zicntr requires Zicsr (ditto), or F and Zfinx can't coexist)

Our thought is that the same approach should be taken for named profiles; 
i.e there are no profile tests, but there could be a sanity check that a hart implements: 
  - all mandatory extension, 
  - no incompatible extensions, 
  - conforms to any optional behavior ranges required by the profile.
It shouldn't need to care about optional extensions, whether supported or unsupported (which are probably everything not in the above categories)

On Mon, Jul 18, 2022 at 10:38 AM Robert Chyla <Robert.Chyla@...> wrote:

Hi,


I think it is important to do the following:


1. Identify all ratified (as of today) extensions

1.1. Consider 'tree-structure' of extensions

1.2. Consider fact that extension A may require extension B

1.3. Consider fact that extension A may EXCLUDE extension B (even in different tree branch ...)

1.4. Consider fact that some extensions have 'parameters' (like size of virtual address ...)

1.4.1.  These 'parameters' may be static (fixed) or dynamic (adjusted in run time) I assume


2. Identify all extensions to be ratified soon as we do not want to create 'a standard' which may need to change next day. Zc is good example from two reasons:

2.1. It may be ratified together with 'config-structure'

2.2. Some of Zc sub-extensions exclude double precision float extension ...).


IMO only after doing all above, we should be looking at a way (simple way ...) to encode/express/describe all of above in Schema (which I think is possible)


Each of profiles should be then considered as 'set of extensions' (all extensions listed for each profile must be fully supported by implementation).

-Robert Chyla
Sr. Staff Engineer, Debug and Trace
cell: 1-805-990-1511, www.sifive.com
On 7/18/2022 8:37 AM, Irma T Flores-Mendoza wrote:
Hi Allen, "I am preparing a list of the architectural options I know about.While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)"
Please reply back to this email with the list you were preparing (details in your email forwarded below).  I will work on incorporating it to the Schema.  Many thanks in advance

Regards,


Irma T. Flores-Mendoza - #ProudToBeAnIBMer 

System Z Firmware Engineer, RISC-V Processor Firmware

IBM



From: tech-config@... <tech-config@...> on behalf of Allen Baum <allen.baum@...>
Sent: Wednesday, May 25, 2022 5:49 AM
To: config <tech-config@...>
Subject: [EXTERNAL] [RISC-V] [tech-config] First steps
 
And, of course, I need to add some other thoughts. The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use. There is another
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
And, of course, I need to add some other thoughts.
The configuration structure is intended for on-line use; boot code and debuggers can read it and use it to create data structures that the boot code, OSes and debuggers will use.
There is another configuration format which is intended for off-line use. 

While this was primarily developed for the architectural compatibility tests, it can also be used by toolchains to guide emulation, cross compilation and optimizations.
It is documented in the riscv-config github repo, and it is a YAML formatted schema that goes into great detail regarding not just the extensions supported, 
but all architectural options, many of which have no name and no current way of interrogating a system  to see which option is implemented
(besides trying something and seeing which result it gives, which could be a trap).

The majority of architectural op[tions can be determined by writing and reading CSRs  fields
 and seeing which bits can be written, and which bits are readonly and what their values are.
(e.g. reading MISA tells you which major extensions are supported; writing it will tell you which of those can be disabled).
Obviously, this only works for single bit fields; for wider fields it can be much, much more complicated)

The intent from the beginning was that there be a tool that can translate from one structure to the other, 
though config-struct doesn't need to support the details that riscv-config is intended to support.
(i.e. offline use cannot read and write CSRs to determine what is supported) It is not necessary that there is a 1:1 correspondence from one to the other; the will be definitions in one that the other doesn’t care about.

I am preparing a list of the architectural options I know about.
While many are identified by the architecture string (e.g. Zkne), there are many that are not, though some have been given SBI names (e.g whether WLRL trap on illegal values or not.)





On Mon, May 23, 2022 at 10:00 AM Philipp Tomsich <philipp.tomsich@...> wrote:
Mark,

Thank you for summarizing (+1) — I, unfortunately, have a standing conflict in the current tech-config timeslot.
Let me add a bit more color from a call I had with Irma last week…

The priorities of Unified Discovery need to be in defining and specifying the ground rules (referenced standards, referenced encodings, RISC-V specific encoding rules, guidance for groups on how they summarize their configurable items) and on the end-to-end flow.  Any Schema version's minutiae must be kept separate from the Specification itself, as we will not revise the specification for changes.  The PoC for the rat-plan shall be simple, focused on decoding and using the information to populate the higher-level discovery info (e.g. device-tree) for Linux.

The group must provide three outputs this year:
  • The Unified Discovery specification document.
  • Agreed-on parameter lists (that are then encoded per the specification) with all groups.
  • Finally, but just as critical for our future success: a complete future plan/parking lot of issues to be worked on next (e.g. multi-socket, …).
Too many groups and efforts depend on this to let this slip out further.

Philipp.

On Mon, 23 May 2022 at 18:19, mark <markhimelstein@...> wrote:
I have talked with Irma today and promised to write down my guidance on goals and some context. This is only my guidance. It is not a law! If you think differently (or I got something wrong) after reading this email please speak up.

We have adopted a strong divide and conquer philosophy. It doesn't mean that we won't do follow-on work. We are just trying to not slow down ratifications.

The most important thing for me in discovery are to support bases, extensions, and profiles. There are two parts for me: existence and parameters.

Both bases and extensions define instructions, behavior and state. You are not really RISC-V unless you have a base.

Extensions may also include other extensions.

Profiles consist of a base and extensions.

You can look at bases and extensions and profiles as macros that expand

Compilers will eventually encourage developers to use profiles instead of long strings of extensions. Compilers with adorn ELF headers with the base and profiles and/or extensions it requires.

How an OS gets the discovery information is up to the software stack (direct, SBI calls, device tree, etc.).

Discovery is intended to provide a way for system level software to do its job including things like execute its own  appropriately, be able to decide whether the system can execute a binary (by comparing elf headers and discovery info), what state needs to be saved and restored on context switch, etc.

In my opinion, the most important things are to lay down the infrastructure (asn), provide libraries to digest it into an in memory data structure with lookup routines, and provide the key/value pairs for existence.

The second most important priority are the parameters for bases, extensions, and profiles (not clear to me if this applies to all 3 yet).

I suggest both tasks (task as in Task Group) be worked on immediately but the parameters should not stop the highest priority group discussed above.

If they both get ratified this year great. If the parameters get done early next year that is, in my opinion, better than waiting for both.

The Task Group's first responsibility is to define the strategy for these tasks and publish it and review it with a revised ratplan with chairs. This must include line of sight to getting the work done employing the governing committee, Dev Partners, and myself if necessary. This should be done in the next 4 weeks.

Since everyone is impacted by this, other committees and SIGs and TGs must get involved and interact with this TG. This can include identifying reps from each group to monitor the mailing list or join the TG meetings. I will bring this up at chairs.

Mark





Greg Favor
 

On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Robert Chyla
 

Thanks Greg!

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:

On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Greg Favor
 

On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Robert Chyla
 

Hyphens are not as big problem as 'subset of the contents' is ...

/Robert

On 7/20/2022 10:32 AM, Greg Favor wrote:

On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Greg Favor
 


On Wed, Jul 20, 2022 at 10:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hyphens are not as big problem as 'subset of the contents' is ...

The 'subset of ...' should not be an issue.  The current Priv and Unpriv documents literally are just that.  They each contain a number of individual arch extensions.  From a discovery perspective the former doesn't matter; only the actual extensions matter - irrespective of whether they reside in a common document or in separate documents.  (For that matter, it's not like all ISA extensions currently reside inside the latest Priv and Unpriv documents.  Some ratified extensions still reside in separate documents.  This will all be reconciled as part of the conversion of all the Priv and Unpriv ISA extensions to adoc and into just two documents.)

Greg
 

/Robert

On 7/20/2022 10:32 AM, Greg Favor wrote:
On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Allen Baum
 

To be clear: the 1.12 version, from the Imperas point of view (which is the origin of this list),
 is basically just a macro for Sm1p11_Sm1p12_Ss1p11_Ss1p12.
Just as G is a macro for IMADZifencei.
 How that interacts with  individual bits remains to be decided 
(e.g. could you specify S1p12 as well as Sm1p11_Sm1p12_Ss1p11_Ss1p12 in any combination?
 i.e. does the macro expansion simply OR with the individual extension as far as tools are concerned?)


On Wed, Jul 20, 2022 at 10:55 AM Greg Favor <gfavor@...> wrote:

On Wed, Jul 20, 2022 at 10:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hyphens are not as big problem as 'subset of the contents' is ...

The 'subset of ...' should not be an issue.  The current Priv and Unpriv documents literally are just that.  They each contain a number of individual arch extensions.  From a discovery perspective the former doesn't matter; only the actual extensions matter - irrespective of whether they reside in a common document or in separate documents.  (For that matter, it's not like all ISA extensions currently reside inside the latest Priv and Unpriv documents.  Some ratified extensions still reside in separate documents.  This will all be reconciled as part of the conversion of all the Priv and Unpriv ISA extensions to adoc and into just two documents.)

Greg
 

/Robert

On 7/20/2022 10:32 AM, Greg Favor wrote:
On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Greg Favor
 

On Wed, Jul 20, 2022 at 10:09 PM Allen Baum <allen.baum@...> wrote:
To be clear: the 1.12 version, from the Imperas point of view (which is the origin of this list),

Can I just say that Imperas's view doesn't intrinsically make it a correct view.
 
 is basically just a macro for Sm1p11_Sm1p12_Ss1p11_Ss1p12.

To be precise, the Priv 1.12 spec (i.e. the Priv 1.12 document) is a superset of more than just the Sm1p12 and Ss1p12 extensions.

And while the 1p12's may be 99.99% backward compatible, they may not literally be 100.00% backward compatible.  I don't remember what may have been that tiny delta, but simply assuming that the 1p12's are a pure superset of the 1p11's is being simplistic.  (But this is a tertiary point to the surrounding inaccuracies.)

Just as G is a macro for IMADZifencei.

That is an incorrect macro expansion.  Close but not correct in two regards.  Look at the arch specs for the accurate definition.
 
 How that interacts with  individual bits remains to be decided 
(e.g. could you specify S1p12

"S1p12" is NOT a ratified extension name and there is no plan for it to be.  Tech-config should only be referencing actual ratified extension names.

Sorry for sounding like being on a soapbox, but let's just stick to the official names of actual ratified extensions (and profiles), and not cause extra confusion.  And where some extensions (or 'G' as a special case) represent a group of smaller extensions (not to be called sub-extensions - that is incorrect RISC-V terminology), let's try and be accurate.

Greg

 
as well as Sm1p11_Sm1p12_Ss1p11_Ss1p12 in any combination?
 i.e. does the macro expansion simply OR with the individual extension as far as tools are concerned?)

On Wed, Jul 20, 2022 at 10:55 AM Greg Favor <gfavor@...> wrote:

On Wed, Jul 20, 2022 at 10:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hyphens are not as big problem as 'subset of the contents' is ...

The 'subset of ...' should not be an issue.  The current Priv and Unpriv documents literally are just that.  They each contain a number of individual arch extensions.  From a discovery perspective the former doesn't matter; only the actual extensions matter - irrespective of whether they reside in a common document or in separate documents.  (For that matter, it's not like all ISA extensions currently reside inside the latest Priv and Unpriv documents.  Some ratified extensions still reside in separate documents.  This will all be reconciled as part of the conversion of all the Priv and Unpriv ISA extensions to adoc and into just two documents.)

Greg
 

/Robert

On 7/20/2022 10:32 AM, Greg Favor wrote:
On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg


Allen Baum
 

Sorry, I didn't mean it was correct; I was just explaining why the spreadsheet lists it that way.
And it didn't mean to imply that S1p12 was any ratified extension or macro name, I was just giving an example of what it could mean, and the issues that result
I apologize for creating confusion
For the G macro: that was a cut&paste from unprivspec  table 28.1 pg 164 from july 7, 2022, so if its wrong, its not my fault.

On Wed, Jul 20, 2022 at 11:25 PM Greg Favor <gfavor@...> wrote:
On Wed, Jul 20, 2022 at 10:09 PM Allen Baum <allen.baum@...> wrote:
To be clear: the 1.12 version, from the Imperas point of view (which is the origin of this list),

Can I just say that Imperas's view doesn't intrinsically make it a correct view.
 
 is basically just a macro for Sm1p11_Sm1p12_Ss1p11_Ss1p12.

To be precise, the Priv 1.12 spec (i.e. the Priv 1.12 document) is a superset of more than just the Sm1p12 and Ss1p12 extensions.

And while the 1p12's may be 99.99% backward compatible, they may not literally be 100.00% backward compatible.  I don't remember what may have been that tiny delta, but simply assuming that the 1p12's are a pure superset of the 1p11's is being simplistic.  (But this is a tertiary point to the surrounding inaccuracies.)

Just as G is a macro for IMADZifencei.

That is an incorrect macro expansion.  Close but not correct in two regards.  Look at the arch specs for the accurate definition.
 
 How that interacts with  individual bits remains to be decided 
(e.g. could you specify S1p12

"S1p12" is NOT a ratified extension name and there is no plan for it to be.  Tech-config should only be referencing actual ratified extension names.

Sorry for sounding like being on a soapbox, but let's just stick to the official names of actual ratified extensions (and profiles), and not cause extra confusion.  And where some extensions (or 'G' as a special case) represent a group of smaller extensions (not to be called sub-extensions - that is incorrect RISC-V terminology), let's try and be accurate.

Greg

 
as well as Sm1p11_Sm1p12_Ss1p11_Ss1p12 in any combination?
 i.e. does the macro expansion simply OR with the individual extension as far as tools are concerned?)

On Wed, Jul 20, 2022 at 10:55 AM Greg Favor <gfavor@...> wrote:

On Wed, Jul 20, 2022 at 10:49 AM Robert Chyla <Robert.Chyla@...> wrote:

Hyphens are not as big problem as 'subset of the contents' is ...

The 'subset of ...' should not be an issue.  The current Priv and Unpriv documents literally are just that.  They each contain a number of individual arch extensions.  From a discovery perspective the former doesn't matter; only the actual extensions matter - irrespective of whether they reside in a common document or in separate documents.  (For that matter, it's not like all ISA extensions currently reside inside the latest Priv and Unpriv documents.  Some ratified extensions still reside in separate documents.  This will all be reconciled as part of the conversion of all the Priv and Unpriv ISA extensions to adoc and into just two documents.)

Greg
 

/Robert

On 7/20/2022 10:32 AM, Greg Favor wrote:
On Wed, Jul 20, 2022 at 10:29 AM Robert Chyla <Robert.Chyla@...> wrote:

Only now (after your explanations ...) I can understand what Sm1-12 and Ss1-12 listed here:

    https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions

I believe the use of hyphens in the names was an early and incorrect (i.e. disallowed) usage.  The proper and official names are as I mentioned in my last email.  Please ask the tpm's to correct this wiki page.

Greg
 

as follows:

mean. Navigation of 'extension landscape' is hard (and I am not new to RISC-V ...).

>These are a subset of the contents of the Priv 1.11 and 1.12 documents.

IMO it may be really hard for anyone to 'extract' what 'subset of the contents' Sm1-12 is exactly. Especially that other extensions in same PDF ('Svnapot' for example ...) have dedicated chapters.

Maybe it is time to mandate that each ratified extension has separated PDF (or at least separated chapter). Otherwise it may be really, really hard (for implementer and verifier ...) to know what particular extension is exactly. IMO saying 'Sm1-12' is 'subset of the contents' is not precise enough ...

/Robert

On 7/20/2022 10:13 AM, Greg Favor wrote:
On Tue, Jul 19, 2022 at 7:32 AM Allen Baum <allen.baum@...> wrote:
Note that some of the version numbers (specifically priv spec 1.11 and 1.12) have names, and therefore can be represented by binary choices

I just want to note ( to make sure there isn't any confusion) that "Priv 1.11" and "Priv 1.12" are NOT extensions.  They effectively refer to documents that contain a collection of extensions (a superset of the following extensions):

The actual extensions that people are trying to refer to when they say "Priv 1.11" and "Priv 1.12", and their names are:  Sm1p11, Sm1p12, Ss1p11, and Ss1p12.  These are a subset of the contents of the Priv 1.11 and 1.12 documents.

For any ratified extension one shouldn't need to refer to a dated release of the document that contains the extension - since ratified extensions are frozen and any new "version" of an extension must be a separate new extension.  Going forward, version numbers on an extension should be meaningless.

But, to be more precise, the text of a ratified spec is allowed to change only to the extent of incorporating "typo" corrections and clarifications.  To that extent it is useful to look at the latest release of the document containing a ratified extension so as to see the latest typo fixes and clarifications.

Greg