aboutsummaryrefslogtreecommitdiff
path: root/rtl/src/data_reg.v
blob: 65fe2730e2b2d04709eb9f2e50d545742107b906 (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