File tree Expand file tree Collapse file tree 1 file changed +6
-29
lines changed Expand file tree Collapse file tree 1 file changed +6
-29
lines changed Original file line number Diff line number Diff line change @@ -47,35 +47,12 @@ operation(): |
4747 }
4848
4949 XReg new_vtype = vtypei;
50- if (new_vtype[xlen() - 1] == 1'b1) {
51- # software is setting the illegal bit
52- CSR[vtype].VILL = 1;
53- CSR[vtype].VMA = 0;
54- CSR[vtype].VTA = 0;
55- CSR[vtype].VSEW = 0;
56- CSR[vtype].VLMUL = 0;
57- } else if ((new_vtype & 8'd0) != 0) {
58- CSR[vtype].VILL = 1;
59- CSR[vtype].VMA = 0;
60- CSR[vtype].VTA = 0;
61- CSR[vtype].VSEW = 0;
62- CSR[vtype].VLMUL = 0;
63- } else if (new_vtype[5] == 1) {
64- # reserved vsew encoding
65- CSR[vtype].VILL = 1;
66- CSR[vtype].VMA = 0;
67- CSR[vtype].VTA = 0;
68- CSR[vtype].VSEW = 0;
69- CSR[vtype].VLMUL = 0;
70- } else if (new_vtype[2:0] == 3'b100) {
71- # reserved LMUL
72- CSR[vtype].VILL = 1;
73- CSR[vtype].VMA = 0;
74- CSR[vtype].VTA = 0;
75- CSR[vtype].VSEW = 0;
76- CSR[vtype].VLMUL = 0;
77- } else if (xlen() == 32 && new_vtype[2:0] == 3'b101) {
78- # reserved LMUL in RV32
50+ if ((new_vtype[xlen() - 1] == 1'b1) # software is setting the illegal bit
51+ || ((new_vtype & 8'd0) != 0) # reserved bits
52+ || (new_vtype[5] == 1) # reserved vsew encoding
53+ || (new_vtype[2:0] == 3'b100) # reserved vlmul encoding
54+ || (xlen() == 32 && new_vtype[2:0] == 3'b101)) # reserved LMUL in RV32
55+ {
7956 CSR[vtype].VILL = 1;
8057 CSR[vtype].VMA = 0;
8158 CSR[vtype].VTA = 0;
You can’t perform that action at this time.
0 commit comments