7.5.5 Properties for TLM 2.0 based protocols

The TLM 2.0 protocol provides forward and backward paths for master and slave sockets. Protocols that use TLM 2.0 must specify properties in the protocol declaration.

sc_master_socket_class_name

This is the class name of the SystemC class that the generated SystemC component instantiates for master sockets on the SystemC side. The component binds to the derived sc_master_base_class_name SystemC class and forwards calls from:

  • The bound class to SystemC (forward path).
  • The SystemC side to the bound class (backward path).

sc_master_base_class_name

This is the class name of the SystemC class that the generated SystemC component specializes for master sockets on the SystemC side. This class must declare the master behavior functions defined in the corresponding protocol, for example:

my_master_base::invalidate_dmi(uint32_t addr)

The SystemC component must define it to forward the protocol functions from the SystemC component (backward path) to the System Generator top level component corresponding socket. It must also provide a constructor taking the argument:

const std::string &

sc_slave_socket_class_name

This is the class name of the SystemC class that the generated SystemC component instantiates for slave sockets on the SystemC side. The component binds to the derived sc_slave_base_class_name SystemC class and forwards calls from:

  • The bound class to SystemC (backward path).
  • The SystemC side to the bound class (forward path).

sc_slave_base_class_name

This is the class name of the SystemC class that the generated SystemC component specializes for slave sockets on the SystemC side. It must also provide a constructor taking the argument:

const std::string &

AMBAPV protocol in System Generator

protocol AMBAPVSignal {
  includes {
  #include <amba_pv.h>
  }

  properties {
    description = "AMBA-PV protocol";
    sc_master_base_class_name = "amba_pv::amba_pv_master_base";
    sc_master_socket_class_name = "amba_pv::amba_pv_master_socket<64>";
    sc_slave_base_class_name = "amba_pv::amba_pv_slave_base<64>";
    sc_slave_socket_class_name = "amba_pv::amba_pv_slave_socket<64>";
  }

AMBAPV protocol in SystemC component class

The SystemC module sockets must use the corresponding names in the SystemC code.

class pv_dma: public sc_module,
              public amba_pv::amba_pv_slave_base<64>,
              public amba_pv::amba_pv_master_base {

/* Module ports */
    amba_pv::amba_pv_slave_socket<64> amba_pv_s;
    amba_pv::amba_pv_master_socket<64> amba_pv_m;
    ...
}
Non-ConfidentialPDF file icon PDF version100965_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.