diff options
Diffstat (limited to 'src/rtl/montprod.v')
-rw-r--r-- | src/rtl/montprod.v | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rtl/montprod.v b/src/rtl/montprod.v index 32bbdec..2ed1f5d 100644 --- a/src/rtl/montprod.v +++ b/src/rtl/montprod.v @@ -63,6 +63,7 @@ module montprod( //---------------------------------------------------------------- // Internal constant and parameter definitions. //---------------------------------------------------------------- + localparam CTRL_IDLE = 4'h0; localparam CTRL_INIT_S = 4'h1; localparam CTRL_LOOP_INIT = 4'h2; @@ -217,9 +218,11 @@ module montprod( SMUX_SHR: s_mem_new = shr_adiv2; endcase - $display("SMUX%x: %x", s_mux_reg, s_mem_new); + if (DEBUG) + $display("SMUX%x: %x", s_mux_reg, s_mem_new); end + //---------------------------------------------------------------- // reg_update // @@ -286,7 +289,8 @@ module montprod( //opa_addr will point to length-1 to get A LSB. //s_read_addr will point to length-1 q = s_mem_read_data[0] ^ (opa_data[0] & b); - $display("s_mem_read_data: %x opa_data %x b %x q %x B_bit_index_reg %x", s_mem_read_data, opa_data, b, q, B_bit_index_reg); + if (DEBUG) + $display("s_mem_read_data: %x opa_data %x b %x q %x B_bit_index_reg %x", s_mem_read_data, opa_data, b, q, B_bit_index_reg); end end @@ -296,6 +300,7 @@ module montprod( //---------------------------------------------------------------- always @* begin : loop_counter_process + loop_counter_new = loop_counter; length_m1 = length - 1'b1; loop_counter_dec = loop_counter - 1'b1; B_word_index = loop_counter[12:5]; @@ -560,7 +565,8 @@ module montprod( CTRL_EMIT_S: begin - $display("EMIT_S word_index: %d", word_index); + if (DEBUG) + $display("EMIT_S word_index: %d", word_index); if (word_index_prev == 8'h0) begin montprod_ctrl_new = CTRL_DONE; |