aboutsummaryrefslogtreecommitdiff
path: root/rtl/src/data_reg.v
blob: 1b21a4e902cc19c146c809d52a469d553f80035f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// data reg:
// Stores output of memory unit for one more cycle.

module data_reg (
  input clk,
  input rstn,

  input [31:0] data_in,
  output reg [31:0] data_buf
);

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

endmodule