+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Newbie level 3
    Points: 26, Level: 1

    Join Date
    Jun 2017
    Posts
    3
    Helped
    0 / 0
    Points
    26
    Level
    1

    simulation-based faults injection

    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.

    •   Alt12th June 2017, 11:23

      advertising

        
       

  2. #2
    Advanced Member level 3
    Points: 3,653, Level: 14

    Join Date
    Apr 2016
    Posts
    763
    Helped
    142 / 142
    Points
    3,653
    Level
    14

    Re: simulation-based faults injection

    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.
    Really, I am not Sam.



    •   Alt12th June 2017, 21:04

      advertising

        
       

  3. #3
    Newbie level 3
    Points: 26, Level: 1

    Join Date
    Jun 2017
    Posts
    3
    Helped
    0 / 0
    Points
    26
    Level
    1

    Re: simulation-based faults injection

    Quote Originally Posted by ThisIsNotSam View Post
    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?



    •   Alt13th June 2017, 14:21

      advertising

        
       

  4. #4
    Advanced Member level 3
    Points: 3,653, Level: 14

    Join Date
    Apr 2016
    Posts
    763
    Helped
    142 / 142
    Points
    3,653
    Level
    14

    Re: simulation-based faults injection

    Quote Originally Posted by ouij View Post
    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.
    Really, I am not Sam.



  5. #5
    Advanced Member level 3
    Points: 5,685, Level: 17

    Join Date
    Dec 2011
    Location
    Fremont, CA, USA
    Posts
    719
    Helped
    328 / 328
    Points
    5,685
    Level
    17
    Blog Entries
    4

    Re: simulation-based faults injection

    It would help if you explain what you mean by "to inject faults in a DUT". This could have many different meanings.
    Dave Rich
    Senior Verification Consultant
    Mentor Graphics Corporation



    •   Alt14th June 2017, 04:37

      advertising

        
       

  6. #6
    Advanced Member level 3
    Points: 3,653, Level: 14

    Join Date
    Apr 2016
    Posts
    763
    Helped
    142 / 142
    Points
    3,653
    Level
    14

    Re: simulation-based faults injection

    Quote Originally Posted by dave_59 View Post
    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.
    Really, I am not Sam.



  7. #7
    Newbie level 3
    Points: 26, Level: 1

    Join Date
    Jun 2017
    Posts
    3
    Helped
    0 / 0
    Points
    26
    Level
    1

    Re: simulation-based faults injection

    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?



  8. #8
    Super Moderator
    Points: 26,240, Level: 39
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    5,956
    Helped
    1462 / 1462
    Points
    26,240
    Level
    39

    Re: simulation-based faults injection

    Quote Originally Posted by ouij View Post
    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.



--[[ ]]--