Post Go back to editing

# 1701 division block

Hi all

I thought I understood the Q number code system but I did the following test

Using 2 DC generators with 0.1 and 0.01 outputs in 5.23 format and the division block the read back output is 1.6?

Can anyone shed any light on this?

1/0.7 = 1.41 and 1/0.07 = 14.1 so some of the numbers work as they should.

John

Parents
•      Hello John,

That's quite an interesting find you made.  Apparently the Sigma 100 (ADAU170x, etc) divide block works by something like the Newton-Raphson method (see http://en.wikipedia.org/wiki/Division_algorithm) -- which first finds the reciprocal of the divisor, then multiplies by the dividend.  Thus when the divisor is smaller than (1/15.99 = 0.0625), this intermediate result saturates at 15.99... and the final output becomes 15.99 multiplied by the dividend -- in your case, 15.99 x 0.1 = 1.599.  This effect is demonstrated in the circuit below, where the standard divide algorithm and an explicit reciprocal method gives identical results.

Inside some algorithms such as  filters, multiplication products exceeding 16 are allowed by a double-precision multiply -- for some reason the -1701 divide algorithm does not (or cannot) take advantage of this.

Finding the reciprocal requires several iterations, which is why the division block uses many instructions -- but it gives you the quotient within the same sample interval.  If you need a divide algorithm for slow-moving signals such as envelopes within a compressor side chain, you could try an implicit divide as shown above.  It uses a feedback method, reducing the error over many samples.  Just like an op-amp circuit, it could go unstable with certain inputs -- if you use it, you'll need to test it with the range of inputs you expect in your application.  Or you could scale your inputs to the present divide block to avoid divisors smaller than 0.0625.

Finally, the new Sigma 300 (ADAU145x) processor has built-in log and exponent functions, thus it can perform "true" division with fewer instructions.

Best regards,

Bob

•      Hello John,

That's quite an interesting find you made.  Apparently the Sigma 100 (ADAU170x, etc) divide block works by something like the Newton-Raphson method (see http://en.wikipedia.org/wiki/Division_algorithm) -- which first finds the reciprocal of the divisor, then multiplies by the dividend.  Thus when the divisor is smaller than (1/15.99 = 0.0625), this intermediate result saturates at 15.99... and the final output becomes 15.99 multiplied by the dividend -- in your case, 15.99 x 0.1 = 1.599.  This effect is demonstrated in the circuit below, where the standard divide algorithm and an explicit reciprocal method gives identical results.

Inside some algorithms such as  filters, multiplication products exceeding 16 are allowed by a double-precision multiply -- for some reason the -1701 divide algorithm does not (or cannot) take advantage of this.

Finding the reciprocal requires several iterations, which is why the division block uses many instructions -- but it gives you the quotient within the same sample interval.  If you need a divide algorithm for slow-moving signals such as envelopes within a compressor side chain, you could try an implicit divide as shown above.  It uses a feedback method, reducing the error over many samples.  Just like an op-amp circuit, it could go unstable with certain inputs -- if you use it, you'll need to test it with the range of inputs you expect in your application.  Or you could scale your inputs to the present divide block to avoid divisors smaller than 0.0625.

Finally, the new Sigma 300 (ADAU145x) processor has built-in log and exponent functions, thus it can perform "true" division with fewer instructions.

Best regards,

Bob

Children
No Data