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

Subversion Repositories csa

[/] [csa/] [trunk/] [quartus10/] [hex2seg.v] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 33 simon111
 
2
module hex2seg(
3
          input      [3:0] hex
4
        , output reg [7:0] seg
5
        );
6
 
7 38 simon111
 
8 33 simon111
        always @(hex)
9
                case (hex)        // hgfedcba
10
                        4'h0:seg<=~8'b00111111;
11
                        4'h1:seg<=~8'b00000110;
12
                        4'h2:seg<=~8'b01011011;
13
                        4'h3:seg<=~8'b01001111;
14
                        4'h4:seg<=~8'b01100110;
15
                        4'h5:seg<=~8'b01101101;
16
                        4'h6:seg<=~8'b01111101;
17
                        4'h7:seg<=~8'b00000111;
18
                        4'h8:seg<=~8'b01111111;
19
                        4'h9:seg<=~8'b01101111;
20
                        4'ha:seg<=~8'b01110111;
21
                        4'hb:seg<=~8'b01111100;
22
                        4'hc:seg<=~8'b00111001;
23
                        4'hd:seg<=~8'b01011110;
24
                        4'he:seg<=~8'b01111001;
25
                        4'hf:seg<=~8'b01110001;
26
                endcase
27
endmodule

powered by: WebSVN 2.1.0

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