K
kipman725
Guest
Hello I'm trying to make a pong game I made the following module, it
takes input from counters that increment to 766 in the x direction
then reset and increment one in the y untill y reaches 512. There is
another module generating Horizontal and vertical sync from this.
This particular module is ment to be generating x and y position
counters for the 640*480 play area and also an output that is high
when the current position in the frame is in the play area, thereby
simplifying the actual game logic. The problem is that I get
"Warning: Following 20 pins have nothing, GND, or VCC driving datain
port" and no logic is produced for this module. It acts like the x
and y position counters for the frame can never meet the conditions of
the if statments!?!?!
My code is probobly horible I am self taught and quite inexperianced.
I am using quartus 8.1 to compile this:
--Game Position Counters
--640*480 Pix play feild
library ieee ;
use ieee.std_logic_1164.all;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
USE ieee.std_logic_unsigned.ALL;
use work.all;
entity gpc is
port( clk: in std_logic;
x : in std_logic_vector (9 DOWNTO 0); -- Frame x position
y : in std_logic_vector (8 DOWNTO 0); -- Frame y position
xgame : out std_logic_vector (9 DOWNTO 0); --Game x position
ygame : out std_logic_vector (8 DOWNTO 0); --Game y position
disable: out std_logic --Turns off r,g,b when not in play feild
);
END gpc;
ARCHITECTURE behav of gpc is
SIGNAL xgame_temp : std_logic_vector (9 DOWNTO 0);
SIGNAL ygame_temp : std_logic_vector (8 DOWNTO 0);
SIGNAL px, py : std_logic;
begin
process(clk, x, y)
begin
if (clk='1' and clk'event) then -- rising edge triggered
if (x>71 and x<712) then -- y counter and range check
xgame_temp <= (xgame_temp + 1);
px <= '1'; -- x play area indicator
else
px <= '0';
xgame_temp <= "0000000000"; -- reset
end if;
if (y>16 and y<497) then -- y counter and range check
if (x = 713) then -- Only inc y play at end of line scan
ygame_temp <= (ygame_temp + 1);
end if;
py <= '1';
else
py <= '0';
ygame_temp <= "000000000"; -- reset
end if;
end if;
end process;
disable <= (py nand px); -- only go low if no disables
xgame <= xgame_temp;
ygame <= ygame_temp;
END behav;
takes input from counters that increment to 766 in the x direction
then reset and increment one in the y untill y reaches 512. There is
another module generating Horizontal and vertical sync from this.
This particular module is ment to be generating x and y position
counters for the 640*480 play area and also an output that is high
when the current position in the frame is in the play area, thereby
simplifying the actual game logic. The problem is that I get
"Warning: Following 20 pins have nothing, GND, or VCC driving datain
port" and no logic is produced for this module. It acts like the x
and y position counters for the frame can never meet the conditions of
the if statments!?!?!
My code is probobly horible I am self taught and quite inexperianced.
I am using quartus 8.1 to compile this:
--Game Position Counters
--640*480 Pix play feild
library ieee ;
use ieee.std_logic_1164.all;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
USE ieee.std_logic_unsigned.ALL;
use work.all;
entity gpc is
port( clk: in std_logic;
x : in std_logic_vector (9 DOWNTO 0); -- Frame x position
y : in std_logic_vector (8 DOWNTO 0); -- Frame y position
xgame : out std_logic_vector (9 DOWNTO 0); --Game x position
ygame : out std_logic_vector (8 DOWNTO 0); --Game y position
disable: out std_logic --Turns off r,g,b when not in play feild
);
END gpc;
ARCHITECTURE behav of gpc is
SIGNAL xgame_temp : std_logic_vector (9 DOWNTO 0);
SIGNAL ygame_temp : std_logic_vector (8 DOWNTO 0);
SIGNAL px, py : std_logic;
begin
process(clk, x, y)
begin
if (clk='1' and clk'event) then -- rising edge triggered
if (x>71 and x<712) then -- y counter and range check
xgame_temp <= (xgame_temp + 1);
px <= '1'; -- x play area indicator
else
px <= '0';
xgame_temp <= "0000000000"; -- reset
end if;
if (y>16 and y<497) then -- y counter and range check
if (x = 713) then -- Only inc y play at end of line scan
ygame_temp <= (ygame_temp + 1);
end if;
py <= '1';
else
py <= '0';
ygame_temp <= "000000000"; -- reset
end if;
end if;
end process;
disable <= (py nand px); -- only go low if no disables
xgame <= xgame_temp;
ygame <= ygame_temp;
END behav;