논리회로설계실험 OR gate 코드와 Half Adder 코드
- 최초 등록일
- 2010.12.22
- 최종 저작일
- 2010.12
- 5페이지/
한컴오피스
- 가격 3,000원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
2010학기 논리회로설계실험 과제물로 직접 코딩한 레포트 입니다. 전가산기를 구성하기 위해 필요했던 이전시간에 작성했던 OR gate 코드와 Half Adder 코드 도 첨가했습니다. A받은 자료입니다.
목차
1.HDL 코드
2. 테스트벤치 코드
3.결과파형
본문내용
1.HDL 코드
전가산기를 구성하기 위해 필요했던 이전시간에 작성했던 OR gate 코드와 Half Adder 코드 도 첨가했습니다.
※OR GATE
library IEEE;
use IEEE.std_logic_1164.all;
entity or_gate is
port(a : in std_logic;
b : in std_logic;
f : out std_logic
);
end or_gate;
architecture behave of or_gate is
begin
f <= a or b;
end behave;
※half_adder
library IEEE;
use IEEE.std_logic_1164.all;
entity half_adder is
port(x, y : in std_logic;
s, c : out std_logic
);
end half_adder;
architecture behave of half_adder is
begin
process(x, y)
begin
if x=`1` and y=`1` then
c <= `1`;
else
c <= `0`;
end if;
end process;
process(x, y)
begin
if x=y then
s <= `0`;
else
s <= `1`;
end if;
end process;
end behave;
※Full_adder (structural modeling)
library ieee;
참고 자료
없음