User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 4: System Control and Debug Unit
Page
67
A
DDRESS
T
RAPPING
There are four address traps in the SCD. An interrupt is raised by any access that falls within the address range
specified by a trap. Hits to a trap can also be used to trigger the performance counters and trace unit. The
address traps are mainly used as a debugging aid, but they can also be used to detect (but not prevent) illegal
accesses in the event of a system failure.
Each address trap has the same interface consisting of a set of registers. The register names described should
have
_0
,
_1
,
_2
, or
_3
appended to indicate which trap is being used.
A 40 bit upper address register
addr_trap_up
sets the top physical address in the trapping range. An address
must be less than or equal to this value to be part of the range. A 40 bit lower address register
addr_trap_down
sets the base physical address in the trapping range. An address must be greater than or
equal to this value to be part of the range.
The fields in the
addr_trap_cfg
register are used to make the trap more selective than just based on an
address range. A two bit access_type field selects if the trap is active for read, write or all accesses. The
source_id field contains a ZBbus source id that is compared at the same time as the address. Flags determine
if the trap is hit when the access is inside or outside the address range, and if the source id must match or differ.
Each trap has a 3 bit occurrence counter in the
addr_trap_cfg
register that counts down every time the trap
condition is hit. Once the occurrence counter is zero it will stick at zero and not continue to decrement.
A simple trap ignores the source information. It is setup by programming the upper and lower address registers
to set the range, then writing the configuration register with the access type to trap on, and a greater than 0
occurrence count. Any access of the selected type with an address greater than or equal to the lower register
and less than or equal to the upper register matches the range. Thus to trap on a specific address the upper
and lower addresses are set to be the same. When an access matches and the occurrence counter is greater
than zero, the counter will decrement.
Provided the address trap interrupt is clear, any address trap match will log the address that matched in the
addr_trap_reg
and the trap number in the
addr_trap_index
. The first time an occurrence counter from any
trap decrements from 1 to 0 the address trap interrupt is raised, both signalling the event and preventing the
log registers from being overwritten. Further trap matches will continue to decrement their counters, but will
otherwise be ignored until the interrupt is cleared by a read of the
addr_trap_reg
. The CPU should read the
addr_trap_index
before the
addr_trap_reg
to ensure a consistent result.
More complex traps can be made by inverting the output of the range match (the trap is only hit by addresses
outside the range) and considering the source of the access in addition to the address range. The source id
that is provided on the ZBbus by the initiator of the transaction (as the transaction ID bits A_ID[9:6]) is used in
the comparison. There are four forms of complex trap:
1
Address match, source match. This is used to detect a particular agent accessing a particular memory range.
2
Address differs, source match. This will detect an access by a device outside of the range of addresses that it
is expected to use.
3
Address match, source differs. If a region of memory is reserved for use by a single agent (for example CPU
1) this will detect an access to the region by any other agent. (Note that this provides detection only, not
prevention).
4
Address differs, source differs. If all of the memory can be used by one agent (for example the master CPU),
but all other agents are confined to a particular region, this will detect illegal accesses by other agents. It could
be used if only the master CPU were given access to I/O addresses and other agents are confined to memory.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...