Do it in a clocked process, that's fine. What it means is "the next value of a
should be the current value of a
+1"
If you do it as a continuous assignment (outside of any process), what you are saying is "a is always getting a+1 assigned to it" which is a self-referential loop!
If you include a
in the sensitivity list of an enabled process, you get the same effect
process (en, a)
begin
if en = '1' then
a <= a + 1;
end if;
end process;
(You can use this form to create transparent latches:
process (en, insig)
begin
if en = '1' then
a <= insig;
end if;
end process;
)
If you do it in a non-clocked process, which is not sensitive to a
:
process (en)
begin
if en = '1' then
a <= a + 1;
end if;
end process;
You will create a positive-edge-triggered latch, as a
needs to keep its value between changes of en
. Effectively, en
becomes a clock to a d-type flipflop.