generated from riscv/docs-spec-template
-
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
11 changed files
with
360 additions
and
274 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,60 @@ | ||
DOCKER_RUN := docker run --rm -v ${PWD}:/build -w /build \ | ||
riscvintl/riscv-docs-base-container-image:latest | ||
|
||
HEADER_SOURCE := header.adoc | ||
PDF_RESULT := riscv_iopmp_specification.pdf | ||
|
||
ASCIIDOCTOR_PDF := asciidoctor-pdf | ||
OPTIONS := --trace \ | ||
-a compress \ | ||
-a mathematical-format=svg \ | ||
-a pdf-fontsdir=docs-resources/fonts \ | ||
-a pdf-theme=docs-resources/themes/riscv-pdf.yml \ | ||
--failure-level=ERROR | ||
REQUIRES := --require=asciidoctor-bibtex \ | ||
--require=asciidoctor-diagram \ | ||
--require=asciidoctor-mathematical \ | ||
--out-file=$(PDF_RESULT) \ | ||
$(HEADER_SOURCE) | ||
|
||
.PHONY: all build clean build-container build-no-container | ||
|
||
all: build | ||
|
||
build: | ||
@echo "Checking if Docker is available..." | ||
@if command -v docker >/dev/null 2>&1 ; then \ | ||
echo "Docker is available, building inside Docker container..."; \ | ||
$(MAKE) build-container; \ | ||
else \ | ||
echo "Docker is not available, building without Docker..."; \ | ||
$(MAKE) build-no-container; \ | ||
fi | ||
|
||
build-container: | ||
@echo "Starting build inside Docker container..." | ||
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE)" | ||
@echo "Build completed successfully inside Docker container." | ||
|
||
build-no-container: | ||
@echo "Starting build..." | ||
$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE) | ||
@echo "Build completed successfully." | ||
# Makefile for RISC-V ISA Manuals | ||
# | ||
# This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 | ||
# International License. To view a copy of this license, visit | ||
# http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to | ||
# Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | ||
# | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
# | ||
# Description: | ||
# | ||
# This Makefile is designed to automate the process of building and packaging | ||
# the documentation for RISC-V ISA Manuals. It supports multiple build targets | ||
# for generating documentation in various formats (PDF, HTML). | ||
|
||
# Build Targets | ||
TARGETS := iopmp-spec | ||
|
||
# Declare phony targets | ||
.PHONY: all $(TARGETS) clean | ||
|
||
# Default target builds all | ||
all: $(TARGETS) | ||
|
||
# Build with preinstalled docker container; first install it with: | ||
# docker pull riscvintl/riscv-docs-base-container-image:latest | ||
docker: | ||
cd .. && docker run -it -v .:/build riscvintl/riscv-docs-base-container-image:latest /bin/sh -c 'cd ./build; make $(MAKEFLAGS)' | ||
|
||
# Asciidoctor options | ||
ASCIIDOCTOR_OPTS := -a compress \ | ||
--attribute=mathematical-format=svg \ | ||
--failure-level=ERROR \ | ||
--require=asciidoctor-bibtex \ | ||
--require=asciidoctor-diagram \ | ||
--require=asciidoctor-mathematical \ | ||
--trace | ||
|
||
# Source directory | ||
SRCDIR := ./ | ||
|
||
PDF_RESULT := riscv-iopmp-specification.pdf | ||
|
||
# Temporary files to clean up for LaTeX build | ||
JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz | ||
|
||
# IOPMP Spec Build | ||
iopmp-spec: riscv-iopmp-specification.pdf | ||
|
||
riscv-iopmp-specification.pdf: $(SRCDIR)/header.adoc $(SRCDIR)/*.adoc | ||
@echo "Building Privileged ISA" | ||
rm -f $@.tmp | ||
asciidoctor-pdf $(ASCIIDOCTOR_OPTS) --out-file=$@.tmp $< | ||
mv $@.tmp $@ | ||
|
||
clean: | ||
@echo "Cleaning up generated files..." | ||
rm -f $(PDF_RESULT) | ||
@echo "Cleanup completed." | ||
@echo "Cleanup completed." | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[Appendix_A1] | ||
== A1: Multi-Faults Extension | ||
|
||
TBD | ||
== A1: Multi-Faults Record Extension | ||
A first violation is one that is detected and logged in the error report. However, since the error report can only accommodate one first violation, any additional violations that are detected but not logged in the error report are termed as subsequent violations. The issue at hand is that these subsequent violations become completely invisible. The Multi-Faults Record Extension is used to record which RRIDs make subsequent violations. The extension maintains a bit, referred to as SV[_s_], for each RRID _s_. When one or more subsequent violations are issued from an RRID, the corresponding bit is set. | ||
To retrieve these SVs, a 32-bit register *ERR_MFR* is used. Every 16 contiguous SVs are grouped together into a record window, which is indexed by a 12-bit field, *svi*. When *ERR_MFR* is read, the *svi* sequentially scans all windows from its original position until a violation is found. Once *svi* is overflowed, it rounds to zero. If found, the status bit *svs* is set, and *svi* stops in the window containing the first found set SV. The 16-bit field *svw* reflects the record window indexed by *svi*, where *svw[_j_]*=SV[*svi* * 32 + _j_]. After the register is read out, all bits in the record window are cleared. If not found, *svs* and *svw* return zeros and *svi* keeps the same. Moreover, the bit *svc* in the *ERR_REQINFO* indicates if any subsequent violation is in the log. |
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
Oops, something went wrong.