Skip to content

Commit

Permalink
Merge branch 'master' into fix-2625-bis
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanRochCoulon authored Jan 22, 2025
2 parents cc5cfd4 + 14998fc commit 4c7f09c
Show file tree
Hide file tree
Showing 20 changed files with 213 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci/expected_synth.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cv32a65x:
gates: 184679
gates: 185674
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version: 2
submodules:
include:
- docs/riscv-isa/riscv-isa-manual
recursive: true

build:
os: "ubuntu-20.04"
Expand All @@ -26,7 +27,7 @@ build:
- npm install docs/riscv-isa/riscv-isa-manual/dependencies
- gem install -g docs/riscv-isa/riscv-isa-manual/dependencies/Gemfile
pre_build:
- make -C docs prepare
- PATH=$PWD/node_modules/.bin:$PATH make -C docs prepare

# Build from the docs directory with Sphinx
sphinx:
Expand Down
2 changes: 1 addition & 1 deletion core/csr_regfile.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2424,7 +2424,7 @@ module csr_regfile

unique case (conv_csr_addr.address)
riscv::CSR_MIP:
csr_rdata_o = csr_rdata | ({{CVA6Cfg.XLEN - 1{1'b0}}, irq_i[1]} << riscv::IRQ_S_EXT);
csr_rdata_o = csr_rdata | ({{CVA6Cfg.XLEN - 1{1'b0}}, CVA6Cfg.RVS && irq_i[1]} << riscv::IRQ_S_EXT);
// in supervisor mode we also need to check whether we delegated this bit
riscv::CSR_SIP: begin
if (CVA6Cfg.RVS) begin
Expand Down
1 change: 1 addition & 0 deletions core/cva6.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,7 @@ module cva6
.wdata_i (wdata_commit_id),

.csr_i(rvfi_csr),
.irq_i(irq_i),

.rvfi_probes_o(rvfi_probes_o)

Expand Down
2 changes: 2 additions & 0 deletions core/cva6_rvfi_probes.sv
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module cva6_rvfi_probes
input logic [CVA6Cfg.NrCommitPorts-1:0][CVA6Cfg.XLEN-1:0] wdata_i,

input rvfi_probes_csr_t csr_i,
input logic [1:0] irq_i,

output rvfi_probes_t rvfi_probes_o
);
Expand Down Expand Up @@ -109,6 +110,7 @@ module cva6_rvfi_probes
instr.wdata = wdata_i;

csr = csr_i;
csr.mip_q = csr_i.mip_q | ({{CVA6Cfg.XLEN - 1{1'b0}}, CVA6Cfg.RVS && irq_i[1]} << riscv::IRQ_S_EXT);

end

Expand Down
40 changes: 27 additions & 13 deletions docs/design/design-manual/source/CVX_Interface_Coprocessor.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,57 +61,71 @@ Supported Parameters

The following table presents CVXIF parameters supported by CVA6.

[cols=",,",options="header",]
[cols=",a,a",options="header",]
|=============================================
|Signal |Value |Description
|*X_NUM_RS* |int: 2 or 3 (configurable) a|
|*X_NUM_RS* |
int: 2 or 3 (configurable) +

* CV32A60X: 2
* CV32A65X: 2
|
[verse]
--
Number of register file read ports that can
be used by the eXtension interface
--
|
|*X_ID_WIDTH* |int: 3 a|
|*X_ID_WIDTH* |
int: 1 to 32 +

* CV32A60X: 2
* CV32A65X: 3
|
[verse]
--
Identification width for the eXtension
interface
--
|
|*X_MEM_WIDTH* |n/a (feature not supported) a|
|*X_MEM_WIDTH* |n/a (feature not supported) |
[verse]
--
Memory access width for loads/stores via the
eXtension interface
--

|
|*X_RFR_WIDTH* |int: `XLEN` (32 or 64) a|
|*X_RFR_WIDTH* |
int: `XLEN` (32 or 64) +

* CV32A60X: 32
* CV32A65X: 32
|
[verse]
--
Register file read access width for the
eXtension interface
--
|
|*X_RFW_WIDTH* |int: `XLEN` (32 or 64) a|
|*X_RFW_WIDTH* |
int: `XLEN` (32 or 64) +

* CV32A60X: 32
* CV32A65X: 32
|
[verse]
--
Register file write access width for the
eXtension interface
--
|
|*X_MISA* |logic[31:0]: 0x0000_0000 a|
|*X_MISA* |logic[31:0]: 0x0000_0000 |
[verse]
--
MISA extensions implemented on the eXtension
interface
--

|
|=============================================

[[cv-x-if-enabling]]
Expand Down
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ sphinx-rtd-theme
recommonmark
sphinxcontrib-svg2pdfconverter
sphinx_github_changelog

# for gen_from_riscv_config
mako
mdutils
pyyaml
rstcloth
2 changes: 1 addition & 1 deletion docs/riscv-isa/src/colophon.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This document describes the RISC-V unprivileged architecture tailored for
OpenHW Group {ohg-config}.

[.big]*_Preface to Document Version 20241017_*
[.big]*_Preface to Document Version 20241101_*

This document describes the RISC-V unprivileged architecture.

Expand Down
17 changes: 13 additions & 4 deletions docs/riscv-isa/src/machine.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,17 @@ supervisor modes respectively.

The "X" bit will be set if there are any non-standard extensions.

When "B" bit is 1, the implementation supports the instructions provided by the
Zba, Zbb, and Zbs extensions. When "B" bit is 0, it indicates that the
When the "B" bit is 1, the implementation supports the instructions provided by the
Zba, Zbb, and Zbs extensions. When the "B" bit is 0, it indicates that the
implementation may not support one or more of the Zba, Zbb, or Zbs extensions.

When the "M" bit is 1, the implementation supports all multiply and
division instructions defined by the M extension. When the "M" bit
is 0, it indicates that the implementation may not support those
instructions. However if the Zmmul extension is supported then
the multiply instructions it specifies are supported irrespective
of the value of the "M" bit.

ifeval::[{note} == true]
[NOTE]
====
Expand Down Expand Up @@ -1554,7 +1561,7 @@ additional microarchitectural bits might be maintained in the extension
to further reduce context save and restore overhead.

The SD bit is read-only and is set when either the FS, VS, or XS bits
encode a Dirty state (i.e., SD=((FS==11) OR (XS==11) OR (VS==11))). This
encode a Dirty state (i.e., `SD=(FS==0b11 OR XS==0b11 OR VS==0b11)`). This
allows privileged code to quickly determine when no additional context
save is required beyond the integer register set and `pc`.

Expand Down Expand Up @@ -3865,7 +3872,9 @@ and I/O regions may be accessed with either _relaxed_ or _strong_
ordering. Accesses to an I/O region with relaxed ordering are generally
observed by other harts and bus mastering devices in a manner similar to
the ordering of accesses to an RVWMO memory region, as discussed in
Section A.4.2 in Volume I of this specification. By contrast, accesses
the I/O Ordering section in the RVWMO Explanatory Material appendix
of Volume I of this specification.
By contrast, accesses
to an I/O region with strong ordering are generally observed by other
harts and bus mastering devices in program order.

Expand Down
7 changes: 7 additions & 0 deletions docs/riscv-isa/src/mm-formal.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[appendix]
== Formal Memory Model Specifications, Version 0.1
[[mm-formal]]

ifeval::["{ohg-config}" == "CV32A65X"]
{ohg-config}: No RVWMO memory model.
endif::[]
92 changes: 92 additions & 0 deletions docs/riscv-isa/src/priv-preface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,98 @@
This document describes the RISC-V privileged architecture tailored for
OpenHW Group {ohg-config}.

[.big]*_Preface to Version 20241101_*

This document describes the RISC-V privileged architecture. This
release, version 20241101, contains the following versions of the RISC-V ISA
modules:

[%autowidth,float="center",align="center",cols="^,<,^",options="header",]
|===
|Module |Version |Status
|_Machine ISA_ +
*Smstateen Extension* +
*Smcsrind/Sscsrind Extension* +
*Smepmp Extension* +
*Smcntrpmf Extension* +
*Smrnmi Extension* +
*Smcdeleg Extension* +
*Smdbltrp Extension* +
_Supervisor ISA_ +
*Svade Extension* +
*Svnapot Extension* +
*Svpbmt Extension* +
*Svinval Extension* +
*Svadu Extension* +
*Sstc Extension* +
*Sscofpmf Extension* +
*Ssdbltrp Extension* +
*Ssqosid Extension* +
*Hypervisor ISA* +
*Shlcofideleg Extension* +
*Svvptc Extension*

|_1.14_ +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
_1.14_ +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0* +
*1.0*

|_Draft_ +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
_Draft_ +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified* +
*Ratified*
|===

The following changes have been made since version 1.13 of the Machine and
Supervisor ISAs, which, while not strictly backwards compatible, are not
anticipated to cause software portability problems in practice:

* (None yet)

Additionally, the following compatible changes have been
made to the Machine and Supervisor ISAs since version 1.13:

* Defined the `mstateen0` P1P14 field.

Finally, the following clarifications and document improvements have been made
since the last document release:

* (None yet)

[.big]*_Preface to Version 20241017_*

This document describes the RISC-V privileged architecture. This
Expand Down
7 changes: 4 additions & 3 deletions docs/riscv-isa/src/riscv-privileged.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include::config.adoc[]
= The RISC-V Instruction Set Manual for {ohg-config}: Volume II: Privileged Architecture
include::../docs-resources/global-config.adoc[]
:description: Volume II - Privileged Architecture
:revnumber: 20241017
:revremark: This document is in Ratified state.
:revnumber: 20241101
//:revremark: This document is in Ratified state.
//development: assume everything can change
//stable: assume everything could change
//frozen: of you implement this version you assume the risk that something might change because of the public review cycle but we expect little to no change.
Expand All @@ -22,7 +22,7 @@ include::../docs-resources/global-config.adoc[]
// Settings:
:experimental:
:reproducible:
:imagesoutdir: images
:imagesoutdir: {docdir}/../build/images-out
:bibtex-file: src/resources/riscv-spec.bib
:bibtex-order: alphabetical
:bibtex-style: apa
Expand Down Expand Up @@ -100,6 +100,7 @@ include::smcntrpmf.adoc[]
include::rnmi.adoc[]
include::smcdeleg.adoc[]
include::smdbltrp.adoc[]
include::smctr.adoc[]
include::supervisor.adoc[]
include::sstc.adoc[]
include::sscofpmf.adoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/riscv-isa/src/riscv-unprivileged.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include::config.adoc[]
= The RISC-V Instruction Set Manual for {ohg-config}: Volume I - Unprivileged Architecture
include::../docs-resources/global-config.adoc[]
:description: Unprivileged Architecture
:revnumber: 20241017
:revnumber: 20241101
//:revremark: Pre-release version
:colophon:
:preface-title: Preamble
Expand All @@ -19,7 +19,7 @@ include::../docs-resources/global-config.adoc[]
// Settings:
:experimental:
:reproducible:
:imagesoutdir: images
:imagesoutdir: {docdir}/../build/images-out
:bibtex-file: src/resources/riscv-spec.bib
:bibtex-order: alphabetical
:bibtex-style: apa
Expand Down
10 changes: 7 additions & 3 deletions docs/riscv-isa/src/rv64.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ no standard HINTs will ever be defined in this subspace.
(_rs2_=_x4_) NTL.S1 +
(_rs2_=_x5_) NTL.ALL

|SLLI |_rd_=`x0`, _rs1_=`x0`, _shamt_=31 |1|Semihosting entry marker

|SRAI |_rd_=`x0`, _rs1_=`x0`, _shamt_=7 |1|Semihosting exit marker

|SUB |_rd_=_x0_ |latexmath:[$2^{10}$] .16+.^| _Designated for future standard use_

|AND |_rd_=_x0_ |latexmath:[$2^{10}$]
Expand Down Expand Up @@ -243,11 +247,11 @@ no standard HINTs will ever be defined in this subspace.

|SLTIU |_rd_=_x0_ |latexmath:[$2^{17}$]

|SLLI |_rd_=_x0_ |latexmath:[$2^{11}$]
|SLLI |_rd_=`x0`, and either _rs1_&#8800;``x0`` or _shamt_&#8800;31 |latexmath:[$2^{11}-1$]

|SRLI |_rd_=_x0_ |latexmath:[$2^{11}$]
|SRLI |_rd_=`x0` |latexmath:[$2^{11}$]

|SRAI |_rd_=_x0_ |latexmath:[$2^{11}$]
|SRAI |_rd_=`x0`, and either _rs1_&#8800;``x0`` or _shamt_&#8800;7 |latexmath:[$2^{11}-1$]

|SLLIW |_rd_=_x0_ |latexmath:[$2^{10}$]

Expand Down
2 changes: 1 addition & 1 deletion docs/riscv-isa/src/scalar-crypto.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[scalar-crypto]]
[[crypto_scalar_instructions]]
== Cryptography Extensions: Scalar & Entropy Source Instructions, Version 1.0.1

ifeval::[{RVZk} == false]
Expand Down
7 changes: 7 additions & 0 deletions docs/riscv-isa/src/smctr.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[smctr]]

== "Smctr" Control Transfer Records Extension, Version 1.0

ifeval::[{RVZsmctr} == false]
{ohg-config}: This extension is not supported.
endif::[]
Loading

0 comments on commit 4c7f09c

Please sign in to comment.