]> Witch of Git - minecraft-eda/blob - example/seg7.sv
Change genlib to generate or/nor clauses
[minecraft-eda] / example / seg7.sv
1 module seg7(input [3:0] in, output logic [6:0] out);
2
3 // -0-
4 // 5| |1
5 // |-6-|
6 // 4| |2
7 // -3-
8 // --- --- --- --- --- ---
9 // | | | | | | | | | |
10 // | | | --- ---| ---| --- |--- |
11 // | | | | | | | | | |
12 // --- --- --- --- ---
13 // --- --- --- --- --- ---
14 // | | | | | | | | | | |
15 // |---| ---| |---| |--- | ---| |--- |---
16 // | | | | | | | | | | | |
17 // --- --- --- --- --- ---
18
19 always @* case (in)
20 4'h0: out = 7'b0111111;
21 4'h1: out = 7'b0000110;
22 4'h2: out = 7'b1011011;
23 4'h3: out = 7'b1001111;
24 4'h4: out = 7'b1100110;
25 4'h5: out = 7'b1101101;
26 4'h6: out = 7'b1111101;
27 4'h7: out = 7'b0000111;
28 4'h8: out = 7'b1111111;
29 4'h9: out = 7'b1101111;
30 4'hA: out = 7'b1110111;
31 4'hB: out = 7'b1111100;
32 4'hC: out = 7'b0111001;
33 4'hD: out = 7'b1011110;
34 4'hE: out = 7'b1111001;
35 4'hF: out = 7'b1110001;
36 endcase
37
38 endmodule