From: lkcl Date: Sat, 25 Mar 2023 19:31:18 +0000 (+0000) Subject: (no commit message) X-Git-Tag: opf_rfc_ls001_v3~70 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88054d9cfba322994633e0968932994716fa2035;p=libreriscv.git --- diff --git a/openpower/sv/rfc/ls008.mdwn b/openpower/sv/rfc/ls008.mdwn index ee365a9db..f7f11ddb8 100644 --- a/openpower/sv/rfc/ls008.mdwn +++ b/openpower/sv/rfc/ls008.mdwn @@ -123,6 +123,55 @@ Special Registers Altered: \newpage{} + +# setvl + +SVL-Form + +* setvl RT,RA,SVi,vf,vs,ms (Rc=0) +* setvl. RT,RA,SVi,vf,vs,ms (Rc=1) + +Pseudo-code: + + overflow <- 0b0 + VLimm <- SVi + 1 + # set or get MVL + if ms = 1 then MVL <- VLimm[0:6] + else MVL <- SVSTATE[0:6] + # set or get VL + if vs = 0 then VL <- SVSTATE[7:13] + else if _RA != 0 then + if (RA) >u 0b1111111 then + VL <- 0b1111111 + overflow <- 0b1 + else VL <- (RA)[57:63] + else if _RT = 0 then VL <- VLimm[0:6] + else if CTR >u 0b1111111 then + VL <- 0b1111111 + overflow <- 0b1 + else VL <- CTR[57:63] + # limit VL to within MVL + if VL >u MVL then + overflow <- 0b1 + VL <- MVL + SVSTATE[0:6] <- MVL + SVSTATE[7:13] <- VL + if _RT != 0 then + GPR(_RT) <- [0]*57 || VL + if ((¬vs) & ¬(ms)) = 0 then + # set requested Vertical-First mode, clear persist + SVSTATE[63] <- vf + SVSTATE[62] <- 0b0 + +Special Registers Altered: + + CR0 (if Rc=1) + +------------- + +\newpage{} + + # SVL-Form Add the following to Book I, 1.6.1, SVL-Form @@ -141,7 +190,20 @@ Add the following to Book I, 1.6.1, SVL-Form Add the following to Book I, 1.6.2 ``` - + ms (23) + Field used in Simple-V to specify whether MVL (MAXVL in the SVSTATE SPR) + is to be set + Formats: SVL + vf (25) + Field used in Simple-V to specify whether "Vertical" Mode is set + (VF in the SVSTATE SPR) + Formats: SVL + vs (24) + Field used in Simple-V to specify whether VL (in the SVSTATE SPR) is to be set + Formats: SVL + SVi (16:22) + Simple-V immediate field for setting VL or MVL (VL, MAXVL in the SVSTATE SPR) + Formats: SVL ```