What is the best way to inject error to an interface between transaction

Hello

I would like to know what is the most recommanded way to inject error inside the interface BETWEEN transaction.
In my environment, there is a delay between every transaction sent to the DUT, and during this delay I want to be able to inject perturbation on different fields of the interface.

I have thought of 2 solutions for this :

  • First : implement my driver so at each clock posedge, if no transaction occure, write wrong value on the interface.
  • Second : create a dedicated sequence that will inject perturbation, with a lock/grab system for the sequence which send the actual transcations.

Thanks

Pierre-Antoine

There are several approaches that you can use, and each has it’s advantages and disadvantages.

Your first solution is easier to implement, and you can enable the error generation using the agent’s configuration object. However this is harder to control dynamically.

The second solution is better because you now have the ability to control the error generation at the sequence level, but controlling the grab/ungrab might be difficult especially since your testbench should be untimed.

My recommendation is to encapsulate the error generation in the transaction sequence item itself. In addition to the transaction information, add the capability to generate error conditions after the transaction completes. By doing this, a single transaction can coordinate both the valid and error conditions on the interface on a per transaction basis. You will only need to generate a single type of sequence item instead of multiple transaction types.

OK thanks for your answer