|
Lines 104-126
class SVP64ExtraSpec(Elaboratable):
Link Here
|
| 104 |
# 2-bit index selection mode |
104 |
# 2-bit index selection mode |
| 105 |
with m.Case(SVEtype.EXTRA2): |
105 |
with m.Case(SVEtype.EXTRA2): |
| 106 |
with m.Switch(self.idx): |
106 |
with m.Switch(self.idx): |
| 107 |
with m.Case(SVEXTRA.Idx0): # 1st 2 bits |
107 |
with m.Case(SVEXTRA.Idx0): # 1st 2 bits [0:1] |
| 108 |
comb += spec[1:3].eq(self.extra[0:2]) |
108 |
comb += spec[1:3].eq(self.extra[8-1:9]) |
| 109 |
with m.Case(SVEXTRA.Idx1): # 2nd 2 bits |
109 |
with m.Case(SVEXTRA.Idx1): # 2nd 2 bits [2:3] |
| 110 |
comb += spec[1:3].eq(self.extra[2:4]) |
110 |
comb += spec[1:3].eq(self.extra[8-3:8-1]) |
| 111 |
with m.Case(SVEXTRA.Idx2): # 3rd 2 bits |
111 |
with m.Case(SVEXTRA.Idx2): # 3rd 2 bits [4:5] |
| 112 |
comb += spec[1:3].eq(self.extra[4:6]) |
112 |
comb += spec[1:3].eq(self.extra[8-5:8-3]) |
| 113 |
with m.Case(SVEXTRA.Idx3): # 4th 2 bits |
113 |
with m.Case(SVEXTRA.Idx3): # 4th 2 bits [6:7] |
| 114 |
comb += spec[1:3].eq(self.extra[6:8]) |
114 |
comb += spec[1:3].eq(self.extra[8-7:8-5]) |
| 115 |
# 3-bit index selection mode |
115 |
# 3-bit index selection mode |
| 116 |
with m.Case(SVEtype.EXTRA3): |
116 |
with m.Case(SVEtype.EXTRA3): |
| 117 |
with m.Switch(self.idx): |
117 |
with m.Switch(self.idx): |
| 118 |
with m.Case(SVEXTRA.Idx0): # 1st 3 bits |
118 |
with m.Case(SVEXTRA.Idx0): # 1st 3 bits [0:2] |
| 119 |
comb += spec.eq(self.extra[0:3]) |
119 |
comb += spec.eq(self.extra[8-2:9]) |
| 120 |
with m.Case(SVEXTRA.Idx1): # 2nd 3 bits |
120 |
with m.Case(SVEXTRA.Idx1): # 2nd 3 bits [3:5] |
| 121 |
comb += spec.eq(self.extra[3:6]) |
121 |
comb += spec.eq(self.extra[8-5:8-2]) |
| 122 |
with m.Case(SVEXTRA.Idx2): # 3rd 3 bits |
122 |
with m.Case(SVEXTRA.Idx2): # 3rd 3 bits [6:8] |
| 123 |
comb += spec.eq(self.extra[6:9]) |
123 |
comb += spec.eq(self.extra[8-8:8-5]) |
| 124 |
# cannot fit more than 9 bits so there is no 4th thing |
124 |
# cannot fit more than 9 bits so there is no 4th thing |
| 125 |
|
125 |
|
| 126 |
return m |
126 |
return m |
|
Lines 1327-1332
class SVP64PrefixDecoder(Elaboratable):
Link Here
|
| 1327 |
l = [] |
1327 |
l = [] |
| 1328 |
for idx in rmfields: |
1328 |
for idx in rmfields: |
| 1329 |
l.append(self.opcode_in[31-idx]) |
1329 |
l.append(self.opcode_in[31-idx]) |
|
|
1330 |
# in nMigen, Cat begins at the LSB and proceeds upwards |
| 1331 |
l.reverse() # put the LSB at the start of the list |
| 1330 |
with m.If(self.is_svp64_mode): |
1332 |
with m.If(self.is_svp64_mode): |
| 1331 |
comb += self.svp64_rm.eq(Cat(*l)) |
1333 |
comb += self.svp64_rm.eq(Cat(*l)) |
| 1332 |
|
1334 |
|