
MAC2424
S3FB42F
25-22
The modulo calculation examples are as follows.
1.
Full Modulo with Step = 1 (selected by instruction and index register value)
MC0 = 000_001_0000000111 (Upper Boundary = 7, Lower Boundary = 0, Modulo Size = 8)
RPi = 0010h
0010h
→ 0011h → 0012h → 0013h → 0014h → 0015h → 0016h → 0017h → 0010h → 0011h
2.
Full Modulo with Step = 3 (selected by instruction and index register value)
MC0 = 000_001_0000000111 (Upper Boundary = 7, Lower Boundary = 0, Modulo Size = 8)
RPi = 0320h
0320h
→ 0323h → 0326h → 0321h → 0324h → 0327h → 0322h → 0325h → 0320h → 0323h
3.
Part Modulo with Step = -2 (selected by instruction and index register value)
MC0 = 000_001_0000000101(Upper Boundary = 5, Lower Boundary = 0, Modulo Size = 8)
RPi = 2014h
2014h
→ 2012h → 2010h → 2014h → 2102h
The total number of circular buffer (modulo addressing active area) is defined by 32K/Modulo size. i.e. if current
modulo size is 32, the total number of circular buffer is 1024.
Bit Reverse Capabilities
The bit-reverse addressing is useful for radix-2 FFT(Fast Fourier Transform) calculations. The MAC2424 DSP
coprocessor does not support the bit-reverse addressing itself. But it supports the bit field reverse capabilities in the
form of instruction. The "ERPR" instruction selects a source address pointer RPi and performs bit reverse operation
according to the bit field specified in bit 15 to bit 13 of MC1 register. The result bit pattern is written to the RP3
register pointer field. (bit 14 to bit 0) In this way, RP3 has a bit-reversed address value of source pointer value. Note
that the data buffer size is always a power of 2 up to 2
12.
Index Extension
When an instruction with indirect addressing is executed, the current value of selected address pointer register RPi
provides address on XA and YA buses. Meanwhile, the current address is incremented by the value contained into
the selected index value contained into the selected bit field of selected index register, and stored back into RPi at
the end of instruction execution.
The 4-bit index values can be considered as a signed number, so the maximum increment value is 7(0111b) and the
maximum decrement value is –8(1000b). If the 4-bit index value is insufficient for use, the index values can be
extended to 8-bit values when RP0 or RP3 register is selected as an address pointer register. In this case, all index
values are extended to 8-bit by concatenating with SD0E or SD3E register. The bit field of SD0E and SD3E is the
same as other index register SDi. The index extension registers are enabled when the XSD bit of MSR0 register is
set. Otherwise, those are disabled. If the extension index registers are enable, index values for indirect addressing
becomes to 8-bit during addressing with RP0 and RP3 pointer register, and current index register becomes the
extended index register instead of the regular index register: i.e. When a index register is read or written by a load
instruction, SD0E register or SD3E register is selected as a source operand or a destination operand, instead of SD0
or SD3 register. For each of SD0/SD0E or SD3/SD3E, only one register is accessible at a time.