whoops correct elwidth pseudocode
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 Jun 2019 11:05:32 +0000 (12:05 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 Jun 2019 11:05:32 +0000 (12:05 +0100)
simple_v_extension/abridged_spec.mdwn
simple_v_extension/specification.mdwn

index 9a70f0b7cbc737132cd7968f41e54cbfb38f5170..22310985c8bbebe971bd501fe3b722a0106ec287 100644 (file)
@@ -747,14 +747,11 @@ and width-extending works:
     } el_reg_t;
 
     bw(elwidth):
-        if elwidth == 0:
-            return xlen
-        if elwidth == 1:
-            return xlen / 2
-        if elwidth == 2:
-            return xlen * 2
+        if elwidth == 0: return xlen
+        if elwidth == 1: return 8
+        if elwidth == 2: return 16
         // elwidth == 3:
-        return 8
+        return 32
 
     get_max_elwidth(rs1, rs2):
         return max(bw(int_csr[rs1].elwidth), # default (XLEN) if not set
index f1297b5425278705e0fab9c6efb419ce7074d47e..84d5f5fca804b7d720c344c64e1aaef12ecf65ae 100644 (file)
@@ -1631,14 +1631,11 @@ rd bitwidths).  The pseudo-code is therefore as follows:
     } el_reg_t;
 
     bw(elwidth):
-        if elwidth == 0:
-            return xlen
-        if elwidth == 1:
-            return xlen / 2
-        if elwidth == 2:
-            return xlen * 2
+        if elwidth == 0: return xlen
+        if elwidth == 1: return 8
+        if elwidth == 2: return 16
         // elwidth == 3:
-        return 8
+        return 32
 
     get_max_elwidth(rs1, rs2):
         return max(bw(int_csr[rs1].elwidth), # default (XLEN) if not set