Welcome to Manim for ISA
The instruction set is the most important component of the Computer Architecture. To help users quickly and correctly understand the definition and behavior of instructions, the Computer Specification uses many pages to provide textual descriptions and pseudocode for each instruction.
However, static descriptions, such as textual and pseudocode, still have the following problems for instructions with complex functionality and behaviors.
- The textual description is not intuitively clear enough and leads to ambiguity, especially for non-native English users.
- Pseudocode can clear ambiguity to some extent, depending on the coding ability of users.
ISAManim aims to create a well-using framework to generate animations presenting the function of one instruction or an instruction sequence. The project is developed based on Manim, a Python-based animation framework for mathematics and algorithms.
ISAManim majorly focuses on the data flow of the instructions. Animations can present the following behaviors:
- Read/write elements from registers.
- Arithmetic/logic operation.
- Memory access.
ISAManim offers automatic animation management and object placement by providing dedicated animation scenes and APIs. Users do not need to pay attention on the animation. Instead, users only need to program the animation as the instruction behavior.
Installation
The whole project is developed based on Python3.
Install Manim
Page Installation provides the flow to install Manim on different OSs.
The typical process to install Manim in Ubuntu is as follows:
# Install requirements of Manim
sudo apt update
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
# Install python package manager
sudo apt install python3-pip
# Install Manim
pip3 install manim
Clone repository
Follow commands to clone the project to local.
# git clone repository
git clone git@github.com:wangeddie67/isa_manim.git
# install requirements
pip3 install -r isa_manim/requirements.txt
Generate Documents
The document for this project is generated by MkDocs. The environment of MkDocs can be set up by following commands:
cd /root/to/isa_sim_utils/docs
# Install MkDocs and plugin
pip3 install -r requirements.txt
The document can be generated by following commands:
make doc
# Publish to GitHub Pages
mkdocs gh-deploy --force
Users can access the generated documents in the directory docs/site. The index page of
generated documents is docs/site/index.html.