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
|
//# 16 "C" Standard Extension for Compressed Instructions, Version 2.0
//## 16.2 Compressed Instruction Formats
//Table 16.1: Compressed 16-bit RVC instruction formats.
//### CR : Register
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 5, name: 'rs2', type: 4},
{bits: 5, name: 'rd/rs1', type: 7},
{bits: 4, name: 'funct4', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 5, name: 'imm', type: 3},
{bits: 5, name: 'rd/rs1', type: 7},
{bits: 1, name: 'imm', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 5, name: 'rs2', type: 4},
{bits: 6, name: 'imm', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 3, name: 'rdʹ', type: 2},
{bits: 8, name: 'imm', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 3, name: 'rdʹ', type: 2},
{bits: 2, name: 'imm', type: 3},
{bits: 3, name: 'rs1ʹ', type: 4},
{bits: 3, name: 'imm', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 3, name: 'rs2ʹ', type: 4},
{bits: 2, name: 'imm', type: 3},
{bits: 3, name: 'rs1ʹ', type: 4},
{bits: 3, name: 'imm', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 3, name: 'rs2ʹ', type: 4},
{bits: 2, name: 'funct2', type: 8},
{bits: 3, name: 'rdʹ/rs1ʹ', type: 7},
{bits: 6, name: 'funct6', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 5, name: 'offset', type: 3},
{bits: 3, name: 'rdʹ/rs1ʹ', type: 7},
{bits: 3, name: 'offset', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
[wavedrom, ,svg]
....
{reg: [
{bits: 2, name: 'op', type: 8},
{bits: 11, name: 'jmp trgt', type: 3},
{bits: 3, name: 'funct3', type: 8},
]}
....
//the following configuration broke the build.
//config: {
// hflip: true,
// compact: true,
// bits: 16 * 9, lanes: 9,
// margin: {right: width / 4},
// label: {right: ['CR : Register', 'CI : Immediate', 'CSS : Stack-relative Store', 'CIW : Wide Immediate', 'CL : Load', 'CS //: Store', 'CA : //Arithmetic', 'CB : Branch/Arithmetic', 'CJ : Jump']}
//}
|