-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSevenSegmentEncoder.v
59 lines (41 loc) · 1.41 KB
/
SevenSegmentEncoder.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<<<<<<< HEAD
module SevenSegmentEncode(
input [7:0]OutPortdata,
output reg [15:0]encodedValue
);
always @ (*) begin
case (OutPortdata)
8'h80 : encodedValue <= 16'b0111111100000000;
8'h40 : encodedValue <= 16'b0110011000000000;
8'h20 : encodedValue <= 16'b0101101100000000;
8'h10 : encodedValue <= 16'b0000011000000000;
8'h08 : encodedValue <= 16'b0000000001111111;
8'h04 : encodedValue <= 16'b0000000001100110;
8'h02 : encodedValue <= 16'b0000000001011011;
8'h01 : encodedValue <= 16'b0000000000000110;
8'h55 : encodedValue <= 16'b0110110101101101;
default : encodedValue <= 16'b0111011100111000; // only shows up in wrong case (0xAL)
endcase
end
endmodule
=======
module SevenSegmentEncode(
input [7:0]OutPortdata,
output reg [15:0]encodedValue
);
always @ (*) begin
case (OutPortdata)
8'h80 : encodedValue <= 16'b0111111100000000;
8'h40 : encodedValue <= 16'b0110011000000000;
8'h20 : encodedValue <= 16'b0101101100000000;
8'h10 : encodedValue <= 16'b0000011000000000;
8'h08 : encodedValue <= 16'b0000000001111111;
8'h04 : encodedValue <= 16'b0000000001100110;
8'h02 : encodedValue <= 16'b0000000001011011;
8'h01 : encodedValue <= 16'b0000000000000110;
8'h55 : encodedValue <= 16'b0110110101101101;
default : encodedValue <= 16'b0111011100111000; // only shows up in wrong case (0xAL)
endcase
end
endmodule
>>>>>>> abf1946135971059fde38dd2cf2c5c04262bbd51