data/full_repos/permissive/420259327/IP/rgb_swap.v
data/verilator_xmls/c687ffb1-578c-45d4-b211-f06de0b9e98f.xml
module rgb_swap(
        input [23:0] vid_pData_in,
        input [1:0] mode,
        output [23:0] vid_pData_out
    );
    
    reg [23:0] vid;
    wire [7:0] blue =  vid_pData_in[7:0];
    wire [7:0] green =  vid_pData_in[15:8];
    wire [7:0] red =  vid_pData_in[23:16];
    
    
    always @ (vid_pData_in, mode) begin
        case (mode)
            2'b01  :
                begin
                     vid = {green,blue,red};
                end
            2'b10  :
                begin
                     vid = {blue,red,green};
                end
                
            2'b11  :
                begin
                     vid = {red,green,blue};
                end

            
            default :
                begin
                     vid = {blue,green,red};
                end
            
        endcase
        
        
    end
    
    assign vid_pData_out = vid;
    
endmodule
module rgb_swap(
        input [23:0] vid_pData_in,
        input [1:0] mode,
        output [23:0] vid_pData_out
    );

    
    reg [23:0] vid;
    wire [7:0] blue =  vid_pData_in[7:0];
    wire [7:0] green =  vid_pData_in[15:8];
    wire [7:0] red =  vid_pData_in[23:16];
    
    
    always @ (vid_pData_in, mode) begin
        case (mode)
            2'b01  :
                begin
                     vid = {green,blue,red};
                end
            2'b10  :
                begin
                     vid = {blue,red,green};
                end
                
            2'b11  :
                begin
                     vid = {red,green,blue};
                end

            
            default :
                begin
                     vid = {blue,green,red};
                end
            
        endcase
        
        
    end
    
    assign vid_pData_out = vid;
    
endmodule