blob: 1d6ae9a72098160aacd94b42bf1f91f0692f4d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
library ieee;
use ieee.std_logic_1164.all;
entity ent is
port (
clk : in std_logic;
enable : in std_logic;
i : in std_logic;
o : out std_logic
);
end;
architecture a of ent is
begin
process(clk)
begin
-- works:
--if rising_edge(clk) and enable = '1' then
if enable = '1' and rising_edge(clk) then
o <= i;
end if;
end process;
end;
|