forked from riscv-software-src/riscv-unified-db
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
999 additions
and
11 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amoadd.d: | ||
long_name: Atomic fetch-and-add doubleword | ||
description: | | ||
Atomically: | ||
* Load the doubleword at address _rs1_ | ||
* Write the loaded value into _rd_ | ||
* Add the value of register _rs2_ to the loaded value | ||
* Write the sum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
base: 64 | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 00000------------011-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<64>(virtual_address, X[rs2], AmoOperation::Add, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amoadd.w: | ||
long_name: Atomic fetch-and-add word | ||
description: | | ||
Atomically: | ||
* Load the word at address _rs1_ | ||
* Write the sign-extended value into _rd_ | ||
* Add the least-significant word of register _rs2_ to the loaded value | ||
* Write the sum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 00000------------010-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<32>(virtual_address, X[rs2][31:0], AmoOperation::Add, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amoand.d: | ||
long_name: Atomic fetch-and-and doubleword | ||
description: | | ||
Atomically: | ||
* Load the doubleword at address _rs1_ | ||
* Write the loaded value into _rd_ | ||
* AND the value of register _rs2_ to the loaded value | ||
* Write the result to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
base: 64 | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 01100------------011-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<64>(virtual_address, X[rs2], AmoOperation::And, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amoand.w: | ||
long_name: Atomic fetch-and-and word | ||
description: | | ||
Atomically: | ||
* Load the word at address _rs1_ | ||
* Write the sign-extended value into _rd_ | ||
* AND the least-significant word of register _rs2_ to the loaded value | ||
* Write the result to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 01100------------010-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<32>(virtual_address, X[rs2][31:0], AmoOperation::And, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amomax.d: | ||
long_name: Atomic MAX doubleword | ||
description: | | ||
Atomically: | ||
* Load the doubleword at address _rs1_ | ||
* Write the loaded value into _rd_ | ||
* Signed compare the value of register _rs2_ to the loaded value, and select the maximum value | ||
* Write the maximum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
base: 64 | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 10100------------011-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<64>(virtual_address, X[rs2], AmoOperation::Max, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amomax.w: | ||
long_name: Atomic MAX word | ||
description: | | ||
Atomically: | ||
* Load the word at address _rs1_ | ||
* Write the sign-extended value into _rd_ | ||
* Signed compare the least-significant word of register _rs2_ to the loaded value, and select the maximum value | ||
* Write the maximum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 10100------------010-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<32>(virtual_address, X[rs2][31:0], AmoOperation::Max, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amomaxu.d: | ||
long_name: Atomic MAX unsigned doubleword | ||
description: | | ||
Atomically: | ||
* Load the doubleword at address _rs1_ | ||
* Write the loaded value into _rd_ | ||
* Unsigned compare the value of register _rs2_ to the loaded value, and select the maximum value | ||
* Write the maximum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
base: 64 | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 11100------------011-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<64>(virtual_address, X[rs2], AmoOperation::Maxu, aq, rl); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# yaml-language-server: $schema=../../../schemas/inst_schema.json | ||
|
||
amomaxu.w: | ||
long_name: Atomic MAX unsigned word | ||
description: | | ||
Atomically: | ||
* Load the word at address _rs1_ | ||
* Write the sign-extended value into _rd_ | ||
* Unsigned compare the least-significant word of register _rs2_ to the loaded value, and select the maximum value | ||
* Write the maximum to the address in _rs1_ | ||
definedBy: [A, Zaamo] | ||
assembly: xd, xs2, (xrs1) | ||
encoding: | ||
match: 11100------------010-----0101111 | ||
variables: | ||
- name: aq | ||
location: 26 | ||
- name: rl | ||
location: 27 | ||
- name: rs2 | ||
location: 24-20 | ||
- name: rs1 | ||
location: 19-15 | ||
- name: rd | ||
location: 11-7 | ||
access: | ||
s: always | ||
u: always | ||
vs: always | ||
vu: always | ||
operation(): | | ||
if (implemented?(ExtensionName::A) && (CSR[misa].A == 1'b0)) { | ||
raise (ExceptionCode::IllegalInstruction, $encoding); | ||
} | ||
XReg virtual_address = X[rs1]; | ||
X[rd] = amo<32>(virtual_address, X[rs2][31:0], AmoOperation::Maxu, aq, rl); |
Oops, something went wrong.