SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
The Multiply64 function (MPY64) returns the results of multiplying two 32-bit numbers with the 64-bit result in RES1 and RES2.
The MPY64 function can perform the types of multiply shown in Table 5-21.
Data type (Multiplicand and Multiplier) | Data type (Product) | Condition |
---|---|---|
Uint32_t | Uint64_t | Product is < 264 - 1 |
Int32_t | Int64_t | Product is > -263 and < 263 - 1 |
Table 5-22 shows the operands and descriptions for the multiply function.
Register (Bit Field) | Value | Description |
---|---|---|
OP1 | User value | Multiplicand |
OP2 | User value | Multiplier |
CTL.FUNC | 8h | MPY64 |
CTL.OPTYPE |
0h = unsigned operands 1h = signed operands |
Operand sign |
RES1 | Lower 32 bits of product | Product (64-bit) |
RES2 | Upper 32 bits of product |
Status, Errors, and Overflow
There are no status, error, or overflow bits for MPY64.
Configuration
To perform an MPY64:
In the CTL register: