From 3213b3ef3c1d40dfa416b6be409cfa3d15af0930 Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Mon, 21 Oct 2019 12:46:22 +0300 Subject: 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. --- rtl/modexpng_microcode.vh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rtl/modexpng_microcode.vh') 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 -- cgit v1.2.3