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

module transpose
(
	input  mat4 in,
	output mat4 out
);

	integer i, j;

	// Esto no tiene costo en hardware, es un renombramiento de señales
	always_comb
		for (i = 0; i < `VECS_PER_MAT; ++i)
			for (j = 0; j < `FLOATS_PER_VEC; ++j)
				out[i][j] = in[j][i];

endmodule