State the term in detail $strobe
$strobe. This task is very similar to $display task except for a slight difference. If many other statements are executed in same time unit as the $display task, order in which the statements and the $display task are executed is nondeterministic. If $strobe is used, it's always executed after all other assignment statements in the same time unit have executed. Hence, $strobe provides a synchronization mechanism to ensure that data is displayed only after all other assignment statements, which change data in that time step, have executed.
//strobing
always @(posedge clock)
begin
a = b;
c = d;
always @(posedge clock)
$strobe ("Displaying a = %b, c = %b" , a, c) ; / / display values at posedge
Values at positive edge of clock will be displayed only after statements a = b and c = d execute.
If $display was used, $display might execute before statements a = b and c = d, hence displaying different values.
Append b, h, o to the task name to change default format to binary, octal or hexadecimal