VHDL을 이용한 State_machine 설계
- 최초 등록일
- 2010.10.16
- 최종 저작일
- 2008.03
- 6페이지/ 한컴오피스
- 가격 1,000원
소개글
VHDL을 이용하여 State_machine 설계하였고, Modelsim과 synplify를 이용하여 시뮬레이션 및 합성을 실시하였습니다.
목차
1. 본문 coding
2. Testbench coding
3. Simulation(Modelsim)
4. Simulation(synplify)
본문내용
응용논리회로설계 State_machine
모든 코딩은 ultraedit32를 이용하여 코딩하였으며, 시뮬레이션은 modelsim 6.0과 synplify 8.5를 이용하였습니다.
1. 본문 coding
Library IEEE;
use ieee.std_logic_1164.all; -- libarary
use ieee.std_logic_unsigned.all; -- library
entity state_machine is
port( CLK : in std_logic; -- 1bit input port
RST : in std_logic; -- 1bit input port
X : in std_logic; -- 1bit input port
Y : in std_logic; -- 1bit input port
LED1 : out std_logic; -- output port
LED2 : out std_logic; -- output port
STATE : out std_logic_vector(1 downto 0) --2bit outport
);
end state_machine;
architecture BEHAVE of state_machine is
constant S0 : std_logic_vector (1 downto 0) := "00" ; -- constant 선언
constant S1 : std_logic_vector (1 downto 0) := "01" ;
constant S2 : std_logic_vector (1 downto 0) := "10" ;
constant S3 : std_logic_vector (1 downto 0) := "11" ;
signal tmp_state : std_logic_vector(1 downto 0); -- signal 선언
참고 자료
디지털 시스템 설계를 위한 VHDL / 김영철, 정연모, 조중휘, 홍윤식 공저 / 홍릉과학출판사