The present invention provides a data processing apparatus and method for handling
a multi-access instruction of the type which specifies that an access request of
a first type and an access request of a second type should be performed without
any intervening accesses taking place. The data processing apparatus has a processor
operable to execute instructions, and a first master logic unit and a second master
logic unit operable to process access requests generated during execution of those
instructions. The access requests specify accesses to a slave device, with the
first master logic unit being operable to access the slave device via a first bus,
and the second master logic unit being operable to access the slave device via
a second bus. Routing logic is provided to determine, for each access request,
which master logic unit is to process that access request, the first master logic
unit being arranged to process access requests of the first type, and the second
master logic unit being arranged to process access requests of the second type.
The routing logic is arranged in the event of execution of the multi-access instruction
to cause both the access request of the first type and the access request of the
second type specified by the multi-access instruction to be processed by the first
master logic unit. Further, the first master logic unit is arranged, when processing
the access requests of the multi-access instruction, to issue a lock signal which
is used to ensure that the first master logic unit is granted sole access to the
slave device whilst the first master logic unit is processing the access requests
of the first and second type. This approach enables the benefits of providing a
separate master logic unit for accesses of the first type and a separate master
logic unit for accesses of the second type to be realised, whilst enabling the
above-described multi-access instruction to be executed in the desired manner,
i.e. by ensuring that the access requests of the first and second type specified
by the multi-access instruction are performed without any intervening accesses
taking place.