2011-12-30 4 views
4

작은 프로그램을 시뮬레이트하려고하는데 오류 메시지가 계속 표시되고 이유를 파악하지 못했습니다.구문 오류가있는 프로세스

line 131 error near process 

line 132 error near behavioral ; expected type void 

의 선 :

오류 메시지는 내가 시간이를 해결하기 위해 노력했다

130 end if; 
131 end process; 
132  end Behavioral; 

나는 여전히 어떤 단서를 가지고 있지 않습니다.

전체 코드 :

use IEEE.STD_LOGIC_1164.ALL; 
use IEEE.STD_LOGIC_ARITH.ALL; 
use IEEE.STD_LOGIC_UNSIGNED.ALL; 

---- Uncomment the following library declaration if instantiating 
---- any Xilinx primitives in this code. 
--library UNISIM; 
--use UNISIM.VComponents.all; 

entity kuutonen is 
    Port (A1 : in STD_LOGIC; 
      B1 : in STD_LOGIC; 
      clk : in STD_LOGIC; 
      A : out STD_LOGIC; 
      B : out STD_LOGIC; 
      C : out STD_LOGIC; 
      D : out STD_LOGIC; 
      E : out STD_LOGIC; 
      F : out STD_LOGIC; 
      G : out STD_LOGIC); 
end kuutonen; 

architecture Behavioral of kuutonen is 
    signal tmp : std_logic_vector (2 downto 0); 
begin 

    process (clk) 
    begin 
     if(tmp = "110")then 
      tmp <= "000"; 
     end if; 

     if (A1 = '0' and B1 = '0') then 
      if (tmp ="000") then 
       A <= '1'; 
       B <= '0'; 
       C <= '0'; 
       D <= '0'; 
       E <= '0'; 
       F <= '0'; 
       G <= '0'; 
       tmp <= tmp + 1; 
      end if; 

      if (tmp ="001")then 
       B <= '1'; 
       A <= '0'; 
       C <= '0'; 
       D <= '0'; 
       E <= '0'; 
       F <= '0'; 
       G <= '0'; 
       tmp <= tmp + 1; 
      end if; 

      if (tmp ="010")then 
       C <= '1'; 
       B <= '0'; 
       A <= '0'; 
       D <= '0'; 
       E <= '0'; 
       F <= '0'; 
       G <= '0'; 
       tmp <= tmp + 1; 
      end if; 

      if (tmp ="011")then 
       D <= '1'; 
       B <= '0'; 
       C <= '0'; 
       A <= '0'; 
       E <= '0'; 
       F <= '0'; 
       G <= '0'; 
       E <= '1'; 

       if (tmp ="100")then 
        E <= '1'; 
        B <= '0'; 
        C <= '0'; 
        D <= '0'; 
        A <= '0'; 
        F <= '0'; 
        G <= '0'; 
        tmp <= tmp+1; 
       end if; 

       if (tmp ="101")then 
        F <= '1'; 
        B <= '0'; 
        C <= '0'; 
        D <= '0'; 
        E <= '0'; 
        A <= '0'; 
        G <= '0'; 
        tmp <= tmp+1; 
       end if; 

       if (tmp ="110")then 
        G <= '1'; 
        B <= '0'; 
        C <= '0'; 
        D <= '0'; 
        E <= '0'; 
        F <= '0'; 
        A <= '0'; 
       end if; 

     end if; 
    end process; 
end Behavioral; 

답변

5

그냥 검사에서, 나는 그것이 인해 누락에 아마 말할 것 "종료면;" tmp = 001 및 tmp = 100의 경우 사이.

+0

나는 당신이 tmp = 011과 tmp = 100 사이에 있다고 생각합니다. 질문에 대한 편집을 제안 했으므로 문제를 수정하고 누락 된 "end if;"를 강조 표시합니다. 훨씬 선명하게. –

관련 문제