reg [3:0] Input_Delay;
always @(posedge clock)
begin
// Create a delayed version of signal Input
Input_Delay <= Input_Delay << 1;
Input_Delay[0] <= Input;
end
always_ff @(posedge sys_clk) begin
if (sys_rst)begin
a <= 1'b0;
b <= 1'b1;
end else begin
a<=b;
b<=a;
end
end
here, a and b will switch every clock cycle… so it does not seems like one overwrite the other or I don`t understand the meaning of “it gets overwritten by the next assignment”
In your always_ff block, there is only one assignment to a and one assignment to b in each clock cycle.
In the original example, there are two assignments to Input_Delay[0] in each clock cycle, but only one assignment to Input_Delay[3:1] in each clock cycle.