XMOS VocalFusion XVF3510 User Manual page 82

Table of Contents

Advertisement

The bytes sequence sent between I2C start and stop for SET_ commands is shown in the figure below.
For GET_ commands, the I2C commands sequence consists of a write command followed by a read
command with a repeated start between the 2 commands. The write command writes the resource ID,
command ID and the expected data length to the device and the read command reads the status byte
followed by the rest of the payload that makes up the control parameter value. The figure below shows
the I2C bytes sequence sent and received for a GET_ command.
TRANSPORTING CONTROL PARAMETERS OVER USB
Use the vendor_id 0x20b1, product_id 0x0014 and interface number 3 to initialize for USB. The API
function
libusb_control_transfer()
libusb_control_transfer(), wIndex corresponds to the Resource ID, wValue is the Command ID and
wLength is the payload length.
FLOATING POINT TO FIXED POINT (Q FORMAT) CONVERSION
Numbers with fractional parts can be represented as floating-point or fixed-point numbers. Floating
point formats are widely used but carry performance overheads. Fixed point formats can improve
system efficiency and are used extensively within the XVF3510. Fixed point numbers have the position
of the decimal point fixed and this is indicated as a part of the format description.
In this document, Q format is used to describe fixed point number formats, with the representation
m
n
given as Q
.
format where
n
number and
is the number of bits reserved for the fractional part of the number. The position of the
decimal point is a trade-off between the range of values supported and the resolution provided by the
fractional bits.
m
The dynamic range of Q
To convert a floating-point format number to Q
}
Multiply the floating-point number by 2
}
Round the result to the nearest integer.
}
The resulting integer number is the Q
number.
m
n
To convert a Q
.
fixed-point number to floating-point:
}
Divide the fixed-point number by 2
}
The resulting decimal number is a floating-point representation of the fixed-point number.
Converting a number into fixed point format and then back to a floating point number may introduce
n+1)
an error of up to ±2
-(
Example:
To represent a floating-point number 14.765467 in Q8.24 format, the equivalent fixed-point number
would be 14.765467 x 2
24
To get back the floating-point number given the Q8.24 number 247723429, calculate 247723429 ÷ 2
and get back the floating-point number as 14.76546699. The difference of 0.00000001 is correct to
with the error bounds of ±2
XM-014232-PC
is
used
for
m
is the number of bits reserved for the sign and integer part of the
n
m
m
.
format is -2
-1
and 2
-1
-2
m
n
.
format fixed-point number:
m
.
m
.
n
fixed-point representation of the initial floating-point
m
.
= 247723429.2 which rounds to 247723429.
which is ±0.00000003
-25
transporting
over
n
n
-
with a resolution of 2
-
USB.
When
calling
24
82

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vocalfusion xvf3510-intVocalfusion xvf3510-ua

Table of Contents