Skip to content

Commit

Permalink
Created display for the number of Hits made. Closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeohmy committed Oct 8, 2014
1 parent 1b57cbb commit 4ffb547
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions module SevenSegmentDisplay.sv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ module SevenSegmentControl
endmodule: SevenSegmentControl



/* Displays the number of hits the bomb made
*
*/
module NumberHitControl
(input logic [3:0] numberHit,
output logic [6:0] HEX)

SevenSegmentDigit numHits (numberHit, HEX, 0); // set the blank to 0 for now. I'm not sure but may need to be toggled for scoreNow.

endmodule: NumberHitControl



/* This module handles the LED control for the hit, nearMiss and miss
* It also handles the logic for the largest ship that was hit.
*/
Expand Down Expand Up @@ -271,6 +285,8 @@ module ChipInterface
logic isHit, isMiss, isNearMiss;
logic [4:0] biggestShip;

logic [3:0] numberHit;


IsSomethingWrong ISW(X, Y, SW[17], SW[15:14], KEY[0], somethingWrong);

Expand All @@ -287,6 +303,8 @@ module ChipInterface
// set the lights for hits and misses and stuffs
BombLightControl BLC (isHit, isNearMiss, isMiss, biggestShip, LEDR[17:12], LEDR[11:6], LEDR[5:0], LEDG[4:0]); // Handles all but NearMiss

NumberHitControl NHC (numberHit, HEX0);


endmodule:ChipInterface

Expand Down

0 comments on commit 4ffb547

Please sign in to comment.