[vhdl]신호등 제어하는 코딩 (vhdl)
- 최초 등록일
- 2005.11.11
- 최종 저작일
- 2005.06
- 5페이지/ 한컴오피스
- 가격 1,000원
소개글
디지털시스템설계 시간에 실습으로 vhdl언어를 이용하여 신호등제어하는 것을 코딩한 것입니다.
highway와 farm road가 교차하는 지점에 대한 신호등의 제어기 설계
farm road에 차가 대기하고 있음은 car검출기에 의하여 검출됨
초기적으로 hiway 방향으로 greem신호를 출력하는데 tl 시간이 경과하면 car 검출 신호를 조사하여 검출되면 hiway yellow mode로 전환하나, 검출되지 않으면 유진한다.
......
이것을 바탕으로 코딩한 것입니다.
목차
traffic_driver
traffic_control
traffic_tb
본문내용
library ieee;
use ieee.std_logic_1164.all, ieee.numeric_std.all;
entity traffic_control is
port(clk, reset, car : IN std_logic;
led : OUT UNSIGNED(3 downto 0));
end traffic_control;
architecture rtl of traffic_control is
signal car_sync : std_logic;
signal TL : std_logic;
signal ST : integer range 0 to 3;
signal NS : integer range 0 to 3;
signal count : UNSIGNED(3 downto 0);
signal led_reg : UNSIGNED(3 downto 0);
signal clk_1s : UNSIGNED(19 downto 0);
begin
led <= led_reg;
process(ST, count, car_sync)
begin
case ST is
when 0 => led_reg <= "1100"; TL <= `1`; --FarmLoad =
참고 자료
없음