From: Luke Kenneth Casson Leighton Date: Tue, 25 Jun 2019 11:05:32 +0000 (+0100) Subject: whoops correct elwidth pseudocode X-Git-Tag: convert-csv-opcode-to-binary~4452 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc510e90a8c75e9eacd2e53db5e471bff57601e2;p=libreriscv.git whoops correct elwidth pseudocode --- diff --git a/simple_v_extension/abridged_spec.mdwn b/simple_v_extension/abridged_spec.mdwn index 9a70f0b7c..22310985c 100644 --- a/simple_v_extension/abridged_spec.mdwn +++ b/simple_v_extension/abridged_spec.mdwn @@ -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 diff --git a/simple_v_extension/specification.mdwn b/simple_v_extension/specification.mdwn index f1297b542..84d5f5fca 100644 --- a/simple_v_extension/specification.mdwn +++ b/simple_v_extension/specification.mdwn @@ -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