목차
1. 2x4 디코더(복호기)
< 시뮬레이션 결과 >
< H/W 확인 >
< .ucf 파일 생성 >
< 동작 확인 >
2. 4x2 인코더(부호기)
< 시뮬레이션 결과 >
< H/W 확인 >
< .ucf 파일 생성 >
< 동작 확인 >
< 시뮬레이션 결과 >
< H/W 확인 >
< .ucf 파일 생성 >
< 동작 확인 >
2. 4x2 인코더(부호기)
< 시뮬레이션 결과 >
< H/W 확인 >
< .ucf 파일 생성 >
< 동작 확인 >
본문내용
REPORT
<2x4 디코더, 4x2 인코더>
1. 2x4 디코더(복호기)
entity decoder2x4 is
port(A : in std_logic_vector(1 downto 0);
(Y : out std_logic_vector(3 downto 0));
end decoder2x4;
architecture Behavioral of decoder2x4 is
begin
process(A)
begin
case A is
when \"00\" => Y <= \"0001\";
when \"01\" => Y <= \"0010\";
when \"10\" => Y <= \"0100\";
when \"11\" => Y <= \"1000\";
when others => Y <= \"ZZZZ\";
end case;
end process;
end Behavioral
< 시뮬레이션 결과 >
< H/W 확인 >
begin
A(1) <= \'0\'; A(0) <= \'0\'; Wait for 100 ns;
A(1) <= \'0\'; A(0) <= \'1\'; Wait for 100 ns;
A(1) <= \'1\'; A(0) <= \'0\'; Wait for 100 ns;
A(1) <= \'1\'; A(0) <= \'1\'; Wait for 100 ns;
< .ucf 파일 생성 >
NET A<1> LOC=\"P67\";
NET A<0> LOC=\"P63\";
NET Y<3> LOC=\"P139\";
NET Y<2> LOC=\"P138\";
NET Y<1> LOC=\"P136\";
NET Y<0> LOC=\"P135\";
2X4 디코더(복호기)
A(1)
A(0)
Y(3)
Y(2)
Y(1)
Y(0)
0
0
0
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
< 동작 확인 >
2. 4x2 인코더(부호기)
entity encoder4x2 is
port( X : in std_logic_vector(3 downto 0);
( Y : out std_logic_vector(1 downto 0));
end encoder4x2;
architecture Behavioral of encoder4x2 is
begin
process (X) -- process 문에서 동작하는 모든 것을 써줘야함 괄호안에
begin
case X is
when \"0001\" => Y <= \"00\";
when \"0010\" => Y <= \"01\";
when \"0100\" => Y <= \"10\";
when \"1000\" => Y <= \"11\";
when others => Y <= \"ZZ\"; --ZZ는 아무것도 나오지 않는 출력을 의미
end case;
end process;
end Behavioral;
< 시뮬레이션 결과 >
< H/W 확인 >
x <= \"0001\"; Y <=\"00\" Wait for 100 ns;
x <= \"0010\"; Y <=\"01\" Wait for 100 ns;
x <= \"0100\"; Y <=\"10\" Wait for 100 ns;
x <= \"1000\"; Y <=\"11\" Wait for 100 ns;
< .ucf 파일 생성 >
NET X<3> LOC=\"P67\";
NET X<2> LOC=\"P63\";
NET X<1> LOC=\"P62\";
NET X<0> LOC=\"P61\";
NET Y<1> LOC=\"P139\";
NET Y<0> LOC=\"P138\";
2X4 디코더(복호기)
X(3)
X(2)
X(1)
X(0)
Y(1)
Y(0)
0
0
0
1
0
0
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
0
1
1
< 동작 확인 >
<2x4 디코더, 4x2 인코더>
1. 2x4 디코더(복호기)
entity decoder2x4 is
port(A : in std_logic_vector(1 downto 0);
(Y : out std_logic_vector(3 downto 0));
end decoder2x4;
architecture Behavioral of decoder2x4 is
begin
process(A)
begin
case A is
when \"00\" => Y <= \"0001\";
when \"01\" => Y <= \"0010\";
when \"10\" => Y <= \"0100\";
when \"11\" => Y <= \"1000\";
when others => Y <= \"ZZZZ\";
end case;
end process;
end Behavioral
< 시뮬레이션 결과 >
< H/W 확인 >
begin
A(1) <= \'0\'; A(0) <= \'0\'; Wait for 100 ns;
A(1) <= \'0\'; A(0) <= \'1\'; Wait for 100 ns;
A(1) <= \'1\'; A(0) <= \'0\'; Wait for 100 ns;
A(1) <= \'1\'; A(0) <= \'1\'; Wait for 100 ns;
< .ucf 파일 생성 >
NET A<1> LOC=\"P67\";
NET A<0> LOC=\"P63\";
NET Y<3> LOC=\"P139\";
NET Y<2> LOC=\"P138\";
NET Y<1> LOC=\"P136\";
NET Y<0> LOC=\"P135\";
2X4 디코더(복호기)
A(1)
A(0)
Y(3)
Y(2)
Y(1)
Y(0)
0
0
0
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
< 동작 확인 >
2. 4x2 인코더(부호기)
entity encoder4x2 is
port( X : in std_logic_vector(3 downto 0);
( Y : out std_logic_vector(1 downto 0));
end encoder4x2;
architecture Behavioral of encoder4x2 is
begin
process (X) -- process 문에서 동작하는 모든 것을 써줘야함 괄호안에
begin
case X is
when \"0001\" => Y <= \"00\";
when \"0010\" => Y <= \"01\";
when \"0100\" => Y <= \"10\";
when \"1000\" => Y <= \"11\";
when others => Y <= \"ZZ\"; --ZZ는 아무것도 나오지 않는 출력을 의미
end case;
end process;
end Behavioral;
< 시뮬레이션 결과 >
< H/W 확인 >
x <= \"0001\"; Y <=\"00\" Wait for 100 ns;
x <= \"0010\"; Y <=\"01\" Wait for 100 ns;
x <= \"0100\"; Y <=\"10\" Wait for 100 ns;
x <= \"1000\"; Y <=\"11\" Wait for 100 ns;
< .ucf 파일 생성 >
NET X<3> LOC=\"P67\";
NET X<2> LOC=\"P63\";
NET X<1> LOC=\"P62\";
NET X<0> LOC=\"P61\";
NET Y<1> LOC=\"P139\";
NET Y<0> LOC=\"P138\";
2X4 디코더(복호기)
X(3)
X(2)
X(1)
X(0)
Y(1)
Y(0)
0
0
0
1
0
0
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
0
1
1
< 동작 확인 >
소개글