Спец курс (Избранные главы VHDL)/Вспомним VHDL — различия между версиями
Материал из Wiki
Vidokq (обсуждение | вклад) (→Architecture) |
Vidokq (обсуждение | вклад) (→Process) |
||
| Строка 23: | Строка 23: | ||
===Process=== | ===Process=== | ||
| + | <source lang="vhdl"> trig_process: process (clk, rst) | ||
| + | begin -- process trig_process | ||
| + | if rst = '0' then -- asynchronous reset (active low) | ||
| + | data_out <= '0'; | ||
| + | elsif clk'event and clk = '1' then -- rising clock edge | ||
| + | data_out <= data_in; | ||
| + | end if; | ||
| + | end process trig_process;</source> | ||
| + | |||
===when else=== | ===when else=== | ||
===Оператор непрерывного присваивания=== | ===Оператор непрерывного присваивания=== | ||
Версия 23:49, 17 сентября 2012
Содержание |
Языки описания аппаратуры
VHDL-основные конструкции
Entity
entity example is generic ( cnt : integer := 10); port ( inp in : std_logic; outp out : std_logic); end entity;
Architecture
architecture beh of trig is begin -- beh end beh;
Process
trig_process: process (clk, rst) begin -- process trig_process if rst = '0' then -- asynchronous reset (active low) data_out <= '0'; elsif clk'event and clk = '1' then -- rising clock edge data_out <= data_in; end if; end process trig_process;