diff options
author | Pavel V. Shatov (Meister) <meisterpaul1@yandex.ru> | 2019-10-03 16:47:39 +0300 |
---|---|---|
committer | Pavel V. Shatov (Meister) <meisterpaul1@yandex.ru> | 2019-10-03 16:47:39 +0300 |
commit | e340b1489b08905e3d8acd17686e178028de7922 (patch) | |
tree | 8804029e5fcad42a52745fe7951ac4d203ba3c35 /rtl/modexpng_microcode.vh | |
parent | 8ee5a19240722f397d55f57a426992350f8019a3 (diff) |
Added more micro-operations, also added "general worker" module. The worker is basically
a block memory data mover, but it can also do some supporting operations required for the
Garner's formula part of the exponentiation.
Diffstat (limited to 'rtl/modexpng_microcode.vh')
-rw-r--r-- | rtl/modexpng_microcode.vh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/rtl/modexpng_microcode.vh b/rtl/modexpng_microcode.vh index 1465c48..2e591e7 100644 --- a/rtl/modexpng_microcode.vh +++ b/rtl/modexpng_microcode.vh @@ -32,8 +32,19 @@ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_INPUT_TO_NARROW = 4'd2; */ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_OUTPUT_FROM_NARROW = 4'd3; +/* CRT tells from which of the dual MMM to read + * NPQ specifies the width of the operand + * AUX is don't care + * LADDER is don't care + * source and destination WIDE are don't care + */ -//localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_COPY_CRT_Y2X = 4'd0; +localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_COPY_CRT_Y2X = 4'd4; +/* CRT is don't care + * NPQ specifies the width of the operand + * AUX is don't care + * LADDER is don't care + */ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_MODULAR_MULTIPLY = 4'd8; /* CRT is don't care @@ -42,6 +53,14 @@ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_MODULAR_MULTIPLY = 4'd8; * LADDER specifies Montgomery ladder mode */ +localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_PROPAGATE_CARRIES = 4'd11; +/* CRT is don't care + * NPQ specifies the width of the operand + * AUX is don't care + * LADDER is don't care + * source and destination WIDE are don't care + */ + // CRT localparam [UOP_CRT_W -1:0] UOP_CRT_X = 1'b0; localparam [UOP_CRT_W -1:0] UOP_CRT_Y = 1'b1; |