blob: dc78c38c6bfbb966d5cca4d3af250f1b5a8fc438 (
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
|