Skip to content

Commit

Permalink
Closes #3 Closes #1
Browse files Browse the repository at this point in the history
Conflicts:
	module SevenSegmentDisplay.sv
  • Loading branch information
ayeohmy committed Oct 9, 2014
2 parents d260dfe + fef5c00 commit 7121ff8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions module SevenSegmentDisplay.sv
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,40 @@ module SevenSegmentDigit

endmodule: SevenSegmentDigit

module SevenSegmentDigitTester

(input logic [6:0] segment,
output logic [3:0] bcd,
output logic blank);

initial begin
$monitor($time,, "bcd = %b, segment = %b, blank = %b",bcd,segment,blank);
bcd = 4'b0000;
blank = 0;
// blank 0, valid number
#10 bcd = 4'b0000;
#10 bcd = 4'b0111;
#10 bcd = 4'b0101;

// blank 1, valid number
// pulse blank
#10 blank = 1;
#10 blank = 0;

// blank 0, not valid number
#10 bcd = 4'b1111;
#10 bcd = 4'b1011;

// blank 1, not valid number
// pulse blank
#10 blank = 1;
#10 blank = 0;

end
endmodule: SevenSegmentDigitTester




/* Controls the LED Number Display. It takes in a HEX (which number display) to display to
* and displays that number sent into there (BCD_). The turn_on tells whether the 'blank' should be turned on or not
Expand Down Expand Up @@ -126,7 +160,11 @@ module IsSomethingWrong

always_comb begin
if(scoreThis) begin
<<<<<<< HEAD
if ((X < 1) || (X > 10) || (Y < 1) || (Y > 10))
=======
if((X>0) && (X<11) && (Y>0) && (Y<11)) // OR ((X < 0) || (X > 10) || (Y < 0) || (Y > 10))
>>>>>>> fef5c00f163b81095b5645bcdede7116907b0655
somethingWrong = 1;
else if(bigLeft == 2'b11)
somethingWrong = 1;
Expand Down

0 comments on commit 7121ff8

Please sign in to comment.