5.4.3. Properties for TLM 2.0 based protocols

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

sc_master_socket_class_name

This is the class name of the SystemC class that is instantiated in the generated SystemC component for master ports (master sockets) on the SystemC side. It is bound to the derived sc_master_base_class_name SystemC class and forwards calls from the bound class to SystemC (forward path) as well as from the SystemC side to the bound class (backward path).

sc_master_base_class_name

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

my_master_base:: invalidate_dmi(uint32_t addr)

It must be derived in the SystemC component to forward the protocol functions from the SystemC component (backward path) to the System Generator top level component corresponding port. 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 is instantiated in the generated SystemC component for slave ports (sockets) on the SystemC side. It is bound to the derived sc_slave_base_class_name SystemC class and forwards calls from the bound class to SystemC (backward path) as well as from the SystemC side to the bound class (forward path).

sc_slave_base_class_name

This is the class name of the SystemC class that is specialized in the generated SystemC component for slave ports (slave ports or sockets) on the SystemC side. It must also provide a constructor taking the argument const std: : string &.

Example 5.5. AMBAPV protocol in System Generator

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

  properties {
    version = "1.0";
    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>";
  }

The SystemC module ports must use the corresponding names in the SystemC code as shown in Example 5.6.

Example 5.6. AMBAPV protocol in SystemC component class

class pv_dma:public sc_module,public amba_pv::amba_pv_slave_base<BUSWIDTH> {
  /* Module ports */
  amba_pv::amba_pv_slave_socket<BUSWIDTH> amba_pv_s;
  amba_pv::amba_pv_master_socket<BUSWIDTH> amba_pv_m;
}

Copyright © 2007-2010 ARM Limited. All rights reserved.ARM DUI 0370K
Non-ConfidentialID110210