Skip to content

Commit ab40a1c

Browse files
Write documentation for Hart
1 parent 73cd137 commit ab40a1c

File tree

3 files changed

+11
-182
lines changed

3 files changed

+11
-182
lines changed

documentation/.obsidian/workspace.json

Lines changed: 0 additions & 182 deletions
This file was deleted.

documentation/Modules/Hart.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Overview
2+
The Hart is the "hardware execution unit". This is the complex stuff comes together to actually execute the instructions. Right now it's stored in the `main.scala` file but we'll probably want to move it over to `hart.scala` later.
3+
## Instruction Staging
4+
Right now for simplicity, we're not doing anything too complex with how we're loading instructions. The way it works currently is a simple stage counter.
5+
### Stage 0
6+
The instruction at the program pointer is requested from memory.
7+
### Stage 1
8+
The instruction is available from memory and the decoder is now emitting the decoded instruction. We store the decoded instructions in buffers for access in later stages. Most instructions can simply execute in this stage and then set the stage counter back to 0 and increase the program pointer.
9+
## Stage 2
10+
Currently only the `LW` instruction uses stage 2, since in stage 1 `LW` requests the info from memory and then in stage 2 it takes the value from memory and writes it to the register.

documentation/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Welcome to the documentation for our RISC-V procesor!
22
## Modules
33
- [[Decoder]]
4+
- [[Hart]]

0 commit comments

Comments
 (0)