1 2 3 4 5 6 7 8 9 10 11 12 13 14
module alu_result_reg ( input clk, input rstn, input [31:0] alu_result_in, output reg [31:0] alu_result_buf ); always @ (posedge clk) begin if (!rstn) alu_result_buf <= 32'b0; else alu_result_buf <= alu_result_in; end endmodule