OpenCores
URL https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk

Subversion Repositories theia_gpu

[/] [theia_gpu/] [trunk/] [rtl/] [Module_Swizzle.v] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 152 diegovalve
`timescale 1ns / 1ps
2
 `include "aDefinitions.v"
3
 //---------------------------------------------------------------------------
4
 module Swizzle3D
5
(
6
        input wire [`WIDTH-1:0] Source0_X,
7
        input wire [`WIDTH-1:0] Source0_Y,
8
        input wire [`WIDTH-1:0] Source0_Z,
9
        input wire [`WIDTH-1:0] iOperation,
10
 
11
        output reg [`WIDTH-1:0] SwizzleX,
12
        output reg [`WIDTH-1:0] SwizzleY,
13
        output reg [`WIDTH-1:0] SwizzleZ
14
 
15
 );
16
 
17
 //wire [31:0] SwizzleX,SwizzleY,SwizzleZ;
18
 //-----------------------------------------------------
19
 always @ ( * )
20
 begin
21
        case (iOperation)
22
                        `SWIZZLE_XXX:   SwizzleX = Source0_X;
23
                        `SWIZZLE_YYY:   SwizzleX = Source0_Y;
24
                        `SWIZZLE_ZZZ:   SwizzleX = Source0_Z;
25
                        `SWIZZLE_YXZ:   SwizzleX = Source0_Y;
26
                        default:                SwizzleX =  `DATA_ROW_WIDTH'd0;
27
        endcase
28
end
29
//-----------------------------------------------------
30
 always @ ( * )
31
 begin
32
        case (iOperation)
33
                        `SWIZZLE_XXX:   SwizzleY = Source0_X;
34
                        `SWIZZLE_YYY:   SwizzleY = Source0_Y;
35
                        `SWIZZLE_ZZZ:   SwizzleY = Source0_Z;
36
                        `SWIZZLE_YXZ:  SwizzleY = Source0_X;
37
                        default:                SwizzleY =  `DATA_ROW_WIDTH'd0;
38
        endcase
39
end
40
//-----------------------------------------------------
41
 always @ ( * )
42
 begin
43
        case (iOperation)
44
                        `SWIZZLE_XXX:   SwizzleZ = Source0_X;
45
                        `SWIZZLE_YYY:   SwizzleZ = Source0_Y;
46
                        `SWIZZLE_ZZZ:   SwizzleZ = Source0_Z;
47
                        `SWIZZLE_YXZ:  SwizzleZ = Source0_Z;
48
                        default:                SwizzleZ =  `DATA_ROW_WIDTH'd0;
49
        endcase
50
 end
51
 //-----------------------------------------------------
52
 endmodule
53
//---------------------------------------------------------------------------

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.