APB Driver Phase 2

Driving consistent transactions

The driver component designed in the last module was pretty basic. It just took the randomized transaction from the mailbox and drove it on to the DUT pins. This was done on purpose since the module introduced you to the concept of using virtual interface and the clocking block. The module also introduced you to the agent which connected the generator and the driver class via the mailbox. The generator class also took the num_tr property as an input to generate thos many randomized transactions. However, not accounting for the apb_psel and apb_penable signals led to a lot fewer actual transactions getting completed. In this module, we would fix the driver class to sample the DUT outputs to get num_tr transfers between the DUT and TB.

Coding Exercise

For this coding exercise, we would have the following goals:

  • Update the apb_slave_driver class to include the num_tr as class property
  • Add support in the driver's run() method to count the number of transaction when they are transferred
    • An APB transaction is transferred when apb_psel, apb_penable and apb_pready are asserted in the same cycle
  • Update the apb_slave_agent class to move the num_tr integer from the generator to the driver
  • Remove the num_tr class property from the apb_slave_generator class

Loading the interactive workspace...