Assignment No 3 Embedded
Assignment No 3 Embedded
Assignment No: 03
1. Explain Circular Addressing in detail.
ANSWER:
DSP operations are typically computations involving an infinite stream of real-time data. The data is
accumulated into a buffer, and the oldest sample is overwritten by the newest sample. The block size
for this circular buffer should be specified and reserved in physical memory. The memory basically has
a round-robin FIFO instantiated within it. Access is provided by a base address for the memory, and a
system of pointers.
While processing the data samples coming continuously in a sequential manner, circular buffers are used. In a
circular buffer the data samples are stored sequentially from the initial location till the buffer gets filled up. Once
the buffer gets filled up, the next data samples will get stored once again from the initial location. This process
can go forever as long as the data samples are processed in a rate faster than the incoming data rate. Circular
Addressing mode requires three registers viz
a) Pointer register to hold the current location (PNTR)
b) Start Address Register to hold the starting address of the buffer (SAR)
c) End Address Register to hold the ending address of the buffer (EAR)
There are four special cases in this addressing mode. They are
a. SAR < EAR & updated PNTR > EAR
b. SAR < EAR & updated PNTR < SAR
c. SAR >EAR & updated PNTR > SAR
d. SAR > EAR & updated PNTR < EAR
The buffer length in the first two case will be (EAR-SAR+1) whereas for the next tow cases (SAREAR+1).
The pointer updating algorithm for the circular addressing mode is as shown below.
2. Discuss Arithmetic Logical Unit of TMS320C54x in detail.
ANSWER:
ALU performs 2’s complement arithmetic operations and bit level Boolean operations on 16-,
32-, and 40-bit words.
Also function as 2 separate 16-bit ALUs and perform two 16-bit operations simultaneously.
ACCUMULATORS
1 Accumulators A,B store output from the ALU or the multiplier/adder block.
2 They also provide second input to ALU and accumulator A can be an input to the multiplier
block.
3 Either of the accumulators can be used as temporary storage for the other.
4 Accumulator divides into:
4.1 Guard bits(bits 39-32)
4.2 High-order word(bits 31-16)
4.3 Low-order word(bits 15-0)
BARREL SHIFTER
1. It provides the capability to scale the data during an operand write or read.
2. It has a 40-bit input connected to the accumulators or to data memory (using CB or DB)
and a 40-bit output connected to the ALU or to data memory(using EB)
3. It produces a left shift of 0 to 31 bits and a right shift of 0 to 16 bits on the input data.
4. The shift requirements are defined in the shift count field of the instruction, shift count
field of status register ST1 or in the temporary register T.
Multiplier has 2 inputs:
Selected from T, a data memory operand, or Accumulator A
Selected from program memory, data memory, Accumulator A or an intermediate value
Fast on-chip multiplier allows convolution, correlation and filtering
Multiplier + ALU together execute MAC computations & ALU operations in parallel in a single
instruction cycle.
This function is used in determining the Euclidian distance and in implementing symmetrical
and LMS filters which are required for complex algorithms
INTR: Interrupt vector pointer, point to the 128-word program page where the interrupt vectors reside.
MP/MC: Microprocessor/Microcomputer mode,
MP/MC=0, the on chip ROM is enabled,
MP/MC=1, the on chip ROM is enabled.
OVLY: RAM OVERLAY, OVLY enables on chip dual access data RAM blocks to be mapped into program
space.
AVIS: It enables/disables the internal program address to be visible at the address pins.
DROM: Data ROM, DROM enables on-chip ROM to be mapped into data space.
CLKOFF: CLOCKOUT off.
SMUL: Saturation on multiplication.
SST: Saturation on store
○ Data-Read Data Buses (BB, CB, DB): These three buses carry 16-bit data from data space or I/O
space to functional units of the CPU. BB only carries data from internal memory to the D unit (primarily
to the dual multiply-and-accumulate (MAC) unit).
○ Data-Read Address Buses (BAB, CAB, DAB): These three buses carry 23-bit word data addresses
to the memory interface unit, which then fetches the data from memory and transfers the requested
values to the data-read data buses.
○ Program-Read Data Bus (PB): PB carries 32 bits (4 bytes) of program code at a time to the I unit,
where instructions are decoded.
○ Program-Read Address Bus (PAB): PAB carries the 24-bit byte program address of the program
code that is carried to the CPU by PB.
○ Data-Write Data Buses (EB, FB): These two buses carry 16-bit data from functional units of the
CPU to data space or I/O space. EB and FB receive data from the P unit, the A unit, and the D unit.
○ Data-Write Address Buses (EAB, FAB): These two buses carry 23-bit addresses to the memory
interface unit, which then receives the values-driven on the data-write data buses.