Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

simulation-based faults injection

Status
Not open for further replies.

ouij

Newbie level 4
Joined
Jun 12, 2017
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
50
Hello,

Can you help me to find a method to inject faults one after the other in a DUT using modelsim's command in a verilog testbench?

I will be very grateful.
 

modelsim has support for it's own force command, and verilog also has a $force task. You can use either one. Very simple to use.
 

modelsim has support for it's own force command, and verilog also has a $force task. You can use either one. Very simple to use.

Thank you for your answer but I can't figure out how to use this commands (I'm a beginner).Can you help me please?
 

Thank you for your answer but I can't figure out how to use this commands (I'm a beginner).Can you help me please?

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 would help if you explain what you mean by "to inject faults in a DUT". This could have many different meanings.
 

It would help if you explain what you mean by "to inject faults in a DUT". This could have many different meanings.

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);

Any help please?
 

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);

Any help please?

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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top