| |||
Home > Peripheral and Interface Components > Non-CADI sync watchpoints > Controlling and observing the syncLevel |
CADI watchpoints automatically register
and unregister for their required syncLevel (POST_INSN_IO)
.
All other use cases must explicitly register and unregister for
the specific syncLevel they require.
Users of syncLevel write to a set of non-architectural processor registers in the CADI and SCADI interface to register and unregister for specific syncLevels. Processor registers are more suitable than CADI parameters for exposing an interface that has side effects on writes and where values might change spontaneously.
This is the exposed interface to control and observe the value
of syncLevel. All these registers are in the CADI/SCADI register
group Simulation
for each CT processor that
contains non-architectural, simulator-specific registers. All are
32-bit integer registers. Users of syncLevel write to these registers
to register and unregister for the syncLevel they require:
syncLevelSyncStateRegister
Users write to this register for SYNC_STATE
.
Write-only.
syncLevelSyncStateUnregister
Users write this to unregister for SYNC_STATE
.
Write-only.
syncLevelPostInsnIORegister
Users write to this register for POST_INSN_LDST
.
Write-only.
syncLevelPostInsnIOUnregister
Users write this to unregister for POST_INSN_LDST
.
Write-only.
syncLevelPostInsnAllRegister
Users write this to register for POST_INSN_ALL
.
Write-only.
syncLevelPostInsnAllUnregister
Users write this to unregister for POST_INSN_ALL
.
Write-only.
The following registers are only provided for debugging purposes and visibility in the debugger, and are usually not accessed by syncLevel users at all:
syncLevel
Current syncLevel. Read-only.
syncLevelSyncStateCount
User counter. Read-write (should be used read-only).
syncLevelPostInsnIOCount
User counter. Read-write (should be used read-only).
syncLevelPostInsnAllCount
User counter. Read-write (should be used read-only).
minSyncLevel
Same as min_sync_level
parameter
(as follows). Read-write.
The *Register and *Unregister registers are intended to be
used, that is, written, by syncLevel users to register and unregister
themselves. The value written is ignored and should be 0. Changes
to the syncLevel become effective at the next Stop event
checkpoint. In addition, these registers can be written
any time before simulation is running, for example from the init()
simulation
phase. The change then takes effect immediately when the simulation
is run.
All other registers are only present to make the debugging of these mechanisms and their users easier. The syncLevel enables you to see what kind of performance can currently be expected from the model. You must treat access to these registers as read-only. Writing to them is permitted, however, to permit debugging the syncLevel mechanisms.
These registers are not memory (or CPnn-) mapped anywhere, and are not accessible to target programs.
In addition to this debug register interface, there is a CADI parameter that can influence the syncLevel:
min_sync_level (default=0, type=int, runtime=true)
This parameter enables you to control the minimum syncLevel
by the CADI parameter interface. This is not the intended primary
interface to control the syncLevel because it does not enable multiple
independent syncLevel users to indicate their requirements to the
simulator. It is intended primarily for debugging purposes and for
situations where a single global setting of syncLevel is sufficient.
Changes to this parameter at runtime are permitted and become effective on
the next Stop event checkpoint. Reading this
parameter value returns the min_sync_level
,
not the current syncLevel. This parameter is only an additional
way of controlling the syncLevel and controls the same mechanisms
as the register interface.