What Does a Driver Actually Do?
The Simple Version: The Driver is your testbench's "hands." It takes test instructions and physically applies them to your design's signals.
Think of it like: A pianist. The Sequencer gives it sheet music (transactions), and the Driver presses the actual keys (signals) at the right time.
A UVM Driver is the "Muscle" of the agent. Its job is to take high-level test instructions (called transactions) from the Sequencer and convert them into actual signal changes on your design's pins.
- Transaction: A high-level test action (e.g., "write data 0x42 to address 0x100")
- Sequencer: The component that generates test transactions
- DUT: Design Under Test—the hardware you're verifying
- Pins/Signals: The actual wires connecting to your design
1. How the Driver Gets Transactions
The Driver and Sequencer work together like a relay race. Here's how they coordinate:
- seq_item_port.get_next_item(req): This is a blocking call. The driver sleeps here until a sequence provides a new transaction.
- seq_item_port.item_done(): This is a non-blocking signal back to the
sequencer. It unblocks the
finish_item()call in the sequence.