summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_skid_buf.sv
blob: fae57177f6cf98e5c983e43db5284a2837f2d58b (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
#(parameter 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