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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [trunk/] [rtl/] [Module_Swizzle.v] - Diff between revs 152 and 154

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 152 Rev 154
Line 1... Line 1...
 
`timescale 1ns / 1ps
 
 `include "aDefinitions.v"
 
 //---------------------------------------------------------------------------
 
 module Swizzle3D
 
(
 
        input wire [`WIDTH-1:0] Source0_X,
 
        input wire [`WIDTH-1:0] Source0_Y,
 
        input wire [`WIDTH-1:0] Source0_Z,
 
        input wire [`WIDTH-1:0] iOperation,
 
 
 No newline at end of file
 No newline at end of file
 
        output reg [`WIDTH-1:0] SwizzleX,
 
        output reg [`WIDTH-1:0] SwizzleY,
 
        output reg [`WIDTH-1:0] SwizzleZ
 
 
 
 );
 
 
 
 //wire [31:0] SwizzleX,SwizzleY,SwizzleZ;
 
 //-----------------------------------------------------
 
 always @ ( * )
 
 begin
 
        case (iOperation)
 
                        `SWIZZLE_XXX:   SwizzleX = Source0_X;
 
                        `SWIZZLE_YYY:   SwizzleX = Source0_Y;
 
                        `SWIZZLE_ZZZ:   SwizzleX = Source0_Z;
 
                        `SWIZZLE_YXZ:   SwizzleX = Source0_Y;
 
                        default:                SwizzleX =  `DATA_ROW_WIDTH'd0;
 
        endcase
 
end
 
//-----------------------------------------------------
 
 always @ ( * )
 
 begin
 
        case (iOperation)
 
                        `SWIZZLE_XXX:   SwizzleY = Source0_X;
 
                        `SWIZZLE_YYY:   SwizzleY = Source0_Y;
 
                        `SWIZZLE_ZZZ:   SwizzleY = Source0_Z;
 
                        `SWIZZLE_YXZ:  SwizzleY = Source0_X;
 
                        default:                SwizzleY =  `DATA_ROW_WIDTH'd0;
 
        endcase
 
end
 
//-----------------------------------------------------
 
 always @ ( * )
 
 begin
 
        case (iOperation)
 
                        `SWIZZLE_XXX:   SwizzleZ = Source0_X;
 
                        `SWIZZLE_YYY:   SwizzleZ = Source0_Y;
 
                        `SWIZZLE_ZZZ:   SwizzleZ = Source0_Z;
 
                        `SWIZZLE_YXZ:  SwizzleZ = Source0_Z;
 
                        default:                SwizzleZ =  `DATA_ROW_WIDTH'd0;
 
        endcase
 
 end
 
 //-----------------------------------------------------
 
 endmodule
 
//---------------------------------------------------------------------------
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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