Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThank You.
I still do not see the difference between the two coding styles. In the example below, which is a stripped down example from case 1 and case 2 with the variables renamed, what extra logic is needed for r2 that is not needed for r1, It is my understanding that all RHS operations are combinatorial. wire a; wire b; wire c; reg [1:0] r1; reg [1:0] r2; assign c = { a, b }; always @(negedge clk or negedge rst_n) begin if ( rst_n == 0 ) begin r1 <= 0; r2 <= 0; end else begin r1 <= c; r2 <= { a, b }; end end