Initial commit

This commit is contained in:
Elyan 2024-10-12 23:18:36 +02:00
commit 234a92d5e0
4 changed files with 90 additions and 0 deletions

66
Makefile Normal file
View File

@ -0,0 +1,66 @@
# Taken and adapted from https://github.com/riscv/riscv-isa-manual/blob/main/Makefile
# vim: noexpandtab:tabstop=4:shiftwidth=4
DOCS := central-execution-engine-spec
DOCKER_IMG := asciidoctor/docker-asciidoctor:latest
ENV := LANG=C.utf8
OPTIONS := -D build \
--trace \
--failure-level=ERROR
REQUIRES := --require=asciidoctor-diagram
DOCKER_IS_ROOTLESS = \
$(shell ! ps ux | grep -v grep | grep dockerd-rootless >/dev/null ; echo $$?)
ifneq "$(DOCKER_IS_ROOTLESS)" "1"
# Rooted Docker requires this flag so that the files it creates are
# owned by the current user instead of root. Rootless docker does not
# require it, and Podman doesn't either since it is always rootless.
DOCKER_USER_ARG := --user $(shell id -u)
SUDO_PREFIX := sudo
endif
DOCKER_CMD = \
$(SUDO_PREFIX) docker run --rm \
-v $(PWD)/$@.workdir:/build \
-w /build \
$(DOCKER_USER_ARG) \
$(DOCKER_IMG) \
/bin/sh -c
WORKDIR_SETUP = \
rm -rf $@.workdir && \
mkdir -p $@.workdir && \
cp -r src $@.workdir
WORKDIR_TEARDOWN = \
mv $@.workdir/$@ $@ && \
rm -rf $@.workdir
SRC_DIR := src
BUILD_DIR := build
ALL_SRC := $(shell find $(SRC_DIR) -type f -name '*.adoc' -print)
DOCS_PDF := $(addprefix $(BUILD_DIR)/, $(addsuffix .pdf, $(DOCS)))
.PHONY: all build docker-pull-latest clean
all: build-pdf
build-pdf: $(DOCS_PDF)
$(BUILD_DIR)/%.pdf: $(SRC_DIR)/%.adoc $(ALL_SRC)
$(WORKDIR_SETUP)
$(DOCKER_CMD) '$(ENV) asciidoctor-pdf $(OPTIONS) $(REQUIRES) $<'
$(WORKDIR_TEARDOWN)
docker-pull-latest:
$(SUDO_PREFIX) docker pull $(DOCKER_IMG)
clean:
@echo "Cleaning up generated files..."
rm -rf $(BUILD_DIR)
@echo "Cleanup completed."

9
README.md Normal file
View File

@ -0,0 +1,9 @@
# This repo
This repository contains the documentation on the Central(Architecture).
# Building from sources
To build the documentation, `make` and `docker` should be installed in the build environment.
```bash
make clean && make
```

View File

@ -0,0 +1,8 @@
= Central(Execution Engine): Public Interface Specification
:reproducible:
:doctype: book
:lang: en
:toc: left
:toclevels: 5
include::glossary.adoc[]

7
src/glossary.adoc Normal file
View File

@ -0,0 +1,7 @@
[glossary]
== Glossary
[glossary]
Central Processing Unit:: An hardware unit containing one or more *Execution Engines*, a memory controller, an interrupt controller, an operator facility controller and various other minor components.
Execution Engine:: The hardware responsible for the execution of user-written code, be it kernel code or user program code. An *Execution Engine* contains a fetch unit, a decode unit, a micro-instruction sequencer, an Arithmetic & Logic Unit, various registers and subsystems. An *Execution Engine* is analogous to an *hart* in the RISC-V nomenclature or to a *core* in other CPU specifications.