Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
38e64d7
add dcsr and dpc csrs
neverlandiz Apr 14, 2025
abef190
Merge branch 'main' into add-dcsr-and-dpc-csrs
neverlandiz May 12, 2025
05af687
docs(debug csrs): change dcsr and dpc to D mode
neverlandiz May 12, 2025
a5c6bab
docs(debug csrs): add definedBy to fields
neverlandiz May 13, 2025
c47a850
docs(debug csrs): add DXLEN length type
neverlandiz May 13, 2025
36de286
docs(debug csrs): fix privilege mode
neverlandiz May 13, 2025
fd39d4e
docs(debug csrs): add params and sw_write for checking MPRVEN impleme…
neverlandiz May 15, 2025
cc34768
docs(debug csrs): fix description
neverlandiz May 15, 2025
ba6b5d4
docs(debug csrs): fix MPRVEN param
neverlandiz May 23, 2025
ee80efe
docs(debug csrs): add type() and reset_value()
neverlandiz May 23, 2025
beaeb61
docs(debug csr): add DXLEN to csr.rb
neverlandiz May 28, 2025
d885542
docs(debug csrs): removed DXLEN
neverlandiz May 28, 2025
0ee560a
docs(Sdext): fix CI failures
neverlandiz Jun 3, 2025
8a9525d
docs(dcsr): fix syntax error
neverlandiz Jun 3, 2025
51aafde
docs(dcsr): fix syntax error
neverlandiz Jun 3, 2025
b4b3927
docs(debug mode): add D-mode to modes_with_access
neverlandiz Jun 3, 2025
3ec854b
docs(debug mode): add D mode to multi_xlen_in_mode
neverlandiz Jun 3, 2025
871382b
docs(dcsr): add STEPIE, STOPCOUNT, and STOPTIME params
neverlandiz Jun 13, 2025
fab9c49
docs(dcsr): add return statements
neverlandiz Jun 18, 2025
1d4351b
docs(dcsr): add asserts
neverlandiz Jun 19, 2025
d360f7b
docs(Sdext): change tied-to to read-only
neverlandiz Jun 19, 2025
e6b9c80
fix(debug csrs): file rebase
neverlandiz Jun 20, 2025
9aba8e6
Merge branch 'main' into add-dcsr-and-dpc-csrs
neverlandiz Jun 20, 2025
39978d9
Update cfg_arch.rb
neverlandiz Jun 20, 2025
82fadef
docs(debug csrs): add copyright and license information
neverlandiz Jun 20, 2025
0edfaf8
fix(debug csrs): edit copyright information
neverlandiz Jun 20, 2025
2ed52f5
Merge branch 'main' into add-dcsr-and-dpc-csrs
dhower-qc Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions arch/csr/dcsr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,34 +127,70 @@ fields:
reset_value: 0
STEPIE:
location: 11
type: RW
description: |
0 (interrupts disabled):: Interrupts (including NMI) are disabled during single stepping with step set.
This value should be supported.
1 (interrupts enabled):: Interrupts (including NMI) are enabled during single stepping with step set.
Implementations may hard wire this bit to 0. In that case interrupt behavior can be emulated by the
debugger. The debugger must not change the value of this bit while the hart is running.
reset_value: 0
type(): |
if (DCSR_STEPIE_TYPE == "tied-to-0" || DCSR_STEPIE_TYPE == "tied-to-1") {
return CsrFieldType::RO;
} else if (DCSR_STEPIE_TYPE == "rw") {
return CsrFieldType::RW;
}
reset_value(): |
if (DCSR_STEPIE_TYPE == "tied-to-0") {
return 0;
} else if (DCSR_STEPIE_TYPE == "tied-to-1") {
return 1;
} else if (DCSR_STEPIE_TYPE == "rw") {
return UNDEFINED_LEGAL;
}
STOPCOUNT:
location: 10
type: RW
description: |
0 (normal):: Increment counters as usual.
1 (freeze):: Don’t increment any hart-local counters while in Debug Mode or on ebreak instructions
that cause entry into Debug Mode. These counters include the instret CSR. On single-hart cores cycle
should be stopped, but on multi-hart cores it must keep incrementing.
An implementation may hardwire this bit to 0 or 1.
reset_value: UNDEFINED_LEGAL
type(): |
if (DCSR_STOPCOUNT_TYPE == "tied-to-0" || DCSR_STOPCOUNT_TYPE == "tied-to-1") {
return CsrFieldType::RO;
} else if (DCSR_STOPCOUNT_TYPE == "rw") {
return CsrFieldType::RW;
}
reset_value(): |
if (DCSR_STOPCOUNT_TYPE == "tied-to-0") {
return 0;
} else if (DCSR_STOPCOUNT_TYPE == "tied-to-1") {
return 1;
} else if (DCSR_STOPCOUNT_TYPE == "rw") {
return UNDEFINED_LEGAL;
}
STOPTIME:
location: 9
type: RW
description: |
0 (normal):: time continues to reflect mtime.
1 (freeze):: time is frozen at the time that Debug Mode was entered. When leaving Debug Mode,
time will reflect the latest value of mtime again.
While all harts have stoptime=1 and are in Debug Mode, mtime is allowed to stop incrementing.
An implementation may hardwire this bit to 0 or 1.
reset_value: UNDEFINED_LEGAL
type(): |
if (DCSR_STOPTIME_TYPE == "tied-to-0" || DCSR_STOPTIME_TYPE == "tied-to-1") {
return CsrFieldType::RO;
} else if (DCSR_STOPTIME_TYPE == "rw") {
return CsrFieldType::RW;
}
reset_value(): |
if (DCSR_STOPTIME_TYPE == "tied-to-0") {
return 0;
} else if (DCSR_STOPTIME_TYPE == "tied-to-1") {
return 1;
} else if (DCSR_STOPTIME_TYPE == "rw") {
return UNDEFINED_LEGAL;
}
CAUSE:
location: 8-6
type: RO
Expand Down
38 changes: 37 additions & 1 deletion arch/ext/Sdext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type: privileged
versions:
- version: "1.0.0"
state: ratified
ratification_date: null
ratification_date: 2025-02
params:
DCSR_MPRVEN_TYPE:
schema:
Expand All @@ -24,3 +24,39 @@ params:
* 'tied-to-0': tied to 0
* 'tied-to-1': tied to 1
* 'rw': read-write
DCSR_STEPIE_TYPE:
schema:
type: string
enum: [tied-to-0, tied-to-1, rw]
description: |
Implementation of dcsr.STEPIE is optional.
It may be tied to either 0 or 1.

Behavior of the dcsr.STEPIE bit:
* 'tied-to-0': tied to 0
* 'tied-to-1': tied to 1
* 'rw': read-write
DCSR_STOPCOUNT_TYPE:
schema:
type: string
enum: [tied-to-0, tied-to-1, rw]
description: |
Implementation of dcsr.STOPCOUNT is optional.
It may be tied to either 0 or 1.

Behavior of the dcsr.STOPCOUNT bit:
* 'tied-to-0': tied to 0
* 'tied-to-1': tied to 1
* 'rw': read-write
DCSR_STOPTIME_TYPE:
schema:
type: string
enum: [tied-to-0, tied-to-1, rw]
description: |
Implementation of dcsr.STOPTIME is optional.
It may be tied to either 0 or 1.

Behavior of the dcsr.STOPTIME bit:
* 'tied-to-0': tied to 0
* 'tied-to-1': tied to 1
* 'rw': read-write
Loading