
ADSP-BF50x Blackfin Processor Hardware Reference
25-3
System Design
Semaphore coherency is guaranteed by using the test and set byte (atomic)
instruction (TESTSET). The TESTSET instruction performs these
functions.
• Loads the half word at memory location pointed to by a P-register.
The P-register must be aligned on a half-word boundary.
• Sets
CC
if the value is equal to zero.
• Stores the value back in its original location (but with the most sig-
nificant bit (MSB) of the low byte set to 1).
The events triggered by
TESTSET
are atomic operations. The bus for the
memory where the address is located is acquired and not relinquished
until the store operation completes. In multithreaded systems, the
TESTSET
instruction is required to maintain semaphore consistency.
To ensure that the store operation is flushed through any store or write
buffers, issue an
SSYNC
instruction immediately after semaphore release.
The
TESTSET
instruction can be used to implement binary semaphores or
any other type of mutual exclusion method. The
TESTSET
instruction sup-
ports a system-level requirement for a multicycle bus lock mechanism.
The processor restricts use of the
TESTSET
instruction to the external mem-
ory region only. Use of the
TESTSET
instruction to address any other area
of the memory map may result in unreliable behavior.
Example Code for Query Semaphore
Listing 17-1 provides an example of a query semaphore that checks the
availability of a shared resource.
Содержание EZ-KIT Lite ADSP-BF506F
Страница 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 132: ...Unique Information for the ADSP BF50x Processor 4 22 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 342: ...Unique Information for the ADSP BF50x Processor 7 106 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 484: ...Unique Information for the ADSP BF50x Processor 10 60 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 493: ...ADSP BF50x Blackfin Processor Hardware Reference 11 9 Core Timer Unique Information for the ADSP BF50x Processor None ...
Страница 494: ...Unique Information for the ADSP BF50x Processor 11 10 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 506: ...Unique Information for the ADSP BF50x Processor 12 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 544: ...Unique Information for the ADSP BF50x Processor 13 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 712: ...Unique Information for the ADSP BF50x Processor 16 62 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 972: ...Unique Information for the ADSP BF50x Processor 20 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...