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

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Hardware/] [XUPV5-LX110T_SoC/] [MIPS32-Pipelined-Hw/] [src/] [Common/] [Decoder_2to4.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 ayersg
`timescale 1ns / 1ps
2 2 ayersg
/*
3
 * File         : Decoder_2to4.v
4
 * Project      : University of Utah, XUM Project MIPS32 core
5
 * Creator(s)   : Grant Ayers (ayers@cs.utah.edu)
6
 *
7
 * Modification History:
8
 *   Rev   Date         Initials  Description of Change
9
 *   1.0   14-Aug-2012  GEA       Initial design.
10
 *
11
 * Standards/Formatting:
12
 *   Verilog 2001, 4 soft tab, wide column.
13
 *
14
 * Description:
15 3 ayersg
 *   A simple 2-to-4 line single bit decoder. Accepts a two bit number
16
 *   and sets one of four outputs high based on that number.
17
 *
18
 *   Mapping:
19
 *      00  ->  0001
20
 *      01  ->  0010
21
 *      10  ->  0100
22 2 ayersg
 *      11  ->  1000
23 3 ayersg
 */
24
module Decoder_2to4(
25
    input  [1:0] A,
26
    output reg [3:0] B
27
    );
28
 
29
    always @(A) begin
30
        case (A)
31
            2'd0 : B <= 4'b0001;
32
            2'd1 : B <= 4'b0010;
33
            2'd2 : B <= 4'b0100;
34
            2'd3 : B <= 4'b1000;
35
        endcase
36
    end
37
 
38
endmodule
39
 

powered by: WebSVN 2.1.0

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