diff options
Diffstat (limited to 'rtl/modexpng_microcode.vh')
-rw-r--r-- | rtl/modexpng_microcode.vh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rtl/modexpng_microcode.vh b/rtl/modexpng_microcode.vh index af21391..1465c48 100644 --- a/rtl/modexpng_microcode.vh +++ b/rtl/modexpng_microcode.vh @@ -17,15 +17,30 @@ localparam UOP_W = UOP_OPCODE_W + UOP_CRT_W + UOP_NPQ_W + UOP_AUX_W + UOP_LADDER // OPCODE localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_STOP = 4'd0; +/* all fields are don't care + */ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_INPUT_TO_WIDE = 4'd1; localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_INPUT_TO_NARROW = 4'd2; +/* CRT tells into which of the dual MMM to write + * NPQ specifies the width of the operand + * AUX specifies from which INPUT to read + * LADDER is don't care + * source WIDE is always don't care + * destination NARROW is don't care for _WIDE opcode and vice versa + * +*/ localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_OUTPUT_FROM_NARROW = 4'd3; //localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_COPY_CRT_Y2X = 4'd0; localparam [UOP_OPCODE_W -1:0] UOP_OPCODE_MODULAR_MULTIPLY = 4'd8; +/* CRT is don't care + * NPQ specifies the width of the operand + * AUX = AUX_2 forces B input to 1 (AUX_1 reads from source NARROW as usual) + * LADDER specifies Montgomery ladder mode + */ // CRT localparam [UOP_CRT_W -1:0] UOP_CRT_X = 1'b0; |