diff options
author | Bill Traynor <wmat@riscv.org> | 2023-03-06 09:41:09 -0500 |
---|---|---|
committer | Bill Traynor <wmat@riscv.org> | 2023-03-06 09:41:09 -0500 |
commit | 5c205656919d8518334987525f9c62f955dc4b33 (patch) | |
tree | bc638b3be1609ccf3e43505260be263db8fa8016 | |
parent | de50758c3c98ecb0f8c2ca812cb9fae3eeb472f1 (diff) | |
download | riscv-isa-manual-5c205656919d8518334987525f9c62f955dc4b33.zip riscv-isa-manual-5c205656919d8518334987525f9c62f955dc4b33.tar.gz riscv-isa-manual-5c205656919d8518334987525f9c62f955dc4b33.tar.bz2 |
Wrote mhartid diagram as bytefield-svg
Wrote mhartid diagram as bytefield-svg
-rw-r--r-- | src/images/bytefield/mhartid.adoc | 14 | ||||
-rw-r--r-- | src/machine.adoc | 8 |
2 files changed, 19 insertions, 3 deletions
diff --git a/src/images/bytefield/mhartid.adoc b/src/images/bytefield/mhartid.adoc new file mode 100644 index 0000000..4dc0858 --- /dev/null +++ b/src/images/bytefield/mhartid.adoc @@ -0,0 +1,14 @@ +[bytefield] +---- +(defattrs :plain [:plain {:font-family "M+ 1p Fallback"}]) +(def row-height 35 ) +(def row-header-fn nil) +(def left-margin 100) +(def right-margin 100) +(def boxes-per-row 32) +(draw-column-headers {:height 20 :font-size 18 :labels (reverse ["0" "" "" "" "" "" "" "" """" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "MXLEN-1"])}) + +(draw-box "Hart ID" {:span 32 :vertical-align "middle"}) + +(draw-box "MXLEN" {:span 32 :borders {}}) +----
\ No newline at end of file diff --git a/src/machine.adoc b/src/machine.adoc index f3efe7f..49c5d01 100644 --- a/src/machine.adoc +++ b/src/machine.adoc @@ -288,15 +288,17 @@ numbered contiguously in a multiprocessor system, but at least one hart must have a hart ID of zero. Hart IDs must be unique within the execution environment. -J + - + -MXLEN + +.Hart ID register (`mhartid`) +include::images/bytefield/mhartid.adoc[] +[NOTE] +==== In certain cases, we must ensure exactly one hart runs some code (e.g., at reset), and so require one hart to have a known hart ID of zero. For efficiency, system implementers should aim to reduce the magnitude of the largest hart ID used in a system. +==== ==== Machine Status Registers (`mstatus` and `mstatush`) |