aboutsummaryrefslogtreecommitdiff
path: root/rtl/modexpng_microcode.vh
diff options
context:
space:
mode:
authorPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-10-21 12:46:22 +0300
committerPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-10-21 12:46:22 +0300
commit3213b3ef3c1d40dfa416b6be409cfa3d15af0930 (patch)
treef776ddb5b44a9f9e4f1b2b9da56a4b645570fdb1 /rtl/modexpng_microcode.vh
parent1e3303286bdb0d400d78d9d8b0aa90b29949c4a3 (diff)
Added "MERGE_LH" micro-operation. To be able to do Garner's formula we need
regular (not modular) multiplication. We're doing this by telling the modular multiplier to stop after the "square" step, which computes A*B. The problem is that the multiplier stores the lower part of the product in the internal bank L and the upper part in the internal bank H, but we need to be able to do operations on the product as a whole. MERGE_LH that combines the two halves of the product into one bank.
Diffstat (limited to 'rtl/modexpng_microcode.vh')
-rw-r--r--rtl/modexpng_microcode.vh4
1 files changed, 4 insertions, 0 deletions
diff --git a/rtl/modexpng_microcode.vh b/rtl/modexpng_microcode.vh
index 3493e26..47cdeb2 100644
--- a/rtl/modexpng_microcode.vh
+++ b/rtl/modexpng_microcode.vh
@@ -78,6 +78,10 @@ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_PROPAGATE_CARRIES = 5'd12;
* source and destination WIDE are don't care
*/
+localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_MERGE_LH = 5'd13;
+
+localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_REGULAR_MULTIPLY = 5'd14;
+
localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_LADDER_INIT = 5'd16;
localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_LADDER_STEP = 5'd17;
/* CRT is don't care