You copied the Doc URL to your clipboard.

About the component connection section

The connection section is for connecting component ports with each other.

The composition section defines the scope of the connection section. You can only connect the ports of the component itself and ports of components declared in the composition section in the connection section.

The connection section contains a list of connection statements. The connection section syntax is:

masterComponent.masterPort[MAR] => slaveComponent.slavePort[SAR];
the optional Master Address Range and Slave Address Range. The address range includes both the low address and high address.


All addresses in the master and slave address ranges, if present, must be plain numeric constants, that is, either hex or decimal. Do not use expressions, enums or preprocessor symbols.
masterComponent and slaveComponent
the instance name of any subcomponent, as defined in the composition section, or the keyword self that stands for the component that contains the connection section. masterComponent is always the transaction initiator (master) and slaveComponent is the transaction receiver (slave).

Specify an address range for addressable ports. You cannot specify an address range, however, for non-addressable ports.

The following rules apply for address ranges:

  • If a range is only for the master, the range of the slave has the same size as the address range of the master and always starts from 0.
  • If the address range of the slave is smaller then the address range of the master port, multiple addresses of the master port link to the same slave port address.

    If, for example, the master port has range 0 to 0x1FFF and the slave port range is from 0 to 0xFFF, the master port addresses 0x0001 and 0x1001 both link to address 0x0001 of the slave port.

  • You can overlap address ranges but the order of the connection statements is significant. Later connection statements override earlier connection statements. The first connection statement, therefore, has the lowest priority. The priority of connections simplifies creating a default bus slave that covers the whole address space of the bus.
Connecting ports
How to connect ports in the connection section.
component MyComponent
        mem: MyMemory(size=0x1000);
        mem2: MyMemory(size=0x1000);
        otherComp: MyOtherComp;
        probe: MyProbe;
    addressable master port<MyMemProtocol> memport;
    master port<MyOtherProtocol> otherPort;

        // default bus slave comes first and gets all addresses that 
        // are not overridden by the other connection statements
        self.memport[0..0xffffffff] => probe.access;
        // addressable master ports can have address ranges
        self.memport[0..0xfff] => mem.access[0..0xfff];
        // this is equivalent to => mem2.access[0..0xfff]
        self.memport[0x1000..0x1fff] => mem2.access;
        self.otherPort => otherComp.otherPort;    
The port memport is an external port and probe is a component. The keyword self identifies that the external port memport connects to the access port of the probe component.