From: Cesar Strauss Date: Sun, 14 Feb 2021 21:47:02 +0000 (-0300) Subject: Fix conversion to MSB0 X-Git-Tag: convert-csv-opcode-to-binary~231^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01cfe8481f722dd761b155fce7c19148c8209d67;p=soc.git Fix conversion to MSB0 Correct formula is 31 - x. --- diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 640acef8..a1a69c99 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -1326,7 +1326,7 @@ class SVP64PrefixDecoder(Elaboratable): rmfields = [6, 8] + list(range(10,32)) # SVP64 24-bit RM l = [] for idx in rmfields: - l.append(self.opcode_in[32-idx]) + l.append(self.opcode_in[31-idx]) with m.If(self.is_svp64_mode): comb += self.svp64_rm.eq(Cat(*l))