generated from chipsalliance/chisel-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instr.txt
115 lines (97 loc) · 3.33 KB
/
Instr.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Pyke internal insn set:
16 regs.
- 15 GPRs
- x0 is always zero
16bit insn:
- add %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 0000 |
+---------+--------+-------+-------+
- addi %d, %s1, #imm
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| imm | %s1 | %d | 0001 |
+---------+--------+-------+-------+
- sub %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 0010 |
+---------+--------+-------+-------+
- lw %d, %base, #offset
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| off | %base | %s | 0011 |
+---------+--------+-------+-------+
- sw %d, %base, #offset
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s | %base | imm | 0100 |
+---------+--------+-------+-------+
- sll %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 0101 |
+---------+--------+-------+-------+
- srl %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 0110 |
+---------+--------+-------+-------+
- sra %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 0111 |
+---------+--------+-------+-------+
- xor %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 1000 |
+---------+--------+-------+-------+
- and %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 1001 |
+---------+--------+-------+-------+
- or %d, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 | %d | 1010 |
+---------+--------+-------+-------+
- beq $target, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 |$target| 1011 |
+---------+--------+-------+-------+
pc = pc + $target if %s1 == %s2
- jr %d + imm, %rp
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| imm | %rp | %d | 1100 |
+---------+--------+-------+-------+
- slli %d, %s1, #imm
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| imm | %s1 | %d | 1101 |
+---------+--------+-------+-------+
- bne $target, %s1, %s2
+---------+--------+-------+-------+
| [15:12] | [11:8] | [7:4] | [3:0] |
+---------+--------+-------+-------+
| %s2 | %s1 |$target| 1110 |
+---------+--------+-------+-------+
pc = pc + $target if %s1 != %s2