4.Допустимо ли при конкретизации компонентов использовать оба направления (<=, =>) в зависимости от того, является ли порт входным или выходным?
5.Правда ли, что имя процесса специфицируется после ключевого слова process?
6.Каковы формы синтаксиса неявно заданного оператора process?
7.В чем особенность цифровых устройств последовательного типа?
8.Поясните назначение каждого из блоков, включенных в проект.
9.Поясните процедуру формирования тестов для элементов цифрового устройства.
10.С помощью временных диаграмм поясните принцип работы мультиплексора.
11.С помощью временных диаграмм поясните принцип работы дешифратора.
12.С помощью временных диаграмм поясните принцип работы счетчика.
13.С помощью временных диаграмм поясните принцип работы D-триггера.
14.С помощью временных диаграмм поясните принцип работы J-K-триггера.
15.С помощью временных диаграмм поясните принцип работы R-S- триггера.
5.Литература
1.Суворова Е. А., Шейнин Ю. Е. Проектирование цифровых систем на
VHDL. — СПб.: БХВ-Петербург, 2003. – С. 85 - ,110-.118.
2.Бабак В.П. VHDL: справочное пособие по основам языка / В.П. Бабак, А.Г. Корченко, Н.П. Тимошенко, С.Ф. Филоненко и др. – М.: Издательский дом «Додэка-XXI», 2008.
3.Тарасов И.Е. Разработка цифровых устройств на базе ПЛИС Xilinx с применением языка VHDL. –М.: Горячая линия-Телеком. – 2005. – С. 99-123.
4.Грушвицкий Р.И. Проектирование систем на микросхемах с программируемой структурой: учебное пособие для ВУЗов / Р.И. Грушвицкий, А.Х. Мурсаев, Е.П. Угрюмов. – СПб.: БХВ-Петербург, 2006. – С.421-499.
5.Калабеков Б. А. Цифровые устройства и микропроцессорные системы. – М.: Радио и связь. – 2003. – С.98-126.
50
ПРИЛОЖЕНИЕ 3.1
Листинг файла counter1.vhd
--------------------------------------------------------------------------
--Company:
--Engineer:
--Create Date: 14:17:43 04/30/2013
--Design Name:
--Module Name: counter1 - Behavioral
--Project Name:
--Target Devices:
--Tool versions:
--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 counter1 is
Port ( clk : in STD_LOGIC; clk_out : out STD_LOGIC);
end counter1;
architecture Behavioral of counter1 is
begin process(clk)
variable counter: integer := 0; variable flag: boolean := False; begin
if clk'event and clk = '1' then if counter = 50000000 then
counter := 0; flag := not flag;
else
counter := counter + 1; end if;
if flag = True then clk_out <= '1';
else
clk_out <= '0'; end if;
end if;
end process;
end Behavioral;
51
Листинг файла counter2.vhd
--------------------------------------------------------------------------
--Company:
--Engineer:
--Create Date: 14:34:23 04/30/2013
--Design Name:
--Module Name: counter2 - Behavioral
--Project Name:
--Target Devices:
--Tool versions:
--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 counter2 is
Port ( clk : in STD_LOGIC; clk_out : out STD_LOGIC);
end counter2;
architecture Behavioral of counter2 is
begin process(clk)
variable counter: integer := 0; variable flag: boolean := False; begin
if clk'event and clk = '1' then if counter = 25000000 then
counter := 0; flag := not flag;
else
counter := counter + 1; end if;
if flag = True then clk_out <= '1';
else
clk_out <= '0'; end if;
end if;
end process;
end Behavioral;
52
Листинг файла to_leds.vhd
--------------------------------------------------------------------------
--Company:
--Engineer:
--Create Date: 14:36:35 04/30/2013
--Design Name:
--Module Name: to_leds - Behavioral
--Project Name:
--Target Devices:
--Tool versions:
--Description:
--
--Dependencies:
--Revision:
--Revision 0.01 - File Created
--Additional Comments:
--
--------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.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 to_leds is
Port ( clk : in STD_LOGIC; btn_res : in STD_LOGIC;
led : out STD_LOGIC_VECTOR (7 downto 0)); end to_leds;
architecture Behavioral of to_leds is
begin
process(clk, btn_res)
variable cnt: STD_LOGIC_VECTOR (7 downto 0) := "00000000"; begin
if clk'event and clk = '1' then
if cnt = (cnt'range => '1') or btn_res = '0' then cnt := "00000000";
else
cnt := cnt + 1; end if;
led <= cnt; end if;
end process;
end Behavioral;
53
