سلام
دوستان چرا برنامه زیر کامپایل نمی شه و error می ده اشکال از چیه...؟؟؟
LIBRARY IEEE;
use ieee.std_logic_1164.all;
entity rrr is
port( push:in std_logic;
pushh:in std_logic;
q
ut bit_vector(13 downto 0));
end;
architecture ffff of rrr is
begin
process(push,pushh)
variable cnt: integer range 0 to 9:=0;
begin
if (push'event and push='1'and cnt<10 )then
cnt:=cnt+1;
elsif(pushh'event and pushh='1'and cnt>1 )then
cnt:=cnt-1;
end if;
case cnt is
when 1=> q<="00000000000110";
when 2=> q<="00000001011011";
when 3=> q<="00000001001111";
when 4=> q<="00000001100110";
when 5=> q<="00000001101101";
when 6=> q<="00000001111100";
when 7=> q<="00000000000111";
when 8=> q<="00000001111111";
when 9=> q<="00000001100111";
when others=>null;
end case;
end process ;
end;
دوستان چرا برنامه زیر کامپایل نمی شه و error می ده اشکال از چیه...؟؟؟
LIBRARY IEEE;
use ieee.std_logic_1164.all;
entity rrr is
port( push:in std_logic;
pushh:in std_logic;
q

end;
architecture ffff of rrr is
begin
process(push,pushh)
variable cnt: integer range 0 to 9:=0;
begin
if (push'event and push='1'and cnt<10 )then
cnt:=cnt+1;
elsif(pushh'event and pushh='1'and cnt>1 )then
cnt:=cnt-1;
end if;
case cnt is
when 1=> q<="00000000000110";
when 2=> q<="00000001011011";
when 3=> q<="00000001001111";
when 4=> q<="00000001100110";
when 5=> q<="00000001101101";
when 6=> q<="00000001111100";
when 7=> q<="00000000000111";
when 8=> q<="00000001111111";
when 9=> q<="00000001100111";
when others=>null;
end case;
end process ;
end;
دیدگاه