-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🔨 Fixed display decoder * ✨ Finalizing code for FPGA
- Loading branch information
1 parent
c4564cb
commit 28b89c5
Showing
5 changed files
with
148 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
module DisplayDecoder(in, out); | ||
input [3:0] in; | ||
output [6:0] out; | ||
input [3:0] in; | ||
output reg [6:0] out; | ||
|
||
reg [6:0] display7; | ||
|
||
assign out = display7; | ||
|
||
always @(in) | ||
case(in) | ||
0 : display7 = 7'b0000001; | ||
1 : display7 = 7'b1001111; | ||
2 : display7 = 7'b0010010; | ||
3 : display7 = 7'b0000110; | ||
4 : display7 = 7'b1001100; | ||
5 : display7 = 7'b0100100; | ||
6 : display7 = 7'b0100000; | ||
7 : display7 = 7'b0001111; | ||
8 : display7 = 7'b0000000; | ||
9 : display7 = 7'b0000100; | ||
default : display7 = 7'b1111111; | ||
always @(in) begin | ||
case (in) | ||
0 : out = 7'b1000000; | ||
1 : out = 7'b1111001; | ||
2 : out = 7'b0100100; | ||
3 : out = 7'b0110000; | ||
4 : out = 7'b0011001; | ||
5 : out = 7'b0010010; | ||
6 : out = 7'b0000010; | ||
7 : out = 7'b1111000; | ||
8 : out = 7'b0000000; | ||
9 : out = 7'b0010000; | ||
default : out = 7'b1111111; | ||
endcase | ||
end | ||
endmodule |