Skip to content

Commit

Permalink
[doc] update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed May 10, 2024
1 parent 6613e60 commit f118d5f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ To install HEMU, you will need to have Rust installed on your machine. You can d

Once Rust is installed, you can clone the HEMU repository from Github:

```sh
git clone --recurse-submodules https://github.com/Clo91eaf/hemu.git
```

or

```sh
git clone https://github.com/Clo91eaf/hemu.git
cd hemu
git submodule update --init --recursive
```

### Runing
Expand All @@ -32,7 +38,23 @@ cargo run -- -k <path_to_binary>
Where `<path_to_binary>` is the path to the binary file that you want to run. For example:

```sh
cargo run -- -k ./resources/am-tests/add-riscv64-nemu.bin
cargo run -- -k ./dependencies/tests/bin/am-tests/add
```

#### Difftest

if you want to run difftest, you can use the following command:

```sh
cargo run -- -k ./dependencies/tests/bin/am-tests/add --diff
```

#### Difftest With Tui

if you want to run difftest with TUI, you can use the following command:

```sh
cargo run -- -k ./dependencies/tests/bin/am-tests/add --diff --tui
```

#### Run opensbi
Expand Down Expand Up @@ -85,10 +107,11 @@ There are several potential benefits to using Rust to rewrite Nemus's logic:
- [x] Pass am-tests
- [x] RISCV64IMAZicsr instruction set architecture
- [x] Pass riscv-tests
- [ ] Support for opensbi
- [x] Support for opensbi
- [x] Add TUI for debugging
- [ ] Support for Linux
- [ ] Add TUI for debugging

- [ ] LA32 instruction set architecture
- [ ] MIPS32 instruction set architecture
- [ ] Added support for peripherals.
- [ ] Added interrupt handling mechanisms.
Expand Down
3 changes: 2 additions & 1 deletion src/emulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::{error, info, trace};
use crate::cpu::Cpu;
use crate::dut::Dut;
use crate::exception::Trap;
use crate::tui::{UI, Tui};
use crate::tui::{Tui, UI};
use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind};
use ratatui::{
prelude::*,
Expand Down Expand Up @@ -213,6 +213,7 @@ impl Emulator {
Ok(())
}

/// Start executing the emulator without difftest.
pub fn start(&mut self) {
loop {
let pc = self.cpu.pc;
Expand Down

0 comments on commit f118d5f

Please sign in to comment.