GD32W51x User Manual
975
.
If A
=
B, the operation result is
“
result =0x0
”
;
If A>B, the operation result is
“
result =0x1
”
;
If A<B, the operation result is
“
result =0x2
”
.
Figure 29-8. Arithmetic comparison
Operand length L
Operand A
PKCAU RAM
0x404
Operand B
0x408
...
0x400
...
0x8B4
0xA44
...
0xBD0
...
0x0,0x1 or 0x2
Offset address
input
output
Offset address
0xBD0
0≤A<2
L
, 0≤B<2
L
, result =0x0, 0x01, 0x2, 0<L≤3136.
Modular reduction
The modular reduction operation is selected by configuring MODSEL[5:0] in PKCAU_CTL
register as "001101". The operation declaration is shown in
Figure 29-9. Modular reduction
The operation result is
“
result = A mod n
”
.
Figure 29-9. Modular reduction
Modulus length M
Operand A
PKCAU RAM
0x404
Modulus n
0x408
Operand length L
0x400
...
0x8B4
0xA44
...
0xBD0
...
A mod n
...
0xBD0
Offset address
Offset address
input
output
0<L≤3136
,
0<M≤3136,
0≤A<2
L
, 0<n<2
M
, 0≤result<n.