dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 229

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Chapter 7
Bit-Manipulation Unit
The bit-manipulation unit performs bitfield operations on data memory and registers within the
DSP56800E core. It is capable of testing, setting, clearing, or inverting any bits that are specified in a
16-bit mask. This unit also performs test-and-set operations, which test and update a value in a single
atomic, non-interruptible operation. Test-and-set instructions are especially useful for implementing
semaphores and other key system-programming operations.
The bit-manipulation unit can perform the following operations:
The bit-manipulation unit is connected to the major data buses within the DSP56800E core, enabling it to
manipulate data ALU registers, AGU registers, and peripheral registers as well as locations in memory.
There is no need to transfer data to dedicated bit-manipulation unit registers; in fact, the bit-manipulation
unit does not have any registers. This design greatly improves program and compiler efficiency.
This chapter describes the architecture and operation of the bit-manipulation unit. It also covers the use of
the ANDC, EORC, ORC, and NOTC instructions for performing logical operations with immediate data.
A variety of programming techniques for using the bit-manipulation instructions more effectively is also
presented.
Freescale Semiconductor
Testing selected bits in a 16-bit word:
— BFTSTH: Test a selected set of bits for all ones
— BFTSTL: Test a selected set of bits for all zeros
Testing selected bits in the upper or lower byte of a word and branching accordingly:
— BRSET: Branch if a selected set of bits is all ones
— BRCLR: Branch if a selected set of bits is all zeros
Testing and modifying bits in a 16-bit word:
— BFSET: Test and then set a selected set of bits
— BFCLR: Test and then clear a selected set of bits
— BFCHG: Test and then invert a selected set of bits
The bitfield operations cannot be performed on program memory
locations, the Y register, or the HWS register.
Bit-Manipulation Unit
NOTE:
7-1

Related parts for dsp56800e