2.7.1. Hierarchy in port connections

Components that have subcomponents might require exposing master ports of the subcomponent. This is possible for both slave and master ports.

Example 2.27 assumes a component parent with a subcomponent sub:

Example 2.27. Component hierarchy

component parent
{
    composition { subcomponent: sub }
    master port<masterType> forwardedMaster;
    slave port<slaveType> forwardedSlave;
    connection
    {
        subcomponent.subMaster => self.forwardedMaster;
        self.forwardedSlave => subcomponent.subSlave;
    }
}

component sub
{
    master port<masterType> subMaster;
    slave port<slaveType> subSlave;
}

The subcomponent ports subMaster and subSlave are forwarded and are visible to the outside with the names forwardedMaster and forwardedSlave. The keyword self is used to identify the external ports forwardedSlave and forwardedMaster.

This might seem to contradict the principle that master ports can only be connected to slave ports and vice versa. Both ports, however, have two sides, a master port also has a slave side where the method is being initiated. The same is true for slave ports that receive some kind of signal and then act as a master within the component.

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0372G
Non-Confidential