vhdl로 ise design suite에 간단한 예제 같은걸 연습하고있습니다.


먼저 vhdl로 전가산기 코드로서


architecture behavioral of main is 

 

begin


o <= ((not a) and b) or (a and (not b));

c <= a and b;

end Behavioral;


이라고 적어넣고, synthesize -XST 와 Implement design, generate programming file 더블클릭해서 


초록색 체크 아이콘이 뜨는걸 확인했습니다.


그래서 test bench를 이용해서 시뮬레이션을 해보려고했는데


Syntax error near "<". 라는 에러문구가 뜨네요.


  constant <clock>_period : time := 10 ns;

 

BEGIN

 

-- Instantiate the Unit Under Test (UUT)

   uut: main PORT MAP (

          a => a,

          b => b,

          c => c,

          o => o

        );


   -- Clock process definitions

   <clock>_process :process

   begin

<clock> <= '0';

wait for <clock>_period/2;

<clock> <= '1';

wait for <clock>_period/2;

   end process;

 


   -- Stimulus process

   stim_proc: process

   begin

      -- hold reset state for 100 ns.

      wait for 100 ns;


      wait for <clock>_period*10;


      -- insert stimulus here 


      wait;

   end process;


END;


test bench는 따로 제가 적은게 아니고 바로 생성했을 당시 코드입니다. 진하게 밑줄 해놓은 곳이 에러가 뜨는 위치인데,


제가 따로 건드린것은 아니고 test bench 생성을 하면 바로 작성되있는 코드여서 어떤식으로 수정해야될지 모르겠습니다.


그리고 test bench에서 입력포트에 클럭을 넣을수 있는걸로 알고있는데 어느 위치에 그 명령어를 써야되는지도 알려주시면 감사드리겠습니다.