aboutsummaryrefslogtreecommitdiff
path: root/rtl/src/alu_result_reg.v
blob: 377760ada21d45f3b4e64eb03222b5ab07df804e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// alu result reg:
// Stores alu_result for one more clock cycle.
// This is used for example on load/store, alu wb, etc.

module alu_result_reg (
  input clk, 
  input rstn,

  input [31:0] alu_result_in,
  output reg [31:0] alu_result_buf
);

always @ (posedge clk or negedge rstn) begin
  if (!rstn) alu_result_buf <= 32'b0;
  else alu_result_buf <= alu_result_in;
end

endmodule