목차
1. 이론
2. 코드
3. 파형
4. 고찰
본문내용
< if문을 사용한 코드>
library ieee;
use ieee.std_logic_1164.all;
// entity 선언
entity DEC7 is
port (BCD : in std_logic_vector(3 downto 0); // 벡터를 사용(4bit 입력)
y : out std_logic_vector(6 downto 0)); // 벡터를 사용(7bit 출력)
end DEC7;
// architecture body
architecture a of dec7 is
begin
process(bcd) // bcd 값이 변할 때 다음의 process문 수행
begin
// if 문을 이용해서 4bi 입력값에 따라 그에 해당되는 출력값을 y에 넣어줌
if bcd ="0000" then
y <= "1111110";
library ieee;
use ieee.std_logic_1164.all;
// entity 선언
entity DEC7 is
port (BCD : in std_logic_vector(3 downto 0); // 벡터를 사용(4bit 입력)
y : out std_logic_vector(6 downto 0)); // 벡터를 사용(7bit 출력)
end DEC7;
// architecture body
architecture a of dec7 is
begin
process(bcd) // bcd 값이 변할 때 다음의 process문 수행
begin
case bcd is
참고 자료
없음