Forum Discussion
4 Replies
- Altera_Forum
Honored Contributor
Why would you want a warning for perfectly valid code?
The user has to take some responsibility! You may want to invest in a linting tool. - Altera_Forum
Honored Contributor
Indeed. Thanks so much
- Altera_Forum
Honored Contributor
I actually use that method when I want a default value on a signal. That way 'a' will always have a value even if I don't assign it in the if statement.
always@(posedge clk) begin a <= 1'b0; if(something) begin a <= 1'b1; end else if(something else) begin <something that doesn't touch a> end end - Altera_Forum
Honored Contributor
--- Quote Start --- I actually use that method when I want a default value on a signal. That way 'a' will always have a value even if I don't assign it in the if statement. end --- Quote End --- This seems like a good practice. Now I see the value of such a method. Thank you, Steve