From: Andrey Miroshnikov Date: Sun, 5 Nov 2023 17:23:36 +0000 (+0000) Subject: Note on maddld X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7ceecf257a798dca0ba2505e0943ba0329bf0c5;p=libreriscv.git Note on maddld --- diff --git a/openpower/sv/cookbook/remap_matrix.mdwn b/openpower/sv/cookbook/remap_matrix.mdwn index 868b3bbf9..111f4b374 100644 --- a/openpower/sv/cookbook/remap_matrix.mdwn +++ b/openpower/sv/cookbook/remap_matrix.mdwn @@ -60,12 +60,11 @@ matrix. If there are no more columns in the second matrix, go back to first column (second matrix), and move to next row (first and result matrices). If there are no more rows left, result matrix has been fully computed. 4. Repeat step 2. -4. Move to the next row of the first matrix, and next column of the second matrix. This for-loop uses the indices as shown above ``` - for i in range(mat_X_num_rows): + for i in range(0, mat_X_num_rows): for k in range(0, mat_Y_num_cols): for j in range(0, mat_X_num_cols): # or mat_Y_num_rows mat_Z[i][k] += mat_X[i][j] * mat_Y[j][k] @@ -175,9 +174,11 @@ Book I, section 3.3.9): [[openpower/isa/fixedarith]] *(Need to check if first arg of svremap correct, then one shown works with ISACaller)* +``` svshape 2, 2, 3, 0, 0 svremap 31, 1, 2, 3, 0, 0, 0 sv.maddld *0, *16, *32, *0 +``` ## svshape @@ -266,6 +267,28 @@ breakdown: ## SVREMAP +``` + svremap 31, 1, 2, 3, 0, 0, 0 +``` + +Assigns the configured SVSHAPEs to the relevant operand/result registers +of the consecutive instruction/s (depending on if REMAP is set to persistent). + +## maddld - Multiply-Add Low Doubleword VA-form + +``` + sv.maddld *0, *16, *32, *0 +``` + +A standard instruction available since version 3.0 of PowerISA. + +*Temporary note:* maddld (Multiply-Add Low Doubleword) in the 3.1b version +of the PowerISA spec is in the Linux Compliancy Subset, not SFS or SFFS. +See page 1477 of the document, or page 1503 of the pdf. + +This instruction can be used as a multiply-add accumulate by setting the +third operand to be the same as the result register, which functions as +an accumulator. ## Appendix