forked from riscv/sail-riscv
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rebase #30
Closed
Closed
Rebase #30
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Paul A. Clarke <[email protected]>
Produces JSON representation of instructions, operands, opcode layouts, etc. Not claimed to be exhaustive. Depends on https://github.com/ThinkOpenly/riscvdecode. Signed-off-by: Paul A. Clarke <[email protected]>
Also add a few names, descriptions, and formats.
More support for #4. Using the `extension()` function in `mapping clause encdec` expressions for extensions allows a parser to clearly know when a function is part of an extension (or set of extensions).
…e.sail Added instruction names and descriptions * Adds names for instructions in `riscv_insts_base.sail` using the attributes approach * Descriptions are added to instructions in the same file using the doc comments approach
Currently, when executing `make json`, the command itself is echoed, causing issues with the JSON representation. This PR Suppress this echoing, ensuring a proper JSON output without the need for any manual editing later on.
Some instructions are grouped in a single `mapping clause assembly` where the respective mnemonics are embedded within a separate `mapping`. For instructions which are _not_ grouped, the name of the instruction can be added as an attribute to any of the instruction-specific constructs. For grouped instructions, the attribute needs to be added to a construct at the granularity of the specific instruction. Here, we attach the attribute within the individual element of the `mapping` that includes the actual instruction mnemonic. This approach is still insufficient for mnemonics that are constructed: ``` mapping clause assembly = VLSEGTYPE(nf, vm, rs1, width, vd) <-> "vl" ^ nfields_string(nf) ^ "e" ^ vlewidth_bitsnumberstr(width) ^ ".v" [...] ``` ...so more thought is needed here. Also, I'm settling on a convention of using lower case (not Leading Caps), at least for now. This matches how the instruction names are written in the ISA specification, at least for those instructions for which the name is actually provided. :-/
* Move definition of function of `extension` * Utilize extension() instead of `haveZmmul()` * Utilize extension() instead of `haveUsrMode()` * Utilize extension() instead of `haveSupMode()` * Utilize extension() instead of `haveNExt()` * Utilize extension() instead of `haveZkr()` * Utilize extension() instead of `haveUsrMode()` * Move comments from `have*` functions into `extension` function * Delete all unused `have*` definitions of various extensions Fixes #4 .
Authored-by: Joydeep Tripathy <[email protected]>
GitHub CI is complaining: ``` fix end of files.....................Failed - hook id: end-of-file-fixer - exit code: 1 - files were modified by this hook Fixing doc/JSON.md [...] All changes made by hooks: diff --git a/doc/JSON.md b/doc/JSON.md index 82170ef..fc7f9cc 100644 [...] -4. Within that clone : `make json` \ No newline at end of file +4. Within that clone : `make json` Error: Process completed with exit code 1. ```
rebased via the JSON branch, instead |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.