
C165UTAH
External Bus Interface
Data Sheet
206
2001-02-23
10.6
External Bus Arbitration
In high performance systems it may be efficient to share external resources like memory
banks or peripheral devices among more than one controller. The C165UTAH supports
this approach with the possibility to arbitrate the access to its external bus, ie. to the
external devices.
This bus arbitration allows an external master to request the C165UTAH’s bus via the
HOLD input. The C165UTAH acknowledges this request via the HLDA output and will
float its bus lines in this case. The CS outputs provide internal pullup devices. The new
master may now access the peripheral devices or memory banks via the same interface
lines as the C165UTAH. During this time the C165UTAH can keep on executing, as long
as it does not need access to the external bus. All actions that just require internal
resources like instruction or data memory and on-chip peripherals, may be executed in
parallel.
When the C165UTAH needs access to its external bus while it is occupied by another
bus master, it demands it via the BREQ output.
The external bus arbitration is enabled by setting bit HLDEN in register PSW to ‘1’. In
this case the three bus arbitration pins HOLD, HLDA and BREQ are automatically
controlled by the EBC independent of their I/O configuration. Bit HLDEN may be cleared
during the execution of program sequences, where the external resources are required
but cannot be shared with other bus masters. In this case the C165UTAH will not answer
to HOLD requests from other external masters. If HLDEN is cleared while the
C165UTAH is in Hold State (code execution from internal RAM) this Hold State is left
only after HOLD has been deactivated again. Ie. in this case the current Hold State
continues and only the next HOLD request is not answered.
Connecting eg. two C165UTAHs in this way would require additional logic to combine
the respective output signals HLDA and BREQ. This can be avoided by switching one of
the controllers into Slave Mode where pin HLDA is switched to input. This allows to
directly connect the slave controller to another master controller without glue logic. The
Slave Mode is selected by setting bit DP6.7 to ’1’. DP6.7=’0’ (default after reset) selects
the Master Mode.
Note: The pins HOLD, HLDA and BREQ keep their alternate function (bus arbitration)
even after the arbitration mechanism has been switched off by clearing HLDEN.
All three pins are used for bus arbitration after bit HLDEN was set once.
Connecting Bus Masters
When multiple C165UTAHs or a C165UTAH and another bus master shall share
external resources some glue logic is required that defines the currently active bus
master and also enables a C165UTAH which has surrendered its bus interface to regain
control of it in case it must access the shared external resources. This glue logic is