-
Notifications
You must be signed in to change notification settings - Fork 78
feat: add GPR Information to UDB #1150
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
Open
AnimeshAgarwal28
wants to merge
9
commits into
riscv-software-src:main
Choose a base branch
from
AnimeshAgarwal28:feature/add-gpr-information
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f6afb91
feat: Add GPR Information to UDB
AnimeshAgarwal28 26924dd
fix: align GPR register files with review feedback
AnimeshAgarwal28 e9151cd
fix: add writable property to register entry and update file name pat…
AnimeshAgarwal28 0d8eee2
fix: update description of X.yaml
AnimeshAgarwal28 6d5b5bb
fix: correct trailing spaces in description of X.yaml
AnimeshAgarwal28 44cd2d1
fix: update register_file_name pattern to allow only uppercase letters
AnimeshAgarwal28 ccac6d6
feat: add floating-point register file
AnimeshAgarwal28 d945e82
feat: add vector register file
AnimeshAgarwal28 364c70b
fix: rename sw_read/write to arch_read/write
AnimeshAgarwal28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
|
|
||
| "title": "Register File Schema", | ||
| "description": "Schema for describing a register file", | ||
|
|
||
| "$defs": { | ||
| "register_entry": { | ||
| "type": "object", | ||
| "required": ["name"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "name": { | ||
| "$ref": "schema_defs.json#/$defs/register_name" | ||
| }, | ||
| "abi_mnemonics": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "schema_defs.json#/$defs/register_alias" | ||
| }, | ||
| "minItems": 1, | ||
| "uniqueItems": true, | ||
| "description": "ABI mnemonic names for the register" | ||
| }, | ||
| "description": { | ||
| "$ref": "schema_defs.json#/$defs/spec_text" | ||
| }, | ||
| "when": { | ||
| "$ref": "schema_defs.json#/$defs/requires_entry" | ||
| }, | ||
| "arch_read()": { | ||
| "type": "string", | ||
| "description": "Function describing the architecturally defined read behavior. Use this for architecturally mandated effects (e.g., x0 always reads as zero)." | ||
| }, | ||
| "arch_write(value)": { | ||
| "type": "string", | ||
| "description": "Function describing the architecturally defined write behavior. Given a 'value', return the architecturally required result (e.g., x0 ignores writes and always yields zero)." | ||
| }, | ||
| "caller_saved": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "Whether the register is caller-saved" | ||
| }, | ||
| "callee_saved": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "Whether the register is callee-saved" | ||
| }, | ||
| "roles": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "zero", | ||
| "return_address", | ||
| "stack_pointer", | ||
| "global_pointer", | ||
| "thread_pointer", | ||
| "frame_pointer", | ||
| "return_value", | ||
| "argument", | ||
| "temporary" | ||
| ] | ||
| }, | ||
| "uniqueItems": true | ||
ThinkOpenly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| }, | ||
| "register_file": { | ||
| "type": "object", | ||
| "required": [ | ||
| "$schema", | ||
| "kind", | ||
| "name", | ||
| "long_name", | ||
| "description", | ||
| "register_length", | ||
| "registers" | ||
| ], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "$schema": { | ||
| "format": "uri-reference", | ||
| "const": "register_file_schema.json#", | ||
| "description": "Path to schema, relative to <UDB ROOT>/schemas" | ||
| }, | ||
| "kind": { | ||
| "const": "register_file" | ||
| }, | ||
| "name": { | ||
| "$ref": "schema_defs.json#/$defs/register_file_name" | ||
| }, | ||
| "long_name": { | ||
| "type": "string" | ||
| }, | ||
| "description": { | ||
| "$ref": "schema_defs.json#/$defs/spec_text" | ||
| }, | ||
| "definedBy": { | ||
| "$ref": "schema_defs.json#/$defs/requires_entry" | ||
| }, | ||
| "register_class": { | ||
| "type": "string", | ||
| "enum": ["general_purpose", "floating_point", "vector"] | ||
| }, | ||
| "register_length": { | ||
| "$ref": "schema_defs.json#/$defs/bit_length_value" | ||
| }, | ||
| "registers": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "$ref": "#/$defs/register_entry" | ||
| } | ||
| }, | ||
| "$source": { | ||
| "type": "string", | ||
| "format": "uri-reference" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| # Copyright (c) Animesh Agarwal | ||
| # SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
|
||
| # yaml-language-server: $schema=../../../../schemas/register_file_schema.json | ||
|
|
||
| $schema: register_file_schema.json# | ||
| kind: register_file | ||
| name: F | ||
| long_name: Floating-Point Registers | ||
| description: | | ||
| The 'F' register file contains the 32 floating-point registers used by | ||
| RISC-V floating-point extensions. Each register stores FLEN bits of state and | ||
| participates in the standard calling convention defined by the RISC-V ABI spec. | ||
| definedBy: F | ||
| register_class: floating_point | ||
| register_length: FLEN | ||
| registers: | ||
| - name: f0 | ||
| abi_mnemonics: [ft0] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f1 | ||
| abi_mnemonics: [ft1] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f2 | ||
| abi_mnemonics: [ft2] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f3 | ||
| abi_mnemonics: [ft3] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f4 | ||
| abi_mnemonics: [ft4] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f5 | ||
| abi_mnemonics: [ft5] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f6 | ||
| abi_mnemonics: [ft6] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f7 | ||
| abi_mnemonics: [ft7] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f8 | ||
| abi_mnemonics: [fs0] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f9 | ||
| abi_mnemonics: [fs1] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f10 | ||
| abi_mnemonics: [fa0] | ||
| caller_saved: true | ||
| roles: [argument, return_value] | ||
| description: Floating-point argument / return value register 0. | ||
| - name: f11 | ||
| abi_mnemonics: [fa1] | ||
| caller_saved: true | ||
| roles: [argument, return_value] | ||
| description: Floating-point argument / return value register 1. | ||
| - name: f12 | ||
| abi_mnemonics: [fa2] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 2. | ||
| - name: f13 | ||
| abi_mnemonics: [fa3] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 3. | ||
| - name: f14 | ||
| abi_mnemonics: [fa4] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 4. | ||
| - name: f15 | ||
| abi_mnemonics: [fa5] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 5. | ||
| - name: f16 | ||
| abi_mnemonics: [fa6] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 6. | ||
| - name: f17 | ||
| abi_mnemonics: [fa7] | ||
| caller_saved: true | ||
| roles: [argument] | ||
| description: Floating-point argument register 7. | ||
| - name: f18 | ||
| abi_mnemonics: [fs2] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f19 | ||
| abi_mnemonics: [fs3] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f20 | ||
| abi_mnemonics: [fs4] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f21 | ||
| abi_mnemonics: [fs5] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f22 | ||
| abi_mnemonics: [fs6] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f23 | ||
| abi_mnemonics: [fs7] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f24 | ||
| abi_mnemonics: [fs8] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f25 | ||
| abi_mnemonics: [fs9] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f26 | ||
| abi_mnemonics: [fs10] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f27 | ||
| abi_mnemonics: [fs11] | ||
| callee_saved: true | ||
| description: Callee-saved floating-point register. | ||
| - name: f28 | ||
| abi_mnemonics: [ft8] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f29 | ||
| abi_mnemonics: [ft9] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f30 | ||
| abi_mnemonics: [ft10] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. | ||
| - name: f31 | ||
| abi_mnemonics: [ft11] | ||
| caller_saved: true | ||
| roles: [temporary] | ||
| description: Caller-saved temporary register. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.