I was given a code for a D Flip-Flop with enable.
process(clk, en)
begin
if rising_edge(clk) then
if en = ‘1’ then
Q <= D;
end if;
end if;
end process;
- I was told that I should not use
if rising_edge(clk) and en = ‘1’ then .... Why? - Why isn't the if for the
en = '1'before the if for clock since the clock is changing more often? - And is it necessary to specify that
enin the process parenthesisprocess(clk, en)?