동기카운터 클럭
본 자료는 3페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
해당 자료는 3페이지 까지만 미리보기를 제공합니다.
3페이지 이후부터 다운로드 후 확인할 수 있습니다.

본문내용

n
if divi'event and divi='1' then
cnt_out <= cnt_out+1;
end if;
else cnt_out <="0000";
end if;
end process;
end behave;
SYNC
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity sync_cnt is
port(
clk0, rst : in std_logic;
out0, out1, out2, out3 : buffer std_logic_vector(3 downto 0)
);
end sync_cnt;
architecture behave of sync_cnt is
component cnt0
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt1
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt2
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt3
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
begin
u0 : cnt0
port map(clk=>clk0, rst=>rst, cnt_out=>out0);
u1 : cnt1
port map(clk=>clk0, rst=>rst, cnt_out=>out1);
u2 : cnt2
port map(clk=>clk0, rst=>rst, cnt_out=>out2);
u3 : cnt3
port map(clk=>clk0, rst=>rst, cnt_out=>out3);
end behave;
tb_SYNC
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity sync_cnt is
port(
clk0, rst : in std_logic;
out0, out1, out2, out3 : buffer std_logic_vector(3 downto 0)
);
end sync_cnt;
architecture behave of sync_cnt is
component cnt0
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt1
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt2
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
component cnt3
port(
clk, rst : in std_logic;
cnt_out : buffer std_logic_vector(3 downto 0)
);
end component;
begin
u0 : cnt0
port map(clk=>clk0, rst=>rst, cnt_out=>out0);
u1 : cnt1
port map(clk=>clk0, rst=>rst, cnt_out=>out1);
u2 : cnt2
port map(clk=>clk0, rst=>rst, cnt_out=>out2);
u3 : cnt3
port map(clk=>clk0, rst=>rst, cnt_out=>out3);
end behave;
《 동기 카운터 》
- 비동기 카운터를 이용하여 코딩.
- 분주를 나누는 과정에서 처음 들어가는 클럭에 따라서 각 카운터에 임시신호를 만들어 클럭을 세면서 분주를 나누어서 분주는 되지만 값에서 오류발생
- 첫 10분주는 위의 방법이 맞으나 다음 100분주부터는 10분주한 신호를 임시신호를 하 나 더 선언하여 10분주 신호의 클럭에 따라 다시 10분주
- 1000분주도 마찬가지 방법.
파형
  • 가격2,300
  • 페이지수9페이지
  • 등록일2012.11.05
  • 저작시기2009.5
  • 파일형식한글(hwp)
  • 자료번호#774340
본 자료는 최근 2주간 다운받은 회원이 없습니다.
다운로드 장바구니