aboutsummaryrefslogtreecommitdiff
path: root/src/register_file_reg.v
blob: 20222d7cbc408898615d4a0365b0e75177218e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module register_file_reg (
  input clk, 
  input rstn,

  input [31:0] rd1_in, 
  input [31:0] rd2_in,
  
  output reg [31:0] rd1_buf,
  output reg [31:0] rd2_buf
);

always @ (posedge clk) begin
  if (!rstn) begin
    rd1_buf <= 32'b0;
    rd2_buf <= 32'b0;
  end else begin
    rd1_buf <= rd1_in;
    rd2_buf <= rd2_in;
  end
end

endmodule