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_driverclass to include thenum_tras 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_penableandapb_preadyare asserted in the same cycle
- An APB transaction is transferred when
- Update the
apb_slave_agentclass to move thenum_trinteger from the generator to the driver - Remove the
num_trclass property from theapb_slave_generatorclass
Loading the interactive workspace...