논리회로설계실험 메모리 설계
- 최초 등록일
- 2010.12.22
- 최종 저작일
- 2010.12
- 3페이지/
한컴오피스
- 가격 3,000원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
2010학기 논리회로설계실험 과제물로 직접 코딩한 레포트 입니다. A받은 자료입니다.
목차
1.VHDL 코드
2. 테스트벤치
3. 파형
4. 고찰
본문내용
<메모리 설계>
1.VHDL 코드
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity ram is
port( ce, rd, wr : in std_logic;
address : in std_logic_vector( 3 downto 0);
out_data : out std_logic_vector(3 downto 0);
in_data : in std_logic_vector( 3 downto 0));
end ram;
architecture behave of ram is
type ram_word is array( 0 to 15 ) of std_logic_vector( 3 downto 0);
signal ram_table : ram_word := ("0000", "0000","0000","0000","0000", "0000",
"0000","0000","0000","0000","0000", "0000",
"0000","0000","0000","0000");
begin
process(ce, rd, wr, address, in_data)
begin
if ce = `0` then
if wr = `0` then
ram_table( conv_integer(address) ) <= in_data;
out_data <= (others => `0`);
elsif rd = `0` then
out_data <= ram_table( conv_integer(address) );
end if;
end if;
end process;
end behave;
참고 자료
없음