Forum Discussion
Altera_Forum
Honored Contributor
11 years agoAssuming you're operating from a single clock source, you could implement all of this in a single always block. However, there's nothing wrong with splitting logic up across more than one. This often helps readability.
You can gate the output from block 1 with the control signal you're generating in block 2. A combinatorial statement should do the trick. This could reside in 3rd always block. Perhaps:always @ (*)
if (stream_active) // Control signal from always block 2, active every 100ms
output_stream = stream_source; // Whilst active, drive the output signal with the stream
else
output_stream = 0; // Otherwise, turn it off Regards, Alex