RB|0 would need a new flag to be passed down to ALUs in HDL
<!-- https://libre-soc.org/openpower/prefix_codes/ -->
-# [DRAFT] Prefix-code decode
+# [DRBFT] Prefix-code decode
VA2-Form
Pseudo-code:
- tree[0:63] <- (RA)
+ tree[0:63] <- (RB)
rb_used <- 0b0
in_bits[0:63] <- (RC|0)
if in_bits = 0 then
do while out_byte < 8
in_bit <- in_bits[63]
if in_bits = 1 then
- if rb_used | (_RB = 0) then
+ if rb_used | (_RA = 0) then
leave
rb_used <- 0b1
- in_bit <- (RB)[63]
- in_bits <- 0b1 || (RB)[0:62]
+ in_bit <- (RA)[63]
+ in_bits <- 0b1 || (RA)[0:62]
else
in_bits <- 0b0 || in_bits[0:62]
# walk the binary tree in `tree` from parent to the selected child
RC_val = int("1" + rev_input_bits, 2)
if expected_RS is None:
expected_RS = RC_val >> decoded_bits_len
- lst = list(SVP64Asm([f"pcdec. 4,6,{RB},5,0"]))
+ lst = list(SVP64Asm([f"pcdec. 4,{RB},6,5,0"]))
gprs = [0] * 32
gprs[6] = RA_val
if RB: