Tools for Sound Processing
159
reading a 4KWord table: only the 12 most significant bits of the phase are used
to address the table, the remaining 12 bits
29
being considered as the fractional
part of the address and assigned to a register ALFA. If the 12 bits of the phase
give the value n, an interpolated read of the table will return the value
30
y = (1 - ALF A)table(n) + ALF A table(n + 1)
(1)
With an increasing table size, the number of bits available for the fractional part
decreases, and indeed this corresponds to a decrease in accuracy of interpolation
for tables larger than 64KWord.
B.5.2
Internal Arithmetics
The data memories of the X20 processor are made of 24-bit locations, and 24
bits are also used for the registers feeding the ALU and for the busses C, Z,
and W. On the other hand, we have only 16 bits for external functions and
for the registers feeding the MUL. The internal arithmetics of the X20 can be
summarized as:
· Representation of signals in two's complement fixed point, with normal-
ization to one;
· Algebraic sum with 24-bit precision;
· Multiplication of two 16-bit numbers with 24-bit result;
· Tables and delay lines stored with 16-bit precision (FUN memory)
· 16-bit digital-to-analog and analog-to-digital conversion.
The addition can be performed as follows
· Normal mode: For the result, all the field of two's complement 24-bit
numbers is used, with no handling of overflows. Ex.: 500000
16
+400000
16
=
900000
16
= -700000
16
.
· Overflow-protected mode: when an overflow occurs the result is set to the
maximum or minimum representable number. Ex.: 500000
16
+ 400000
16
=
900000
16
= 7F F F F F
16
.
· Zero-protected mode: every negative result is forced to be zero.
· Overflow- and Zero-protected mode: the sum is first executed in overflow-
protected mode, and any negative result is forced to be zero.
The first mode is useful whenever one has to generate cyclic waveforms or ac-
cess to the memory cyclically, for instance to compute the phase pointer of an
oscillator. The second mode is used when we are doing signal processing, since it
protects from large-amplitude discontinuities and limit cycles (see section 1.6).
The following table shows some examples of sums performed with the different
29
Actually, only the first 8.
30
The reader may observe that for ALFA equal to zero, the value table(n) is returned, while
for ALFA equal to one the returned value is table(n + 1).
Next Page >>
<< Previous Page
Back to the Table of Contents