Have you googled it? Have you checked the documentation? These commands are extremely easy to use. You pick the node to which you want to inject a fault, and you set it's new value. It's not rocket science.
it has different meanings, but regardless of the purpose, the process is the same. just use the force command to make a signal switch from something to something else.
In fact i want to inject faults in a DUT which means Device Under Test,I created a text file where i have the name of signal that i want to force and the fault type,so now i'm looking for reading a file containing the following : b05_test.dut.n509 0
I'm blocked at the fgets instruction because it doesn't zork this way: scan_faults = $fgets(file_faults , string , data);
In fact i want to inject faults in a DUT which means Device Under Test,I created a text file where i have the name of signal that i want to force and the fault type,so now i'm looking for reading a file containing the following : b05_test.dut.n509 0
I'm blocked at the fgets instruction because it doesn't zork this way: scan_faults = $fgets(file_faults , string , data);
What do you mean by $fgets doesn't work this way? $fgets works the way it is defined to work. Maybe you should have stated HOW you want it to work and if there is something else besides $fgets that DOES work the way you want.
As it is hard to follow what you are asking perhaps $fscanf will work better for you. It uses a format string to load reg variables, which you can then use $force to apply them to those internal DUT nodes.
Unless you can be very clear on what you are trying to do and what the problem is with the current method it is very difficult to help you, i.e. good questions get good answers, bad questions get a lot of questions about your question.