A testbench that only sends good traffic proves half the spec. The DMA's spec also says what happens when things go wrong: an access to an unmapped register answers with PSLVERR, and a packet that ends before LEN words ends the job with STATUS.ERR and an interrupt. Error injection is how you exercise those paths on purpose, and error checking is how you prove the DUT reacted, without letting the bench forgive real bugs along the way.
Decide whether a fault needs any new code at all, or is just a legal stimulus choice a sequence can make.
Inject a fault at the driver with a virtual hook and a factory override, without editing a single sequence, and clone before you modify.
Choose between callbacks and factory overrides, and write the three pieces of a callback correctly.
Predict expected errors from what the monitors observe, so the scoreboard checks the DUT's error response instead of being told to look away.
Lesson | What it covers |
|---|---|
The DMA's two error responses, faults a legal item can express, fault intent in item fields, and clearing ERR afterwards. | |
axis_truncating_driver: a virtual pre_drive hook, clone before modify, and a type override set before the env is built. | |
Why overrides do not compose, and a truncation callback with uvm_register_cb, uvm_do_callbacks and add/delete done right. | |
Why the data scoreboard passes a truncated job, predicting ERR from observed traffic, timeouts for missed faults, and demoting expected errors. |