SLAU962A December 2025 – June 2026 MSPM33C321A , MSPM33C321A-Q1
The PKCP engine is designed to perform basic mathematical operations for big number vectors stored in the PKA data RAM. The PKA data RAM uses the little endian format for all operations.
| Command | Mathematical Operation | Vector A | Vector B | Vector C | Vector D |
|---|---|---|---|---|---|
| Multiply | A x B = C | Multiplicand | Multiplier | Product | - |
| Add | A + B = C | Addend | Addend | Sum | - |
| Subtract | A - B = C | Minuend | Subtrahend | Difference | - |
| AddSub | A + C - B = D | Addend | Subtrahend | Addend | Result |
| Right Shift | A >> Shift = C | Input | - | Result | - |
| Left Shift | A << Shift = C | Input | - | Result | - |
| Divide | A mod B = C A div B = D |
Dividend | Divisor | Remainder | Quotient |
| Modulo | A mod B = C | Dividend | Divisor | Remainder | - |
| Compare | A = B A < B A > B |
Input1 | Input2 | - | - |
| Copy | A = C | Input | - | Result | - |
To obtain correct results, the input vectors must meet the requirements as shown in Table 12-2. Input restrictions are not checked by the PKCP, unless otherwise noted, and the host application must check the same.
| Command | Requirements |
|---|---|
| Multiply | 0 < ALen, BLen ≤ Max_Len |
| Add | 0 < ALen, BLen ≤ Max_Len |
| Subtract | 0 < ALen, BLen ≤ Max_Len Result must be positive (A ≥ B) |
| AddSub | 0 < ALen ≤ Max_Len (All operands have ALen as length) Result must be positive ((A + C) ≥ B) |
| Right Shift | 0 < ALen ≤ Max_Len |
| Left Shift | 0 < ALen ≤ Max_Len |
| Divide, Modulo | 1 < BLen ≤ ALen ≤ Max_Len Most signifcant 32-bit word of B operand cannot be zero (this is checked) |
| Compare | 0 < ALen ≤ Max_Len (All operands have ALen as length) |
| Copy | 0 < ALen ≤ Max_Len |
The application is responsible for allocating a block of contiguous memory in the PKA Data RAM for the result vector as shown in Table 12-3.
| Command | Result Vector | Result Vector Length (32-bit words) |
|---|---|---|
| Multiply | C | ALen + BLen + 3 words |
| Add | C | Max(ALen, BLen) + 1. The extra word contains the carry-out of the addition |
| Subtract | C | Max(ALen, BLen) |
| AddSub | D | ALen + 1 |
| Right Shift | C | ALen |
| Left Shift | C | ALen + 1 (when shift value is non-zero) ALen (when shift value is zero) |
| Divide | C | Remainder = BLen + 1 |
| D | Quotient = ALen - BLen + 1 | |
| Modulo | C | Remainder = BLen + 1 |
| Compare | None | Compare updates PKA_COMPARE register |
| Copy | C | ALen |
Input vectors for an operation are always allowed to overlap in memory. gives restrictions for the overal of output and input vectors of the operation.
| Command | Result Vector | Restrictions |
|---|---|---|
| Multiply | C | No overlap with A or B vectors allowed |
| Add Subtract |
C |
May overlap with A and/or B vector, provided the start address of the C vector does not lie above the start address of the vector(s) with which it overlaps |
| AddSub | D |
May overlap with A, B and/or C vector, provided the start address of the D vector does not lie above the start address of the vector(s) with which it overlaps |
| Right Shift Left Shift |
C |
May overlap with A vector, provided the start address of the C vector does not lie above the start address of the A vector |
| Divide | C | No overlap with A, B or D vectors allowed |
| D | No overlap with A, B or D vectors allowed | |
| Modulo | C | No overlap with A or B vectors allowed |
| Compare | None | Compare does not write a result vector |
| Copy | C |
Same restrictions as for Right/Left Shift, copy of a vector to a lower address is always allowed even if source and destination overlap |