5.2 Creating an AMBA-PV slave

This section describes how to create an AMBA-PV slave.

Procedure

  1. Derive the slave class from class amba_pv_slave_base (in addition to sc_module).
    A memory slave can derive from class amba_pv_memory_base instead.
  2. Instantiate one slave socket of class amba_pv_slave_socket for each connection to an AMBA® bus. Specify a distinct identifier for each socket.
  3. Implement the methods read(), write(), get_direct_mem_ptr(), debug_read(), and debug_write().
    A slave does not need to implement any other method than read() and write() if it does not support DMI or debug transactions.
  4. In the implementations of the read() and write() methods, inspect and act on the parameters, and on the attributes of the AMBA-PV extension (amba_pv_control object). Instead of implementing the requested functionality, a slave might choose to return an AMBA_PV_SLVERR error response. Return an AMBA_PV_OKAY response to indicate the success of the transfer.
  5. In the implementation of get_direct_mem_ptr(), either return false, or inspect and act on the parameters, and on the attributes of the AMBA-PV extension (amba_pv_control object), and set the return value and all the attributes of the DMI descriptor (class tlm_dmi) appropriately.
  6. In the implementation of debug_read() and debug_write(), either return 0, or inspect and act on the parameters, and on the attributes of the AMBA-PV extension (amba_pv_control object). Return the number of bytes read/written.
Non-ConfidentialPDF file icon PDF version100962_0200_03_en
Copyright © 2014–2018 Arm Limited (or its affiliates). All rights reserved.