º»¹®/³»¿ë
1. °³ ¿ä
¡Û °¡»ê±â ¼³°è¸¦ ÅëÇÑ Àü¹ÝÀûÀÎ Modelsim, Xilinx ISE »ç¿ë¹ý ½Ç½À
¡Û TEST bench, simulation ¹æ¹ý ÀÌÇØ
2. ¹® Á¦
(1) 3*8 Decoder
-Behavioral modeling
library ieee;
use ieee.std_logic_1164.all;
entity decoder is
port (x : in std_logic_vector(2 downto 0);
d : out std_logic_vector(7 downto 0));
end decoder;
architecture behavioral of decoder is
begin
process (x)
begin
case x is
when 000 ¡ë] d [¡ë 10000000 ;
when 001 ¡ë] d [¡ë xxx00000 ;
when xxx ¡ë] d [¡ë 0xxx0000 ;
when xxx ¡ë] d [¡ë 00xxx000 ;
when 100 ¡ë] d [¡ë 000xxx00 ;
when 101 ¡ë] d [¡ë 0000xxx0 ;
when 110 ¡ë] d [¡ë 00000xxx ;
when others ¡ë] d [¡ë 00000001 ;
end case;
end process;
end behavioral;
-Data flow modeling
library ieee;
use ieee.std_logic_1164.all;
entity decoder_dataflow is
port(x: in s¡¦(»ý·«)
d(2) [¡ë not x(0) and x(1) and not x(2);
d(3) [¡ë x(0) and x(1) and not x(2);
d(4) [¡ë not x(0) and not x(1) and x(2);
d(5) [¡ë x(0) and not x(1) and x(2);
d(6) [¡ë not x(0) and x(1) and x(2);
d(7) [¡ë x(0) and x(1) and x(2);