update to 2021/1/1 only last enermy control to fix

This commit is contained in:
2021-01-01 20:59:42 +08:00
parent 861fb88001
commit 38350c37bb
42 changed files with 1781 additions and 1049 deletions
+5 -3
View File
@@ -27,10 +27,12 @@ module SegAndLed(
input wire [ 15: 0 ] led_infinity,
input wire [ 7: 0 ] score_classic,
input wire [ 7: 0 ] score_infinity,
input wire [ 31: 0 ] default_num, //when mode is 0
input wire [ 31: 0 ] default_num, //when mode is 0
input wire [ 4: 0 ] timer,
input wire enable_game_classic,
input wire enable_game_infinity,
input wire player1_tank_en,
input wire player2_tank_en,
output wire [ 7: 0 ] AN ,
output wire [ 7: 0 ] Segment,
output reg [ 15: 0 ] LED
@@ -62,9 +64,9 @@ always @( posedge clk ) begin
2'b00:
num <= default_num;
2'b01:
num <= { 4'b1010, 4'b0000, score_classic[ 3: 0 ], 4'b000, 4'b1011, 4'b0000, score_classic[ 7: 4 ], 4'b000 };
num <= { 4'b1010, 3'b000, player1_tank_en, score_classic[ 3: 0 ], 4'b000, 4'b1011, 3'b000, player2_tank_en, score_classic[ 7: 4 ], 4'b000 };
2'b10:
num <= { 4'b1010, 4'b0000, score_infinity[ 3: 0 ], 4'b000, 4'b1011, score_infinity[ 7: 4 ], 3'b000, timer };
num <= { 4'b1010, 3'b000, player1_tank_en, 3'b000, player2_tank_en, score_infinity[ 3: 0 ], 4'b1011, score_infinity[ 7: 4 ], 3'b000, timer };
2'b11:
num <= { 4'b1000, 4'b1000, 4'b1000, 4'b1000, 4'b1000, 4'b1000, 4'b1000, 4'b1000 };
default num <= 0;