5.4.1. Protocol definition

This section describes requirements for the protocols that are used by the ports of the top level Fast Models component. It does not apply to other protocols that are not used to create SystemC ports. This section describes protocols that are based both on TLM 1.0 (for example signal protocols) and TLM 2.0 (for example bus protocols).

Example 5.1. Example TLM 1.0 protocol for exported SystemC component

protocol MySignalProtocol
{
    includes 
    {
        #include <mySystemCClasses.h>
    }

    properties 
    {
        sc_master_port_class_name= "my_signal_base<bool>";
        sc_slave_base_class_name = "my_slave_base<bool>";
        sc_slave_export_class_name = "my_slave_export<bool>";
    }

    slave behavior set_state(const bool & state);
}

Example 5.2. Example TLM 2.0 bus protocol for exported SystemC component

protocol MyProtocol
{
    includes 
    {
        #include <mySystemCClasses.h>
    }

    properties 
    (
       sc_master_base_class_name = "my_master_base";
       sc_master_socket_class_name = "my_master_socket<64>";
       sc_slave_base_class_name = "my_slave_base<64>";
       sc_slave_socket_class_name = "my_slave_socket<64>";
    }
    slave behavior read(uint32_t addr, uint32_t &data); slave behavior
    write(uint32_t addr, uint32_t data);
    master behavior invalidate_dmi(uint32_t addr);
}

Example 5.2 defines a protocol that enables declaring ports that have a read() and a write() function. Master and slave ports can be declared using this protocol.

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0370H
Non-Confidential