qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 3/4] target/riscv: support vector extension csr


From: Jim Wilson
Subject: Re: [PATCH v5 3/4] target/riscv: support vector extension csr
Date: Wed, 26 Feb 2020 12:16:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/21/20 1:45 AM, LIU Zhiwei wrote:
+/* Vector Fixed-Point round model */
+#define FSR_VXRM_SHIFT      9
+#define FSR_VXRM            (0x3 << FSR_VXRM_SHIFT)
+
+/* Vector Fixed-Point saturation flag */
+#define FSR_VXSAT_SHIFT     8
+#define FSR_VXSAT           (0x1 << FSR_VXSAT_SHIFT)

These bits have been moved into the new VCSR register. And the offsets are wrong because these bits are no longer above the FP status bits in the FCSR. So this needs to be rvv 0.7.1 specific.

+/* User Vector CSRs */
+#define CSR_VSTART          0x008
+#define CSR_VXSAT           0x009
+#define CSR_VXRM            0x00a
+#define CSR_VL              0xc20
+#define CSR_VTYPE           0xc21

This is missing two new CSRs, VCSR and VLENB.

+    /* loose check condition for fcsr in vector extension */
+    if ((csrno == CSR_FCSR) && (env->misa & RVV)) {
+        return 0;
+    }

This is wrong for the current spec, because the vector status bits aren't in the FCSR anymore. So this also needs to be rvv 0.7.1 specific.

Jim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]