diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-09-05 22:37:52 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-09-05 22:37:52 +0200 |
commit | 5fdee952c92c62409ca58e8d18d951dfafed3c92 (patch) | |
tree | f63dfe941ea49c093deea65c47f6a5c2257ed548 /picorv32.v | |
parent | e45cc362a7aae381bc74956b6d43eb85ee10f11d (diff) | |
download | picorv32-5fdee952c92c62409ca58e8d18d951dfafed3c92.tar.gz picorv32-5fdee952c92c62409ca58e8d18d951dfafed3c92.zip |
Added picorv32_pcpi_fast_mul MUL_CLKGATE
Diffstat (limited to 'picorv32.v')
-rw-r--r-- | picorv32.v | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1918,7 +1918,8 @@ endmodule module picorv32_pcpi_fast_mul #( parameter EXTRA_MUL_FFS = 0, - parameter EXTRA_INSN_FFS = 0 + parameter EXTRA_INSN_FFS = 0, + parameter MUL_CLKGATE = 0 ) ( input clk, resetn, @@ -1963,9 +1964,13 @@ module picorv32_pcpi_fast_mul #( always @(posedge clk) begin pcpi_insn_valid_q <= pcpi_insn_valid; - rs1_q <= rs1; - rs2_q <= rs2; - rd_q <= rd; + if (!MUL_CLKGATE || active[0]) begin + rs1_q <= rs1; + rs2_q <= rs2; + end + if (!MUL_CLKGATE || active[2]) begin + rd_q <= rd; + end end always @(posedge clk) begin |