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 -5
View File
@@ -11,13 +11,13 @@ input clk;
input moving;
input reset_n;
input start;
input [ 9: 0 ] init_H;
input [ 9: 0 ] init_V;
input [ 10: 0 ] init_H;
input [ 10: 0 ] init_V;
input [ 1: 0 ] tank_dir;
input tank_en;
input tank_move_en;
output reg [ 9: 0 ] tank_H;
output reg [ 9: 0 ] tank_V;
output reg [ 10: 0 ] tank_H;
output reg [ 10: 0 ] tank_V;
output reg [ 2: 0 ] tank_dir_feedback;
parameter HEIGHT = 480;
@@ -86,7 +86,7 @@ always @( * ) begin: state_table
INITIAL:
next_state = STAY;
STAY, UP, DOWN, LEFT, RIGHT: begin
if ( !tank_move_en || !moving ) begin
if ( !tank_en || !tank_move_en || !moving ) begin
next_state = STAY;
end
else begin