Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- What is the proper pattern to assign some output signal in the process on clock edge, but only till next clock and only if some (maybe complex) condition is met, and else set it do default value? --- Quote End --- Hmm, I normally only use that construct in a combinatorial process. I'd expect it to be something like:
D1: process (all)
begin
if rst then
result <='0';
elsif rising_edge(clk) then
-- Default
result <= '0';
-- Override
if (some other condition) then
result <= ena;
end if;
end if;
end process;
Cheers, Dave