5.4.5 Properties for TLM 1.0 based protocols

TLM 1.0 based protocols map to their SystemC counterparts using properties in the LISA protocol definition. The protocol description must set these properties.

sc_master_port_class_name

The sc_master_port_class_name property is the class name of the SystemC class that the generated SystemC component instantiates for master ports on the SystemC side. This class must implement the functions defined in the corresponding protocol, for example:

void my_master_port<bool>::set_state(bool state)

sc_slave_base_class_name

The sc_slave_base_class_name property is the class name of the SystemC class that the generated SystemC component specializes for slave ports on the SystemC side. This class must declare the functions defined in the corresponding protocol, for example:

void my_slave_base<bool>::set_state(const bool &state)

The SystemC component must define it to forward the protocol functions from the SystemC component to the Fast Models top level component corresponding port. It must also provide a constructor taking the argument:

const std::string &name

sc_slave_export_class_name

The sc_slave_export_class_name property is the class name of the SystemC class that the generated SystemC component instantiates for slave ports (exports) on the SystemC side. The component binds to the derived sc_slave_base_class_name SystemC class, and forwards calls from the SystemC side to the bound class.

AMBAPV Signal protocol in Fast Models protocol

protocol AMBAPVSignal {

  includes { 
    #include <amba_pv.h> 
  } 

  properties { 
    description = "AMBA-PV signal protocol";
    sc_master_port_class_name = "amba_pv::signal_master_port<bool>";
    sc_slave_base_class_name = "amba_pv::signal_slave_port<bool>";
    sc_slave_export_class_name = "amba_pv::signal_slave_export<bool>"; 
  } 
...

sc_slave_export_class_name and sc_master_port_class_name describe the type of the port instances in the SystemC domain.

sc_slave_base_class_name denotes the base class from which the SystemC component publicly derives.

AMBAPV Signal protocol in SystemC component class

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

class pv_dma: public sc_module,
              public amba_pv::signal_slave_base<bool> {

  /* Module ports */
  amba_pv::signal_master_port<bool> signal_out;
  amba_pv::signal_slave_export<bool> signal_in; 
  ...

The SystemC port names must also match the Fast Models port names.

Figure 5-2 SGSignal component in System Canvas. signal_out is the instance name for the master port in the Fast Models AMBA PVBus component and the SystemC port.
SGSignal component in System Canvas


Non-ConfidentialPDF file icon PDF versionARM DUI0835I
Copyright © 2014-2016 ARM Limited or its affiliates. All rights reserved.