-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
including applicable extensions in the opcode syntax #100
Comments
My immediate reaction is that I prefer a different approach that’s more similar to what we’re currently doing: use the file names to make this distinction, rather than adding metadata to the individual instructions. For instructions that belong to multiple extensions, we could use the existing @ aliasing scheme when they appear in multiple files, or invent some new prefix that means “I know this is defined elsewhere, but I’m including it here anyway, without explicitly rewriting its operands”. Regardless, I agree we should solve the problem you’re trying to solve, and your solution is a reasonable approach. I’d like others to weigh in. |
I spent a little more time on the file based distinction scheme and could come up with the following. Let me know your thoughts.
In the above scheme I am basically reserving The above scheme will still require siginificant re-arrangement of the current repo files For e.g. rv32i will move to |
maybe "canonically" ordered instead of "alphabetically" ordered makes more sense ? |
On Tue, Feb 8, 2022 at 11:28 PM Allen Baum ***@***.***> wrote:
That works for me, and it also matches the name; all Zbkb, Zbkc, and Zbkx
tests would br in B.
This is a bit awkward since they're already in K_unratified, so they would
need to be removed from there,
and some of those ops aren't actually part of the ratified bitmanip spec.
So what happens if they decide that those ops will never be ratified by
the bitmanip spec?
Nobody is working on it now.
Shouldn't all tests and related support for instructions that are not
ratified nor have any official effort in flight nor even have an associated
TG with a charter approved by the TSC, be removed (or moved out into some
other "archive in case they become relevant in some future year)? Ditto
for tests/etc. related with stuff that was work in progress by a TG but was
dropped from what the TG put forward for ratification?
Greg
Message ID: ***@***.***>
… |
sorry, this was added to this thread accidentally.
The issue is that ops in the ratified Zbkx extension are defined only in
the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
Likewise, half of ops in the ratified Zbkb extension are defined only in
the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
And, there is no bitmanip TG anymore that is tasked with adding them.
(which leads to scratching our heads wondering where we should put the
tests, which have been written....)
…On Wed, Feb 9, 2022 at 9:39 AM gfavor ***@***.***> wrote:
On Tue, Feb 8, 2022 at 11:28 PM Allen Baum ***@***.***> wrote:
> That works for me, and it also matches the name; all Zbkb, Zbkc, and Zbkx
> tests would br in B.
> This is a bit awkward since they're already in K_unratified, so they
would
> need to be removed from there,
> and some of those ops aren't actually part of the ratified bitmanip spec.
> So what happens if they decide that those ops will never be ratified by
> the bitmanip spec?
> Nobody is working on it now.
>
Shouldn't all tests and related support for instructions that are not
ratified nor have any official effort in flight nor even have an associated
TG with a charter approved by the TSC, be removed (or moved out into some
other "archive in case they become relevant in some future year)? Ditto
for tests/etc. related with stuff that was work in progress by a TG but was
dropped from what the TG put forward for ratification?
Greg
Message ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#100 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJTWPHALFLSPAZBCY2DU2KRFJANCNFSM5NCSBLAQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
On Wed, Feb 9, 2022 at 11:01 AM Allen Baum ***@***.***> wrote:
sorry, this was added to this thread accidentally.
The issue is that ops in the ratified Zbkx extension are defined only in
the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
Likewise, half of ops in the ratified Zbkb extension are defined only in
the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
And, there is no bitmanip TG anymore that is tasked with adding them.
(which leads to scratching our heads wondering where we should put the
tests, which have been written....)
One can view all this, as of the end of last year, that a number of
bitmanip extensions were ratified, some by the BitManip group and some by
the Crypto group. The details of which TG ratified which Zb* extensions,
and when, is ultimately just a historical matter and beside the point. And
the fact that, for now, these are documented in two separate documents and
separate from the Unpriv spec document, also seems beside the point.
(Ultimately these will all be combined into an updated Unpriv document.)
So it would seem that any "old" unratified bitmanip stuff should be
removed. And both sets of ratified extensions can all be grouped together,
if you like, in "B". If and when another new TG comes along as ratifies
another group of "bitmanip" instructions, then that would be added to the
"B" group of tests.
Greg
Message ID: ***@***.***>
… |
Yes, that is one approach, but it does mean ripping up moving a whole bunch
of files from K repo directories to B repo directories in arch test, and
probably elsewhere as well.
Not rocket science, but. a pain.
The other is just to leave them where they are, and count on riscof being
able to find them.
…On Wed, Feb 9, 2022 at 11:26 AM gfavor ***@***.***> wrote:
On Wed, Feb 9, 2022 at 11:01 AM Allen Baum ***@***.***> wrote:
> sorry, this was added to this thread accidentally.
> The issue is that ops in the ratified Zbkx extension are defined only in
> the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
> Likewise, half of ops in the ratified Zbkb extension are defined only in
> the *ratified* crypto scalar spec, but not defined in the bitmanip spec.
> And, there is no bitmanip TG anymore that is tasked with adding them.
> (which leads to scratching our heads wondering where we should put the
> tests, which have been written....)
>
One can view all this, as of the end of last year, that a number of
bitmanip extensions were ratified, some by the BitManip group and some by
the Crypto group. The details of which TG ratified which Zb* extensions,
and when, is ultimately just a historical matter and beside the point. And
the fact that, for now, these are documented in two separate documents and
separate from the Unpriv spec document, also seems beside the point.
(Ultimately these will all be combined into an updated Unpriv document.)
So it would seem that any "old" unratified bitmanip stuff should be
removed. And both sets of ratified extensions can all be grouped together,
if you like, in "B". If and when another new TG comes along as ratifies
another group of "bitmanip" instructions, then that would be added to the
"B" group of tests.
Greg
Message ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#100 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPXVJRDBTUUKHUCF25GJX3U2K5XXANCNFSM5NCSBLAQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
@aswaterman I have gone ahead with implementation of my proposal and have an initial draft of what the revised repo will look like : https://github.com/incoresemi/riscv-opcodes/tree/restructuring-opcodes. I am yet to fix the parse_opcodes.py file, but before I do that I wanted to get a feedback if the revised structure is acceptable. Important points to note:
Feedback is highly appreciated - post which I will start working on the python code. |
And to adress greg's points we can have Also for my current draft for the bitmanip I have gone ahead with extensions mentioned in 0.94 draft for the unratified instructions. |
Yeah, I think this is going in the right direction. And I appreciate that you sought feedback on the design before doing all of the software hacking. I'd like others who have skin in the riscv-opcodes game to chime in before @neelgala goes off and does a bunch more work. |
@aswaterman so I have got the scripting work done for most of it but I am having a hard-time with pseudo ops. Let's take the example of However, in my approach I have Is my approach okay or would you prefer treating |
Going over it again I think you can discard my previous comment - treating On the latex front, I see riscv-isa-manual uses the output from this repo for the instruction encoding tables. I wanted to know if the following was doable:
|
closed in #106 |
I have been using this repo as the official source of encodings for our internal design and verification tools. One issue that I have been facing is the lack of concrete information of "under which extension(s) is an instruction applicable". I am looking at decoding only instructions which are applicable for a user-defined ISA. So if the user specifies RV64IMC then only instructions under those 3 extensions must be decoded. Even though the filenaming convention right now is somewhat useful, it does not fully address all the issues. two of which I have described below:
c.flw
should be applicable only when F and C are both implemented. So placing it inside opcodes-rvc confuses the tools and having a separate file opcodes-rv32fc increases maintenance.pack
which are present under multiple extensions (zbp, zbf and zbe). Placing pack into individual opcodes file for each sub-extension might work but is not scalable. One has to remember to edit all those files for any change in the instructionso, having a file-naming convention alone might not work. The syntax of opcode entries will need to change slightly. The following is a very quick and dirty proposal (and will need refining) of what I think can work to address the above issues:
Add the list of comma-separated extensions under which the encoding is a legal instruction; wrapped within
| |
at the end of the line.Examples
Tools can then use substring matching to identify if that instruction is applicable for the user-defined ISA or not.
A better way of doing the above would be to use regex (less readable but extremely powerful) :
The regex will need to follow a few strict guidelines while writing but that should be manageable.
Pros of the proposal:
| |
.Before I go on to work on a PR for the above, I wanted to get a sense if such a change is welcomed/acceptable?
The text was updated successfully, but these errors were encountered: