File tree 1 file changed +32
-2
lines changed 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
A tool to extract information from the sail-riscv spec.
4
4
5
- ## Usage
5
+ ## Build
6
6
7
7
```
8
8
make
9
9
```
10
- then run
10
+ This will build a ` riscv_decode.cmxs ` for use as a ` sail ` plugin.
11
+ Example use below.
12
+
13
+ ## Usage
14
+
15
+ In general:
11
16
```
12
17
sail -plugin riscv_decode.cmxs -riscv_decode <files>
13
18
```
19
+
20
+ A specific example follows. To ensure the various RISC-V Sail files are
21
+ all included and in the correct order, leverage the ` sail-riscv/Makefile ` :
22
+
23
+ 1 . Clone the sail-riscv repository:
24
+ ```
25
+ $ git clone https://github.com/riscv/sail-riscv.git
26
+ ```
27
+
28
+ 1 . Add a ` decode ` target to the ` Makefile ` , providing the path to the plugin
29
+ built above:
30
+ ```
31
+ @@ -178,6 +178,10 @@ endif
32
+
33
+ .PHONY:
34
+
35
+ +decode: $(SAIL_SRCS) model/main.sail Makefile
36
+ + sail -dno_cast -no_warn -plugin $(replace with path to)/riscvdecode/riscv_decode.cmxs -riscv_decode $(SAIL_SRCS)
37
+ +
38
+ ```
39
+
40
+ 1 . Run it:
41
+ ```
42
+ $ make decode
43
+ ```
You can’t perform that action at this time.
0 commit comments