| |||
Home > Components > Port declarations > Addressable ports |
Addressable ports. such as bus ports, are declared by placing
the keyword addressable
before the keyword port
:
master addressable port<myProtocol> myPort;
Use the addressable
keyword to automatically
create bus decoders for addressable slave ports. The ADDRESS
keyword
indicates the parameter of a protocol behavior that is the address.
Calls to a behavior that has a parameter with the ADDRESS
keyword
select the slave based on the value of the parameter. The code below
shows a read
behavior for a custom protocol:
protocol myProtocol { slave behavior read(ADDRESS uint32_t addr, uint32_t *data); }
See ADDRESS arguments for
more details on the ADDRESS
keyword.
More information on connecting addressable port arrays is given later. See Addressable port arrays.