|
Модераторы: Mazzi |
|
vezyn4ik |
|
|||
Новичок Профиль Группа: Участник Сообщений: 1 Регистрация: 2.1.2014 Репутация: нет Всего: нет |
Здравствуйте,недавно начал изучать язык vhdl,но никак не могу понять свои ошибки в синтаксисе. По заданию,нужно было реализовать таймер.
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 cnt128 is Port ( c : in STD_LOGIC; q : out STD_LOGIC_VECTOR (6 downto 0); timer : out STD_LOGIC); end cnt128; architecture Behavioral of cnt128 is signal s:std_logic_vector (6 downto 0);="0000000"; constant const128:std_logic_vector (6 downto 0);="1111111"; begin process © begin if rising_edge© then if (s="1111111") then s="0000000" else s<=s+1; end if end process; q<=s; process (s) begin if const128=s then timer<='1' else timer <='0' end if end process end Behavioral; |
|||
|
||||
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | Разное (электроника) | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |