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

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Hardware/] [XUPV5-LX110T_SoC/] [MIPS32-Pipelined-Hw/] [src/] [Common/] [Mux4.v] - Diff between revs 2 and 3

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 3
`timescale 1ns / 1ps
`timescale 1ns / 1ps
/*
/*
 * File         : Mux4.v
 * File         : Mux4.v
 * Project      : University of Utah, XUM Project MIPS32 core
 * Project      : University of Utah, XUM Project MIPS32 core
 * Creator(s)   : Grant Ayers (ayers@cs.utah.edu)
 * Creator(s)   : Grant Ayers (ayers@cs.utah.edu)
 *
 *
 * Modification History:
 * Modification History:
 *   Rev   Date         Initials  Description of Change
 *   Rev   Date         Initials  Description of Change
 *   1.0   7-Jun-2011   GEA       Initial design.
 *   1.0   7-Jun-2011   GEA       Initial design.
 *
 *
 * Standards/Formatting:
 * Standards/Formatting:
 *   Verilog 2001, 4 soft tab, wide column.
 *   Verilog 2001, 4 soft tab, wide column.
 *
 *
 * Description:
 * Description:
 *   A 4-input Mux of variable width, defaulting to 32-bit width.
 *   A 4-input Mux of variable width, defaulting to 32-bit width.
 */
 */
module Mux4 #(parameter WIDTH = 32)(
module Mux4 #(parameter WIDTH = 32)(
        input  [1:0] sel,
    input  [1:0] sel,
        input  [(WIDTH-1):0] in0, in1, in2, in3,
    input  [(WIDTH-1):0] in0, in1, in2, in3,
        output reg [(WIDTH-1):0] out
    output reg [(WIDTH-1):0] out
        );
    );
 
 
        always @(*) begin
    always @(*) begin
                case (sel)
        case (sel)
                        2'b00 : out <= in0;
            2'b00 : out <= in0;
                        2'b01 : out <= in1;
            2'b01 : out <= in1;
                        2'b10 : out <= in2;
            2'b10 : out <= in2;
                        2'b11 : out <= in3;
            2'b11 : out <= in3;
                endcase
        endcase
        end
    end
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file
 
 
 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.