aboutsummaryrefslogtreecommitdiff
path: root/inst.v
blob: ddea34288ee2da92878837e8938d2548a7589111 (plain)
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
`define UNIMP      32'b00000000000000000000000000000000
`define J          32'b?????????????????????????_1100111
`define JAL        32'b?????????????????????????_1101111
`define JALR_C     32'b?????_?????_????????????_000_1101011
`define JALR_R     32'b?????_?????_????????????_001_1101011
`define JALR_J     32'b?????_?????_????????????_010_1101011
`define BEQ        32'b?????_?????_?????_???????_000_1100011
`define BNE        32'b?????_?????_?????_???????_001_1100011
`define BLT        32'b?????_?????_?????_???????_100_1100011
`define BGE        32'b?????_?????_?????_???????_101_1100011
`define BLTU       32'b?????_?????_?????_???????_110_1100011
`define BGEU       32'b?????_?????_?????_???????_111_1100011
`define LUI        32'b?????_????????????????????_0110111
`define ADDI       32'b?????_?????_????????????_000_0010011
`define SLLI       32'b?????_?????_000000_??????_001_0010011
`define SLTI       32'b?????_?????_????????????_010_0010011
`define SLTIU      32'b?????_?????_????????????_011_0010011
`define XORI       32'b?????_?????_????????????_100_0010011
`define SRLI       32'b?????_?????_000000_??????_101_0010011
`define SRAI       32'b?????_?????_000001_??????_101_0010011
`define ORI        32'b?????_?????_????????????_110_0010011
`define ANDI       32'b?????_?????_????????????_111_0010011
`define ADD        32'b?????_?????_?????_0000000000_0110011
`define SUB        32'b?????_?????_?????_1000000000_0110011
`define SLL        32'b?????_?????_?????_0000000001_0110011
`define SLT        32'b?????_?????_?????_0000000010_0110011
`define SLTU       32'b?????_?????_?????_0000000011_0110011
`define XOR        32'b?????_?????_?????_0000000100_0110011
`define SRL        32'b?????_?????_?????_0000000101_0110011
`define SRA        32'b?????_?????_?????_1000000101_0110011
`define OR         32'b?????_?????_?????_0000000110_0110011
`define AND        32'b?????_?????_?????_0000000111_0110011
`define MUL        32'b?????_?????_?????_0000001000_0110011
`define MULH       32'b?????_?????_?????_0000001001_0110011
`define MULHSU     32'b?????_?????_?????_0000001010_0110011
`define MULHU      32'b?????_?????_?????_0000001011_0110011
`define DIV        32'b?????_?????_?????_0000001100_0110011
`define DIVU       32'b?????_?????_?????_0000001101_0110011
`define REM        32'b?????_?????_?????_0000001110_0110011
`define REMU       32'b?????_?????_?????_0000001111_0110011
`define ADDIW      32'b?????_?????_????????????_000_0011011
`define SLLIW      32'b?????_?????_000000_0_?????_001_0011011
`define SRLIW      32'b?????_?????_000000_0_?????_101_0011011
`define SRAIW      32'b?????_?????_000001_0_?????_101_0011011
`define ADDW       32'b?????_?????_?????_0000000000_0111011
`define SUBW       32'b?????_?????_?????_1000000000_0111011
`define SLLW       32'b?????_?????_?????_0000000001_0111011
`define SRLW       32'b?????_?????_?????_0000000101_0111011
`define SRAW       32'b?????_?????_?????_1000000101_0111011
`define MULW       32'b?????_?????_?????_0000001000_0111011
`define DIVW       32'b?????_?????_?????_0000001100_0111011
`define DIVUW      32'b?????_?????_?????_0000001101_0111011
`define REMW       32'b?????_?????_?????_0000001110_0111011
`define REMUW      32'b?????_?????_?????_0000001111_0111011
`define LB         32'b?????_?????_????????????_000_0000011
`define LH         32'b?????_?????_????????????_001_0000011
`define LW         32'b?????_?????_????????????_010_0000011
`define LD         32'b?????_?????_????????????_011_0000011
`define LBU        32'b?????_?????_????????????_100_0000011
`define LHU        32'b?????_?????_????????????_101_0000011
`define LWU        32'b?????_?????_????????????_110_0000011
`define SB         32'b?????_?????_?????_???????_000_0100011
`define SH         32'b?????_?????_?????_???????_001_0100011
`define SW         32'b?????_?????_?????_???????_010_0100011
`define SD         32'b?????_?????_?????_???????_011_0100011
`define AMOADD_W   32'b?????_?????_?????_00000_000_10_1000011
`define AMOSWAP_W  32'b?????_?????_?????_00000_010_10_1000011
`define AMOAND_W   32'b?????_?????_?????_00000_100_10_1000011
`define AMOOR_W    32'b?????_?????_?????_00000_110_10_1000011
`define AMOMIN_W   32'b?????_?????_?????_00001_000_10_1000011
`define AMOMAX_W   32'b?????_?????_?????_00001_010_10_1000011
`define AMOMINU_W  32'b?????_?????_?????_00001_100_10_1000011
`define AMOMAXU_W  32'b?????_?????_?????_00001_110_10_1000011
`define AMOADD_D   32'b?????_?????_?????_00000_000_11_1000011
`define AMOSWAP_D  32'b?????_?????_?????_00000_010_11_1000011
`define AMOAND_D   32'b?????_?????_?????_00000_100_11_1000011
`define AMOOR_D    32'b?????_?????_?????_00000_110_11_1000011
`define AMOMIN_D   32'b?????_?????_?????_00001_000_11_1000011
`define AMOMAX_D   32'b?????_?????_?????_00001_010_11_1000011
`define AMOMINU_D  32'b?????_?????_?????_00001_100_11_1000011
`define AMOMAXU_D  32'b?????_?????_?????_00001_110_11_1000011
`define RDNPC      32'b?????_00000_00000_0000000000_0010111
`define SYNCI      32'b00000_00000_00000_0000000001_0010111
`define SYNC       32'b00000_00000_00000_0000000010_0010111
`define SYSCALL    32'b00000_00000_????????????_011_0010111
`define EI         32'b?????_00000_00000_0000000000_1111111
`define DI         32'b?????_00000_00000_0000001000_1111111
`define MFPCR      32'b?????_00000_?????_0000000001_1111111
`define MTPCR      32'b00000_?????_?????_0000001001_1111111
`define ERET       32'b00000_00000_00000_0000000010_1111111
`define FADD_S     32'b?????_?????_?????_00000_???_00_1010011
`define FSUB_S     32'b?????_?????_?????_00001_???_00_1010011
`define FMUL_S     32'b?????_?????_?????_00010_???_00_1010011
`define FDIV_S     32'b?????_?????_?????_00011_???_00_1010011
`define FSQRT_S    32'b?????_?????_00000_00100_???_00_1010011
`define FSGNJ_S    32'b?????_?????_?????_0010111100_1010011
`define FSGNJN_S   32'b?????_?????_?????_0011011100_1010011
`define FSGNJX_S   32'b?????_?????_?????_0011111100_1010011
`define FADD_D     32'b?????_?????_?????_00000_???_01_1010011
`define FSUB_D     32'b?????_?????_?????_00001_???_01_1010011
`define FMUL_D     32'b?????_?????_?????_00010_???_01_1010011
`define FDIV_D     32'b?????_?????_?????_00011_???_01_1010011
`define FSQRT_D    32'b?????_?????_00000_00100_???_01_1010011
`define FSGNJ_D    32'b?????_?????_?????_0010111101_1010011
`define FSGNJN_D   32'b?????_?????_?????_0011011101_1010011
`define FSGNJX_D   32'b?????_?????_?????_0011111101_1010011
`define FCVT_L_S   32'b?????_?????_00000_01000_???_00_1010011
`define FCVT_LU_S  32'b?????_?????_00000_01001_???_00_1010011
`define FCVT_W_S   32'b?????_?????_00000_01010_???_00_1010011
`define FCVT_WU_S  32'b?????_?????_00000_01011_???_00_1010011
`define FCVT_L_D   32'b?????_?????_00000_01000_???_01_1010011
`define FCVT_LU_D  32'b?????_?????_00000_01001_???_01_1010011
`define FCVT_W_D   32'b?????_?????_00000_01010_???_01_1010011
`define FCVT_WU_D  32'b?????_?????_00000_01011_???_01_1010011
`define FCVT_S_L   32'b?????_?????_00000_01100_???_00_1010011
`define FCVT_S_LU  32'b?????_?????_00000_01101_???_00_1010011
`define FCVT_S_W   32'b?????_?????_00000_01110_???_00_1010011
`define FCVT_S_WU  32'b?????_?????_00000_01111_???_00_1010011
`define FCVT_D_L   32'b?????_?????_00000_01100_???_01_1010011
`define FCVT_D_LU  32'b?????_?????_00000_01101_???_01_1010011
`define FCVT_D_W   32'b?????_?????_00000_0111011101_1010011
`define FCVT_D_WU  32'b?????_?????_00000_0111111101_1010011
`define FCVT_S_D   32'b?????_?????_00000_10001_???_00_1010011
`define FCVT_D_S   32'b?????_?????_00000_10000_???_01_1010011
`define FEQ_S      32'b?????_?????_?????_1010111100_1010011
`define FLT_S      32'b?????_?????_?????_1011011100_1010011
`define FLE_S      32'b?????_?????_?????_1011111100_1010011
`define FEQ_D      32'b?????_?????_?????_1010111101_1010011
`define FLT_D      32'b?????_?????_?????_1011011101_1010011
`define FLE_D      32'b?????_?????_?????_1011111101_1010011
`define MFTX_S     32'b?????_00000_?????_1100011100_1010011
`define MFTX_D     32'b?????_00000_?????_1100011101_1010011
`define MFFSR      32'b?????_00000_00000_1101111100_1010011
`define MXTF_S     32'b?????_?????_00000_1110011100_1010011
`define MXTF_D     32'b?????_?????_00000_1110011101_1010011
`define MTFSR      32'b00000_?????_00000_1110111100_1010011
`define FLW        32'b?????_?????_????????????_010_0000111
`define FLD        32'b?????_?????_????????????_011_0000111
`define FSW        32'b?????_?????_?????_???????_010_0100111
`define FSD        32'b?????_?????_?????_???????_011_0100111
`define FMADD_S    32'b?????_?????_?????_?????_???_00_1000011
`define FMSUB_S    32'b?????_?????_?????_?????_???_00_1000111
`define FNMSUB_S   32'b?????_?????_?????_?????_???_00_1001011
`define FNMADD_S   32'b?????_?????_?????_?????_???_00_1001111
`define FMADD_D    32'b?????_?????_?????_?????_???_01_1000011
`define FMSUB_D    32'b?????_?????_?????_?????_???_01_1000111
`define FNMSUB_D   32'b?????_?????_?????_?????_???_01_1001011
`define FNMADD_D   32'b?????_?????_?????_?????_???_01_1001111