summaryrefslogtreecommitdiff
path: root/platform/wavelet3d/gfx_skid_buf.sv
blob: e3e524722a02cc04c861d2f97a1b76752cfe04ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module gfx_skid_buf
#(int WIDTH = 0)
(
	input  logic              clk,

	input  logic[WIDTH - 1:0] in,
	input  logic              stall,

	output logic[WIDTH - 1:0] out
);

	logic[WIDTH - 1:0] skid;

	assign out = stall ? skid : in;

	always_ff @(posedge clk)
		if (~stall)
			skid <= in;

endmodule