我被一些VHDL代码困住了。
我正在尝试编译这个:
entity ball is
port(video_on : in std_logic;
pixel_x,pixel_y : in std_logic_vector(10 downto 0);
obj3_r,obj3_g,obj3_b : out std_logic_vector (3 downto 0);
obj3_on : out std_logic);
end entity;
architecture arch of ball is
-- definimos dimension de izquierda a derecha
constant ball_l : integer :=800;
constant ball_r : integer :=815;
-- definimos dimension de arriba a abajo
constant ball_top : integer :=502;
constant ball_bottom : integer :=522;
begin
obj3_on <= '1' when (ball_l <=pixel_x) and (pixel_x <= ball_r) and (ball_top <= pixel_y) and (pixel_y <= ball_bottom) else
'0';
obj3_r <= (others => '0');
obj3_g <= "0111";
obj3_b <= (others => '0');
end arch;
Quartus II 显示此错误:无法确定运算符“<=”的定义;在使用 WHEN 语句的那一行。我不知道问题是什么。
谢谢你的帮助!!