$monitor will print the value only at the end of the time step. If there are multiple changes to same variable in a single timestep(same as your case) then only 1 value(which is last) will be printed.
Put a $display inside the repeat block.
$monitor will print the value only at the end of the time step. If there are multiple changes to same variable in a single timestep(same as your case) then only 1 value(which is last) will be printed.
Put a $display inside the repeat block.