Skip to content

Commit e5ce8f1

Browse files
authored
Merge branch 'main' into bitmanip
Signed-off-by: Bill Traynor <[email protected]>
2 parents 8fdbc3b + aa5dce0 commit e5ce8f1

File tree

147 files changed

+12930
-13981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+12930
-13981
lines changed

.github/workflows/isa-build.yml

+6-16
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
# Checkout the repository
3030
- name: Checkout repository
31-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3232

3333
# Set the short SHA for use in artifact names
3434
- name: Set short SHA
@@ -57,7 +57,7 @@ jobs:
5757
# Upload the priv-isa-asciidoc PDF file
5858
- name: Upload priv-isa-asciidoc.pdf
5959
if: steps.build_files.outcome == 'success'
60-
uses: actions/upload-artifact@v3
60+
uses: actions/upload-artifact@v4
6161
with:
6262
name: priv-isa-asciidoc-${{ env.SHORT_SHA }}.pdf
6363
path: ${{ github.workspace }}/build/priv-isa-asciidoc.pdf
@@ -66,7 +66,7 @@ jobs:
6666
# Upload the priv-isa-asciidoc HTML file
6767
- name: Upload priv-isa-asciidoc.html
6868
if: steps.build_files.outcome == 'success'
69-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
7070
with:
7171
name: priv-isa-asciidoc-${{ env.SHORT_SHA }}.html
7272
path: ${{ github.workspace }}/build/priv-isa-asciidoc.html
@@ -75,7 +75,7 @@ jobs:
7575
# Upload the unpriv-isa-asciidoc PDF file
7676
- name: Upload unpriv-isa-asciidoc.pdf
7777
if: steps.build_files.outcome == 'success'
78-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7979
with:
8080
name: unpriv-isa-asciidoc-${{ env.SHORT_SHA }}.pdf
8181
path: ${{ github.workspace }}/build/unpriv-isa-asciidoc.pdf
@@ -84,24 +84,15 @@ jobs:
8484
# Upload the unpriv-isa-asciidoc HTML file
8585
- name: Upload unpriv-isa-asciidoc.html
8686
if: steps.build_files.outcome == 'success'
87-
uses: actions/upload-artifact@v3
87+
uses: actions/upload-artifact@v4
8888
with:
8989
name: unpriv-isa-asciidoc-${{ env.SHORT_SHA }}.html
9090
path: ${{ github.workspace }}/build/unpriv-isa-asciidoc.html
9191
retention-days: 7
9292

93-
# Upload the priv-isa-latex PDF file
94-
- name: Upload riscv-privileged.pdf
95-
if: steps.build_files.outcome == 'success'
96-
uses: actions/upload-artifact@v3
97-
with:
98-
name: riscv-privileged-latex-${{ env.SHORT_SHA }}.pdf
99-
path: ${{ github.workspace }}/build/riscv-privileged.pdf
100-
retention-days: 7
101-
10293
- name: Create Release
10394
if: steps.build_files.outcome == 'success' && github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'true'
104-
uses: softprops/action-gh-release@v1
95+
uses: softprops/action-gh-release@v2
10596
with:
10697
draft: false
10798
tag_name: riscv-isa-release-${{ env.SHORT_SHA }}-${{ env.CURRENT_DATE }}
@@ -114,7 +105,6 @@ jobs:
114105
${{ github.workspace }}/build/priv-isa-asciidoc.html
115106
${{ github.workspace }}/build/unpriv-isa-asciidoc.pdf
116107
${{ github.workspace }}/build/unpriv-isa-asciidoc.html
117-
${{ github.workspace }}/build/riscv-privileged.pdf
118108
env:
119109
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
120110

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Release New ISA When Merging a PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed
9+
10+
jobs:
11+
if_merged:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- run: |
18+
echo The PR was successfully merged.
19+
20+
- name: Set short SHA
21+
run: echo "SHORT_SHA=$(echo ${GITHUB_SHA::7})" >> $GITHUB_ENV
22+
23+
- name: Get current date
24+
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
25+
26+
- name: Pull Container
27+
id: pull_container_image
28+
run: |
29+
docker pull riscvintl/riscv-docs-base-container-image:latest
30+
31+
- name: Build Files
32+
id: build_files
33+
if: steps.pull_container_image.outcome == 'success'
34+
run: |
35+
docker run --rm -v ${{ github.workspace }}:/build riscvintl/riscv-docs-base-container-image:latest \
36+
/bin/sh -c 'cd ./build && make'
37+
38+
# Upload the priv-isa-asciidoc PDF file
39+
- name: Upload priv-isa-asciidoc.pdf
40+
if: steps.build_files.outcome == 'success'
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: priv-isa-asciidoc-${{ env.SHORT_SHA }}.pdf
44+
path: ${{ github.workspace }}/build/priv-isa-asciidoc.pdf
45+
46+
# Upload the priv-isa-asciidoc HTML file
47+
- name: Upload priv-isa-asciidoc.html
48+
if: steps.build_files.outcome == 'success'
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: priv-isa-asciidoc-${{ env.SHORT_SHA }}.html
52+
path: ${{ github.workspace }}/build/priv-isa-asciidoc.html
53+
54+
# Upload the unpriv-isa-asciidoc PDF file
55+
- name: Upload unpriv-isa-asciidoc.pdf
56+
if: steps.build_files.outcome == 'success'
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: unpriv-isa-asciidoc-${{ env.SHORT_SHA }}.pdf
60+
path: ${{ github.workspace }}/build/unpriv-isa-asciidoc.pdf
61+
62+
# Upload the unpriv-isa-asciidoc HTML file
63+
- name: Upload unpriv-isa-asciidoc.html
64+
if: steps.build_files.outcome == 'success'
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: unpriv-isa-asciidoc-${{ env.SHORT_SHA }}.html
68+
path: ${{ github.workspace }}/build/unpriv-isa-asciidoc.html
69+
70+
- name: Create Release
71+
uses: softprops/action-gh-release@v2
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
74+
with:
75+
tag_name: riscv-isa-release-${{ env.SHORT_SHA }}-${{ env.CURRENT_DATE }}
76+
name: Release riscv-isa-release-${{ env.SHORT_SHA }}-${{ env.CURRENT_DATE }}
77+
draft: false
78+
prerelease: false
79+
make_latest: true
80+
generate_release_notes: true
81+
body: |
82+
This release was created by: ${{ github.event.sender.login }}
83+
Release of RISC-V ISA, built from commit ${{ env.SHORT_SHA }}, is now available.
84+
files: |
85+
${{ github.workspace }}/build/priv-isa-asciidoc.pdf
86+
${{ github.workspace }}/build/priv-isa-asciidoc.html
87+
${{ github.workspace }}/build/unpriv-isa-asciidoc.pdf
88+
${{ github.workspace }}/build/unpriv-isa-asciidoc.html

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.DS_Store
22
.*.swp
3+
.vscode
4+
src/.asciidoctor
5+
src/diag*

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![RISC-V ISA Build](https://github.com/riscv/riscv-isa-manual/actions/workflows/isa-build.yml/badge.svg)](https://github.com/riscv/riscv-isa-manual/actions/workflows/isa-build.yml)
44

5-
This repository contains the source files for the RISC-V Instruction Set Manual, which is comprised of the Privileged RISC-V Instruction Set Manual (LaTeX) and the Unprivileged RISC-V Instruction Set Manual (AsciiDoc). The preface of each document indicates the version of each standard that has been formally ratified by RISC-V International.
5+
This repository contains the source files for the RISC-V Instruction Set Manual, which consists of the Privileged RISC-V Instruction Set Manual (LaTeX) and the Unprivileged RISC-V Instruction Set Manual (AsciiDoc). The preface of each document indicates the version of each standard that has been formally ratified by RISC-V International.
66

77
This work is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). See the [LICENSE](LICENSE) file for details.
88

@@ -26,3 +26,7 @@ If you would like to contribute to this documentation, please refer to the [Docu
2626
The recommended method for building the PDF files is to use the Docker Image, as described in the [RISC-V Docs Base Container Image repository](https://github.com/riscv/riscv-docs-base-container-image).
2727

2828
Alternative build methods, such as local builds and GitHub Action builds, are also available and described in the Documentation Developer's Guide.
29+
30+
## Repo Activity
31+
32+
![Alt](https://repobeats.axiom.co/api/embed/ccec87dc4502f2ed7c216b670b5ed8efc33a1d4c.svg "Repobeats analytics image")

build/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
*.aux
22
*.bbl
33
*.blg
4+
*.html
45
*.log
56
*.out
67
*.pdf
8+
*.pdf.tmp
79
*.toc
810
images
911
.asciidoctor

build/Makefile

+9-28
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@
1414
# for generating documentation in various formats (PDF, HTML).
1515

1616
# Build Targets
17-
TARGETS := priv unpriv priv-html unpriv-html priv-latex
17+
TARGETS := priv unpriv priv-html unpriv-html
1818

1919
# Declare phony targets
2020
.PHONY: all $(TARGETS) clean
2121

2222
# Default target builds all
2323
all: $(TARGETS)
2424

25+
# Build with preinstalled docker container; first install it with:
26+
# docker pull riscvintl/riscv-docs-base-container-image:latest
27+
docker:
28+
cd .. && docker run -it -v .:/build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c 'cd ./build; make $(MAKEFLAGS)'
29+
2530
# Asciidoctor options
26-
ASCIIDOCTOR_OPTS := --attribute=mathematical-format=svg \
31+
ASCIIDOCTOR_OPTS := -a compress \
32+
--attribute=mathematical-format=svg \
2733
--failure-level=ERROR \
2834
--require=asciidoctor-bibtex \
2935
--require=asciidoctor-diagram \
@@ -33,15 +39,6 @@ ASCIIDOCTOR_OPTS := --attribute=mathematical-format=svg \
3339
# Source directory
3440
SRCDIR := ../src
3541

36-
# LaTeX source and related files
37-
#SRCS := $(wildcard $(SRCDIR)/latex/*.tex)
38-
#FIGS := $(wildcard $(SRCDIR)/latex/figs/*)
39-
#BIBS := $(SRCDIR)/latex/riscv-spec.bib
40-
41-
# LaTeX build tools
42-
#PDFLATEX := TEXINPUTS=$(SRCDIR)/latex: pdflatex -interaction=nonstopmode -halt-on-error
43-
#BIBTEX := BIBINPUTS=$(SRCDIR)/latex: bibtex
44-
4542
# Temporary files to clean up for LaTeX build
4643
JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz
4744

@@ -77,15 +74,6 @@ unpriv-isa-asciidoc.html: $(SRCDIR)/riscv-unprivileged.adoc
7774
@echo "Building Unprivileged ISA HTML"
7875
asciidoctor $(ASCIIDOCTOR_OPTS) --out-file=$@ $<
7976

80-
# LaTeX build for Privileged ISA
81-
#priv-latex: riscv-privileged.pdf
82-
83-
#riscv-privileged.pdf: $(SRCDIR)/latex/riscv-privileged.tex $(SRCS) $(FIGS) $(BIBS)
84-
# $(PDFLATEX) riscv-privileged
85-
# $(BIBTEX) riscv-privileged
86-
# $(PDFLATEX) riscv-privileged
87-
# $(PDFLATEX) riscv-privileged
88-
8977
clean:
9078
@if [ -f priv-isa-asciidoc.pdf ]; then \
9179
echo "Removing priv-isa-asciidoc.pdf"; \
@@ -103,11 +91,4 @@ clean:
10391
echo "Removing unpriv-isa-asciidoc.html"; \
10492
rm -f unpriv-isa-asciidoc.html; \
10593
fi
106-
# @echo "Cleaning up files from LaTeX build"
107-
# @cd $(SRCDIR)/latex; \
108-
# for file in $(JUNK); do \
109-
# if [ -f "$$file" ]; then \
110-
# echo "Removing $$file"; \
111-
# rm -f "$$file"; \
112-
# fi; \
113-
# done
94+

dependencies/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ source 'https://rubygems.org'
22
gem 'asciidoctor'
33
gem 'asciidoctor-bibtex'
44
gem 'asciidoctor-diagram'
5+
gem 'mathematical'
56
gem 'asciidoctor-mathematical'
67
gem 'asciidoctor-pdf'
78
gem 'citeproc-ruby'

marchid.md

+10
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,13 @@ AIRISC | Fraunhofer IMS | [AIRISC Support](mailto:airisc
5252
Proteus | imec-DistriNet, KU Leuven | [Marton Bognar](mailto:[email protected]) | 32 | https://github.com/proteus-core/proteus
5353
VexRiscv | SpinalHDL | [Charles Papon](mailto:[email protected]) | 33 | https://github.com/SpinalHDL/VexRiscv
5454
Shuttle | UC Berkeley | [Jerry Zhao](mailto:[email protected]) | 34 | https://github.com/ucb-bar/shuttle
55+
CV32E2 | OpenHW Group | [Davide Schiavone](mailto:[email protected]), OpenHW Group | 35 | https://github.com/openhwgroup/cve2
56+
CVW | OpenHW Group | [James Stine](mailto:[email protected]), OpenHW Group | 36 | https://github.com/openhwgroup/cvw
57+
Boa32 | Julian Scheffers | [Julian Scheffers](mailto:[email protected]) | 37 | https://github.com/robotman2412/boa-risc-v
58+
WIV64 | Jesús Sanz del Rey | [Jesús Sanz del Rey](mailto:[email protected]) | 38 | https://github.com/StartForKiller/WivCPU
59+
RV6 | Nikola Lukić | [Nikola Lukić](mailto:[email protected]) | 39 | https://github.com/kiclu/rv6
60+
ApogeoRV | Gabriele Tripi | [Gabriele Tripi](mailto:[email protected]) | 40 | https://github.com/GabbedT/ApogeoRV
61+
MicroRV32 | AGRA, Group of Computer Architecture, University of Bremen | [RISC-V @ AGRA](mailto:[email protected]) | 41 | https://github.com/agra-uni-bremen/microrv32
62+
QEMU | qemu.org | [QEMU Mailing List](mailto:[email protected]) | 42 | https://qemu.org
63+
KianV | Hirosh Dabui | [Hirosh Dabui](mailto:[email protected]) | 43 | https://github.com/splinedrive/kianRiscV
64+
Coreblocks | Kuźnia Rdzeni, University of Wrocław | [Coreblocks Team](mailto:[email protected]) | 44 | https://github.com/kuznia-rdzeni/coreblocks

src/a-st-ext.adoc

+18-5
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ if the reservation is still valid and the reservation set contains the
6262
bytes being written. If the SC.W succeeds, the instruction writes the
6363
word in _rs2_ to memory, and it writes zero to _rd_. If the SC.W fails,
6464
the instruction does not write to memory, and it writes a nonzero value
65-
to _rd_. Regardless of success or failure, executing an SC.W instruction
66-
invalidates any reservation held by this hart. LR.D and SC.D act
67-
analogously on doublewords and are only available on RV64. For RV64,
68-
LR.W and SC.W sign-extend the value placed in _rd_.
65+
to _rd_. For the purposes of memory protection, a failed SC.W may be
66+
treated like a store. Regardless of success or failure, executing an
67+
SC.W instruction invalidates any reservation held by this hart. LR.D and
68+
SC.D act analogously on doublewords and are only available on RV64. For
69+
RV64, LR.W and SC.W sign-extend the value placed in _rd_.
6970

7071
[NOTE]
7172
====
@@ -369,7 +370,19 @@ is not naturally aligned, an address-misaligned exception or an
369370
access-fault exception will be generated. The access-fault exception can
370371
be generated for a memory access that would otherwise be able to
371372
complete except for the misalignment, if the misaligned access should
372-
not be emulated. The "Zam" extension, described in <<zam>>, relaxes this requirement and specifies the semantics of misaligned AMOs.
373+
not be emulated.
374+
375+
The misaligned atomicity granule PMA, defined in Volume II of this manual,
376+
optionally relaxes this alignment requirement.
377+
If present, the misaligned atomicity granule PMA specifies the size
378+
of a misaligned atomicity granule, a power-of-two number of bytes.
379+
The misaligned atomicity granule PMA applies only to AMOs, loads and stores
380+
defined in the base ISAs, and loads and stores of no more than XLEN bits
381+
defined in the F, D, and Q extensions.
382+
For an instruction in that set, if all accessed bytes lie within the same
383+
misaligned atomicity granule, the instruction will not raise an exception for
384+
reasons of address alignment, and the instruction will give rise to only one
385+
memory operation for the purposes of RVWMO--i.e., it will execute atomically.
373386

374387
The operations supported are swap, integer add, bitwise AND, bitwise OR,
375388
bitwise XOR, and signed and unsigned integer maximum and minimum.

0 commit comments

Comments
 (0)