summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_shuffle.sv
blob: c52ef25e9d5ab637a5cff9b3c86f3905c23d0eeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
`include "gfx/gfx_defs.sv"

module gfx_shuffle
(
	input  logic    clk,

	input  vec4     a,
	                b,
	input  vec_mask select,
	input  logic    stall,

	output vec4     out
);

	always_ff @(posedge clk)
		if (!stall)
			for (integer i = 0; i < `FLOATS_PER_VEC; ++i)
				out[i] <= select[i] ? b[i] : a[i];

endmodule