Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

лабы / лаба 2 / лаба_2_2_мпу_метода

.pdf
Скачиваний:
0
Добавлен:
13.05.2026
Размер:
2.24 Mб
Скачать

--Description:

--Dependencies:

--Revision:

--Revision 0.01 - File Created

--Additional Comments:

----------------------------------------------------------------------------------

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

--Uncomment the following library declaration if using

--arithmetic functions with Signed or Unsigned values

--use IEEE.NUMERIC_STD.ALL;

--Uncomment the following library declaration if instantiating

--any Xilinx primitives in this code.

--library UNISIM;

--use UNISIM.VComponents.all;

entity button is

Port ( btn : in STD_LOGIC; i1 : in STD_LOGIC;

i2 : in STD_LOGIC;

o1 : out STD_LOGIC;

o2 : out STD_LOGIC); end button;

architecture Behavioral of button is

begin

process(btn, i1, i2) begin

if btn = '1' then o1 <= not i1; o2 <= not i2;

else

o1 <= i1;

o2 <= i2; end if;

end process;

end Behavioral;

39

Соседние файлы в папке лаба 2