-
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.
🎉 Added more displays & reset along with reset & enable controls (#14)
* ✨ Added LEDs indicators * 🚀 Updated DisplayDecoder * 💥 Added extra hex display & leds with reset & enable * ✨ Added reset & enable for encrypt & decrypt modules * ⚡ Fixed main module * added enable led --------- Co-authored-by: Ahmed Amr <[email protected]>
- Loading branch information
1 parent
234c797
commit fb46326
Showing
4 changed files
with
122 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
module DisplayDecoder(in, out); | ||
module DisplayDecoder(in, out, enable); | ||
input [3:0] in; | ||
input enable; | ||
output reg [6:0] out; | ||
|
||
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 | ||
always @(in or enable) begin | ||
if (!enable) | ||
out = 7'b1111111; | ||
else | ||
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; | ||
10 : out = 7'b0001000; | ||
11 : out = 7'b0000011; | ||
12 : out = 7'b1000110; | ||
13 : out = 7'b0100001; | ||
14 : out = 7'b0000110; | ||
15 : out = 7'b0001110; | ||
default : out = 7'b1111111; | ||
endcase | ||
end | ||
endmodule |