Forum Discussion
Altera_Forum
Honored Contributor
9 years agoWhat's the difference between these two pieces of simple code?
Do you think there is a difference in functionality between these codes? always @(posedge clk)
begin
A<=0;
if (sel==0)
A<=in_u;
...
Altera_Forum
Honored Contributor
9 years agoYes. The first one will select between in_u and in_v.
In the second one A will be X when the selected input is 1 (and in synthesis, you'll get a multiple driver error)