Added Wavedrom register diagrams for the instruction encoding formats
This commit is contained in:
parent
2bcab589b8
commit
8f2ee738da
9
Makefile
9
Makefile
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
DOCS := central-execution-engine-spec
|
DOCS := central-execution-engine-spec
|
||||||
|
|
||||||
DOCKER_IMG := asciidoctor/docker-asciidoctor:latest
|
DOCKER_IMG := docker-asciidoctor-wavedrom:latest
|
||||||
|
|
||||||
ENV := LANG=C.utf8
|
ENV := LANG=C.utf8
|
||||||
|
|
||||||
@ -42,11 +42,12 @@ WORKDIR_TEARDOWN = \
|
|||||||
|
|
||||||
SRC_DIR := src
|
SRC_DIR := src
|
||||||
BUILD_DIR := build
|
BUILD_DIR := build
|
||||||
|
DOCKER_DIR := docker
|
||||||
|
|
||||||
ALL_SRC := $(shell find $(SRC_DIR) -type f -name '*.adoc' -print)
|
ALL_SRC := $(shell find $(SRC_DIR) -type f -name '*.adoc' -print)
|
||||||
DOCS_PDF := $(addprefix $(BUILD_DIR)/, $(addsuffix .pdf, $(DOCS)))
|
DOCS_PDF := $(addprefix $(BUILD_DIR)/, $(addsuffix .pdf, $(DOCS)))
|
||||||
|
|
||||||
.PHONY: all build docker-pull-latest clean
|
.PHONY: all build create-docker-image clean
|
||||||
|
|
||||||
all: build-pdf
|
all: build-pdf
|
||||||
|
|
||||||
@ -57,8 +58,8 @@ $(BUILD_DIR)/%.pdf: $(SRC_DIR)/%.adoc $(ALL_SRC)
|
|||||||
$(DOCKER_CMD) '$(ENV) asciidoctor-pdf $(OPTIONS) $(REQUIRES) $<'
|
$(DOCKER_CMD) '$(ENV) asciidoctor-pdf $(OPTIONS) $(REQUIRES) $<'
|
||||||
$(WORKDIR_TEARDOWN)
|
$(WORKDIR_TEARDOWN)
|
||||||
|
|
||||||
docker-pull-latest:
|
create-docker-image:
|
||||||
$(SUDO_PREFIX) docker pull $(DOCKER_IMG)
|
$(SUDO_PREFIX) docker build -t $(DOCKER_IMG) $(DOCKER_DIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning up generated files..."
|
@echo "Cleaning up generated files..."
|
||||||
|
@ -5,5 +5,5 @@ This repository contains the documentation on the Central(Architecture).
|
|||||||
To build the documentation, `make` and `docker` should be installed in the build environment.
|
To build the documentation, `make` and `docker` should be installed in the build environment.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make clean && make
|
make create-docker-image && make
|
||||||
```
|
```
|
||||||
|
4
docker/Dockerfile
Normal file
4
docker/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM asciidoctor/docker-asciidoctor:latest
|
||||||
|
|
||||||
|
RUN apk add npm
|
||||||
|
RUN npm install -g wavedrom-cli bytefield-svg
|
@ -9,3 +9,5 @@ This means that the amount of information pertaining to the internals of an _Exe
|
|||||||
include::execution-engine-spec/glossary.adoc[]
|
include::execution-engine-spec/glossary.adoc[]
|
||||||
|
|
||||||
include::execution-engine-spec/data-manipulation.adoc[]
|
include::execution-engine-spec/data-manipulation.adoc[]
|
||||||
|
|
||||||
|
include::execution-engine-spec/instructions.adoc[]
|
48
src/execution-engine-spec/images/instruction-formats.adoc
Normal file
48
src/execution-engine-spec/images/instruction-formats.adoc
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
[wavedrom, ,svg]
|
||||||
|
....
|
||||||
|
{reg: [
|
||||||
|
{bits: 7, name: 'opcode'},
|
||||||
|
{bits: 5, name: 'rd'},
|
||||||
|
{bits: 5, name: 'rs1'},
|
||||||
|
{bits: 5, name: 'rs2'},
|
||||||
|
{bits: 10, name: 'imm'}
|
||||||
|
], config: {label: {right: 'A-Type'}}}
|
||||||
|
....
|
||||||
|
|
||||||
|
[wavedrom, ,svg]
|
||||||
|
....
|
||||||
|
{reg: [
|
||||||
|
{bits: 7, name: 'opcode'},
|
||||||
|
{bits: 5, name: 'rd'},
|
||||||
|
{bits: 5, name: 'rs'},
|
||||||
|
{bits: 15, name: 'imm'}
|
||||||
|
], config: {label: {right: 'B-Type'}}}
|
||||||
|
....
|
||||||
|
|
||||||
|
[wavedrom, ,svg]
|
||||||
|
....
|
||||||
|
{reg: [
|
||||||
|
{bits: 7, name: 'opcode'},
|
||||||
|
{bits: 5, name: 'rd'},
|
||||||
|
{bits: 20, name: 'imm'}
|
||||||
|
], config: {label: {right: 'C-Type'}}}
|
||||||
|
....
|
||||||
|
|
||||||
|
[wavedrom, ,svg]
|
||||||
|
....
|
||||||
|
{reg: [
|
||||||
|
{bits: 7, name: 'opcode'},
|
||||||
|
{bits: 25, name: 'imm'}
|
||||||
|
], config: {label: {right: 'D-Type'}}}
|
||||||
|
....
|
||||||
|
|
||||||
|
[wavedrom, ,svg]
|
||||||
|
....
|
||||||
|
{reg: [
|
||||||
|
{bits: 7, name: 'opcode'},
|
||||||
|
{bits: 5, name: 'reg'},
|
||||||
|
{bits: 4, name: 'sid'},
|
||||||
|
{bits: 8, name: 'sre'},
|
||||||
|
{bits: 8, name: 'cmd'}
|
||||||
|
], config: {label: {right: 'E-Type'}}}
|
||||||
|
....
|
5
src/execution-engine-spec/instructions.adoc
Normal file
5
src/execution-engine-spec/instructions.adoc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
== Instructions
|
||||||
|
|
||||||
|
=== Instruction Encoding Formats
|
||||||
|
|
||||||
|
include::images/instruction-formats.adoc[]
|
Loading…
Reference in New Issue
Block a user