Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
authored and
unknown
committed
Jul 19, 2009
1 parent
629369b
commit 3b4b1d6
Showing
6 changed files
with
99 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
library IEEE; | ||
use IEEE.STD_LOGIC_1164.ALL; | ||
use IEEE.STD_LOGIC_ARITH.ALL; | ||
use IEEE.STD_LOGIC_UNSIGNED.ALL; | ||
|
||
entity AI is | ||
Port ( | ||
ai_enabled: in std_logic; | ||
left_pos: in integer range 0 to 430; | ||
left_pos_out: out integer range 0 to 430; | ||
ball_pos: in integer range 0 to 480 | ||
); | ||
end AI; | ||
|
||
architecture Behavioral of AI is | ||
begin | ||
|
||
process (left_pos, ball_pos, ai_enabled) | ||
begin | ||
if ai_enabled ='0' then | ||
left_pos_out <=left_pos; | ||
else | ||
left_pos_out <= ball_pos; | ||
end if; | ||
end process; | ||
|
||
end Behavioral; |
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