Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit d6fb2ee

Browse files
author
f74064054@mail.ncku.edu.tw
committed
Fix the merge confliction and delete generated files
2 parents 0dbbc70 + 6902167 commit d6fb2ee

File tree

6 files changed

+477
-498
lines changed

6 files changed

+477
-498
lines changed

.clang-format

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BasedOnStyle: Chromium
2+
Language: Cpp
3+
MaxEmptyLinesToKeep: 3
4+
IndentCaseLabels: false
5+
AllowShortIfStatementsOnASingleLine: false
6+
AllowShortCaseLabelsOnASingleLine: false
7+
AllowShortLoopsOnASingleLine: false
8+
DerivePointerAlignment: false
9+
PointerAlignment: Right
10+
SpaceAfterCStyleCast: true
11+
TabWidth: 4
12+
UseTab: Never
13+
IndentWidth: 4
14+
BreakBeforeBraces: Linux
15+
AccessModifierOffset: -4

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ CSR.h
77
# ignore generated files
88
work/**/*.mem
99
work/**/*.nm
10-
work/**/*.log

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
rv32emu is maintained by National Cheng Kung University, based on the
2+
following efforts:
3+
14
Fabrice Bellard - original code of RISC-V emulator:
25
https://bellard.org/tinyemu/
36

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Original MIT License:
2-
1+
Copyright (c) 2019 National Cheng Kung University, Taiwan
2+
Copyright (c) 2018 Alexander Shabarshin
3+
Copyright (c) 2018 Frank Buss
34
Copyright (c) 2016-2017 Fabrice Bellard
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RISC-V RV32I[MAC] emulator with ELF support
22

3-
Emulator was originally created by Fabrice Bellard and then modified and shared on Hackaday by Frank Buss
4-
as a single C-file. Shaos added some additional statistics and macros.
3+
This is a RISC-V emulator for the RV32I architecture, based on [TinyEMU](https://bellard.org/tinyemu/)
4+
and stripped down for RV32I only.
55

66
Requires libelf-dev:
77
```shell
@@ -19,8 +19,13 @@ $ make emu-rv32i
1919

2020
Passed RV32I compliance tests from https://github.com/riscv/riscv-compliance
2121
- Must install the [risc-v toolchain](https://xpack.github.io/riscv-none-embed-gcc/)
22+
23+
Run RV32I compliance tests.
24+
Assume `emu-rv32i` in `$PATH` environment variable.
2225
```shell
23-
$ make RISCV_TARGET=spike RISCV_DEVICE=rv32i TARGET_SIM=/full/path/emulator variant
26+
$ git clone https://github.com/riscv/riscv-compliance
27+
$ cd riscv-compliance
28+
$ make RISCV_PREFIX=riscv-none-embed- RISCV_DEVICE=rv32i TARGET_SIM=emu-rv32i variant
2429
```
2530

2631
Compiling and running simple code:
@@ -36,15 +41,14 @@ Hello RISC-V!
3641

3742
- RV32M and RV32A instructions may be enabled by commenting `#define STRICT_RV32I`.
3843

39-
4044
Passed RV32C compliance tests from https://github.com/riscv/riscv-compliance
4145
```shell
4246
make C-ADDI.log
4347
```
4448
If there is no accident, it will output the `TEST PASSED`
4549

4650

47-
- RV32C instructions can be enabled by commenting `#define RV32C`
51+
- RV32C instructions can be enabled by uncommenting `#define RV32C`
4852
## How to build RISC-V toolchain from scratch
4953

5054
https://github.com/riscv/riscv-gnu-toolchain

0 commit comments

Comments
 (0)