You should get it into your head that non-blocking assignments are used to prevent race conditions when there are multiple processes synchronous to the same clock edge, otherwise you should always use blocking assignments.
What is a race condition? When one process tries to write and another process tries to read the same signal within a certain time-frame that the ordering cannot be guaranteed to know whether the read sees the new or the old value of the signal.
You have only shown the write statements, and not the reads, nor have you shown the processes that these statements are in.
If instead you had shown us
Code:
initial begin
fd1 =$fopen("binary.txt","r");
c = $fgetc(fd1);
end
Then it makes a big difference which assignment operator writes to fd1.
A blocking assignment "blocks" the process until the assignment completes so that the next procedural statement in the process sees the new value. In a most blocking assignments, there is no specified delay so the process never gets suspended. It behaves just like any other normal assignment in most programming languages.
The non-blocking assignment is unique to RTL description languages, and I would have preferred to call it the
RTL assignment operator. It does not complete the assignment before letting the next procedural statement execute, it never blocks. The assignment gets scheduled later, after all statements in all processes scheduled for the current time have executed. Then, just before the simulator would advance time, it updates all the assignment values, which might trigger more things to happen at the current time.
So by using a blocking assignment, the first statement writes to fd1 and the second statement reads the new value of fd1 just written.
If you had used a non blocking assignment, the second statement would see the old, uninitialized value of fd1.