논리회로설계실험_다양한 가산기
- 최초 등록일
- 2010.04.10
- 최종 저작일
- 2010.04
- 13페이지/ 한컴오피스
- 가격 1,000원
소개글
논리회로설계실험_다양한 가산기
목차
1.반가산기 (Half Adder) : Behavioral Modeling
2. 전가산기 (Full Adder) : Structural Modeling (OR gate + Half Adder)
3. 전가산기 : Behavioral Modeling
◎실습의 결론 및 고찰
본문내용
1.반가산기 (Half Adder) : Behavioral Modeling
1)HDL코드
library ieee;
use ieee.std_logic_1164.all;
entity HA is
port(X,Y : in std_logic;
s,c : out std_logic);
end HA;
architecture rtl of HA is
begin
process (X,Y)
begin
if x=`0` and y=`0` then
c<=`0`;
s<=`0`;
elsif x=`1` and y=`1` then
c<=`1`;
s<=`0`;
else
c<=`0`;
s<=`1`;
end if;
end process;
end rtl;
위의 동작적 모델링 방법이외에 데이터플로우형 설계도 가능하다. 이는
s<=x xor y;
c<=x and y;
로 설계가능하다. 이는 반가산기의 내부구성이 다음 그림과 같이 표현되기 때문이다.
다음으로 동작적 모델링 설계에서 process의 구성을 여러 가지 방법으로 할 수 있다. 간단히 몇 가지만 살펴보자.
if(x=y)then
s<=`0`;
c<=`0`;
if(x=`1` and y=`1`)then
c<=`1`;
end if;
else
s<=`1`;
c<=`0`;
end if;
if(x=y)then
s<=`0`;
else
s<=`1`;
end if;
if (x=`1` and y=`1`) then
c<=`1`;
else
c<=`0`;
end if;
반가산기 진리표
참고 자료
없음