UVM Callbacks implement the Strategy Pattern. They allow you to define "hooks" in your base components (like a Driver or Monitor) where external logic can be injected at runtime. This is the "Clean Room" approach to verification: you never modify your golden, signed-off components to add test-specific hacks.
Callback vs. Factory Override:
- Factory Override: Replaces the entire class. Use when you want to change core component logic.
- Callback: Injects logic into specific points. Use for transient behavior like error injection or performance monitoring.