You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ Docker was the first containerization platform and still is the most widely used
10
10
11
11
## Run the Lab Environment
12
12
13
-
### 1) Using Docker Engine
13
+
### 1) Using Container Engine
14
14
15
-
> :warning: You need [Docker Engine](https://docs.docker.com/engine/) installed on your system to proceed. You can install the engine for Ubuntu by following [installation steps](https://docs.docker.com/engine/install/ubuntu/). You can also follow [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) to run `docker` without `sudo`.
15
+
> :warning: You need [Docker Engine](https://docs.docker.com/engine/)or []installed on your system to proceed. You can install the engine for Ubuntu by following [installation steps](https://docs.docker.com/engine/install/ubuntu/). You can also follow [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) to run `docker` without `sudo`.
16
16
17
17
> :warning: Windows users need to use Docker Desktop with WSL2 backend. See [the installation steps](https://docs.docker.com/desktop/install/windows-install/).
Copy file name to clipboardExpand all lines: tutorials/fibonacci/README.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,10 @@ The `fibonacci.elf` is a binary executable in the ELF format, containing the RIS
30
30
Disassembling the ELF file means we convert the binary file `fibonacci.elf` in a human-readable textual file. We can disassemble ELF objects and executable using the program `objdump` as follows:
Now check out the contents of `fibonacci.txt`, which is a plain text file, in your text editor. It should look like this:
36
+
Now check out the contents of `fibonacci.objdump`, which is a plain text file, in your text editor. It should look like this:
37
37
38
38
```
39
39
fibonacci.elf: file format elf32-littleriscv
@@ -64,7 +64,34 @@ Disassembly of section .text:
64
64
100d4: 0000006f j 100d4 <DONE>
65
65
```
66
66
67
-
The `fibonacci.txt` file is a disassembled version of our assembled code. It provides a more detailed view of the instructions and data, including the assigned memory addresses and the substitution of pseudo-instructions with their corresponding RISC-V machine code. These changes are performed by the assembler during the compilation process.
67
+
The `fibonacci.objdump` file is a disassembled version of our assembled code. It provides a more detailed view of the instructions and data, including the assigned memory addresses and the substitution of pseudo-instructions with their corresponding RISC-V machine code. These changes are performed by the assembler during the compilation process.
68
+
69
+
## Simulate using Spike
70
+
71
+
Our desktop computers typically use `x86_64` processors, which are incompatible with RISC-V executables like `fibonacci.elf`. If you have a computer equipped with a RISC-V processor, you can directly execute `fibonacci.elf` on it.
72
+
73
+
For those using `x86-64` or `arm64` processors, it is possible to simulate RISC-V executables using RISC-V ISA simulators. The `spike` simulator is a production-grade RISC-V ISA simulator available in our lab's development environment. Please check its installation by running the following command:
74
+
75
+
```bash
76
+
spike --help
77
+
```
78
+
79
+
If you see `spike` help text, everything is set up correctly.
80
+
81
+
We first use the simulator in the interactive mode, where we can instruct commands to the simulator one by one. To start the simulation of `fibonacci.elf` in the interactive mode, please run the command in your terminal as follows:
82
+
83
+
```
84
+
spike -d fibonacci.elf
85
+
```
86
+
87
+
Now you are in the interactive shell where you can give commands to the simulator. You can find the most commonly used commands for `spike` in the following table.
0 commit comments