Write pseudo code for implementing an AHB-Lite driver.
The main point in writing an AHB driver is to realize that its a pipelined protocol and hence address phase of the next transaction should be active when the data phase of current transaction is on going. This is done by starting the same task twice in a
class ahb_driver extends uvm_driver; semaphore sema4; virtual task run_phase (uvm_phase phase); fork drive_tx(); drive_tx(); join endtask virtual task drive_tx(); // 1. Get hold of a semaphore // 2. Get transaction packet from sequencer // 3. Drive the address phase // 4. Release semaphore // 5. Drive data phase endtask endclass
What does a sequence normally contain ?
A sequence has a task called
body() within which we can write the actual stimulus to test the design for a particular feature.
Read more on UVM Sequence.