background image

 

XM-014232-PC 

 

50 

 

Table 4-12   Filter output indexes available to be used with filter setting commands 

 

CHANNEL 

VALUE  DEFINITION 

FILTER_USB_FROM_DEVICE_0 

USB channel 0 from device to host (Left) 

FILTER_USB_FROM_DEVICE_1 

USB channel 1 from device to host (Right) 

FILTER_I2S_FROM_DEVICE_0 

I2S channel 0 from device (Left) 

FILTER_I2S_FROM_DEVICE_1 

I2S channel 1 output from device (Right) 

FILTER_MIC_TO_PIPELINE_0 

16kHz mic channel 0 going into the pipeline 

FILTER_MIC_TO_PIPELINE_1 

16kHz mic channel 1 going into the pipeline 

FILTER_REF_TO_PIPELINE_1 

16kHz reference channel 0 going into the pipeline (Left) 

FILTER_REF_TO_PIPELINE_1 

16kHz reference channel 1 going into the pipeline (Right) 

 

While  setting  the  index  or  bypass  control  will  always  be  safe,  there  is  a  small  chance  that  the 
coefficients may be partially updated halfway through a filter operation. For this reason, the filter state 
is also cleared following updating to ensure that any possibility of instability is reduced. It is up to the 
user to ensure that the coefficients provided result in a stable filter configuration. 

See Appendix G for a worked example on filter definition. 

 

 

Summary of Contents for VocalFusion XVF3510

Page 1: ...VocalFusion XVF3510 USER GUIDE V4 0...

Page 2: ...ce applications 10 3 Principles of configuration control and usage 11 3 1 Firmware release package 11 3 1 1 bin Directory 12 3 1 2 data partition Directory 12 3 1 3 host Directory 12 3 2 Required Tool...

Page 3: ...Interface 33 4 3 2 USB HID 34 4 3 3 I2C Slave Control interface XVF3510 INT only 35 4 3 4 General Purpose Input and Output and Peripheral Bridging 35 4 3 5 General purpose I O pINS 36 4 3 6 General p...

Page 4: ...TER SUMMARY 65 APPENDIX B BOOT STATUS CODES RUN_STATUS 75 APPENDIX C EXAMPLE SPISPEC FILE FORMAT 76 APPENDIX D SPI BOOT CUSTOM CONNECTION 77 APPENDIX E USB ENUMERATION 78 APPENDIX F USB HID EXAMPLE US...

Page 5: ...In addition to its class leading voice processing the XVF3510 Voice processor provides a comprehensive set of interfaces and configuration options to simplify the integration of a voice interface int...

Page 6: ...nal for the Acoustic Echo Cancellation function Figure 1 1 XVF3510 INT Integrated configuration 1 3 2 XVF3510 UA CONFIGURATION The XVF3510 UA device replaces the I2C interface of the XVF3510 INT with...

Page 7: ...cally or The firmware image is downloaded to the XVF3510 processor over the SPI interface by the host processor on the system board Selection of the boot mode is made via setting the QSPI_D1 BOOTSEL p...

Page 8: ...interface which supports a UAC audio device and device control over USB The following sections describe the voice pipeline and the surrounding infrastructure in more detail 2 2 AUDIO PROCESSING PIPELI...

Page 9: ...io pipeline discussed above produces two separate audio streams one specifically tuned for integration with keyword and ASR services and the other designed for conferencing and communication applicati...

Page 10: ...mplements a UAC1 0 audio device to interface to the host system The USB interface also supports an Endpoint 0 control channel and a USB HID to signal input events to the host The system architecture o...

Page 11: ...nfiguration parameters of the XVF3510 The following sections describe the following aspects of usage configuration and control Firmware release package xTIMEComposer Tools vfctrl host command line too...

Page 12: ...default data partition image source files int json or ua json as well as the generic flash device specification 16mbit_12 5mhz_sector_4kb spispec data partition generation scripts and short instructi...

Page 13: ...here in the xTIMEcomposer User Guide http www xmos com file tools user guide The XVF3510 Voice Processor is provided in two pre compiled builds UA and INT and as such only requires the usage of the xT...

Page 14: ...0 dev MAC OS The XCode Command Line tools are required to build in on macOS The following command can be used to install the tools xcode select install 3 3 COMMAND LINE INTERFACE VFCTRL To allow comma...

Page 15: ...vided as two pre compiled builds UA and INT which provide a parameter control mechanism over USB endpoint 0 and I2C respectively Device functions have controllable parameters for the audio pipeline GP...

Page 16: ...the XVF3510 UA or XVF3510 INT Release Package This configures the underlying operation of the device The Data Partition configures a running Boot image instance at startup with a set of commands which...

Page 17: ...shown below Figure 3 1 Signal flow of the VocalFusion development kit for Amazon AVS XVF33510 INT The VocalFusion development kit provides a USB connection for audio and control This can be used for...

Page 18: ...alfusion At the time of writing v4 0 is the latest released version 3 Connect the XTAG Debugger to the system using the micro USB connection plug the debugger into the XTAG connector marked DEBUG ONLY...

Page 19: ...VS DEMONSTRATION The VocalFusion dev kit for Amazon AVS uses the XVF3510 INT to provide far field voice to an AVS client running on a Raspberry Pi not provided in development kit The VocalFusion Devel...

Page 20: ...oard Computer SBC systems running Linux or Android The VocalFusion dev kit user guide https www xmos com file vocalfusion dev kit user guide and the VocalFusion development kit quick start guide https...

Page 21: ...ll Driver Once installed the vfctrl_usb utility is ready to use The following steps explain how to use the host control utility 1 Copy the host directory of the Firmware Release Pack to the host platf...

Page 22: ...and binary Data Partitions to protect the device from accidental DFU of incompatible image partition pair dfu_usb dfu_i2c DFU utilities for XVF3510 UA XVF3510 INT respectively vfctrl_usb vfctrl_i2c V...

Page 23: ...ssed audio output TO host USB UAC 1 0 48k samples s PCM 16 bit resolution I2S bus 48k samples s PCM 32 bit resolution Y prior to microphone and I2S start up Audio format to host 2 channel two differen...

Page 24: ...SB DFU specification it has diverged to accommodate both USB and I2C operation and therefore is not compatible with compliant USB DFU tools The following sections discuss the structure of data within...

Page 25: ...t eg host Win32 bin and the source code for the DFU utility is provided in the host src dfu directory For more information on building the host applications refer to the build instruction file in host...

Page 26: ...equivalent to the USB identifiers for I2C systems However even though the checking is bypassed for the XVF3510 INT the suffix must be added to both Upgrade and Data partition files as the DFU utility...

Page 27: ...ACTORY RESTORE To restore the device to its factory configuration effectively discarding any upgrades made the same process as outlined above is followed but using a blank Boot Image and Data Partitio...

Page 28: ...s are different the following section explains how to define a custom flash interface Details of the flash device used to store the Boot Image and Data Partition data must be specified in two location...

Page 29: ...dix D SPI Boot custom connection Following an SPI boot the XVF3510 will not read any Data Partition that may be present in flash memory It is expected that configuration is programmed though the Vocal...

Page 30: ...t comment path input xmos_usb_params txt comment path input i2s_rate_16k txt comment path input led_after_boot txt comment Comment pairs are provided for the json configuration but also the individual...

Page 31: ...equires the use of Python 3 Installation is covered in Required Tools section The required additional control commands should be stored in an appropriately named text file inside the data partition in...

Page 32: ...ctrl_i2c GET_SERIAL_NUMBER USB DEVICE ENUMERATION XVF3510 UA ONLY The XVF3510 UA additionally allows the Serial Number to be copied into the iSerialNumber field of the USB descriptor As the host reads...

Page 33: ...uint32 1 Write only register setting the behaviour of iSerialNumber field in USB descriptor 1 Load from Flash Serial Number 0 Default to 0 See notes A B SET_USB_TO_DEVICE_RATE GET_USB_TO_DEVICE_RATE u...

Page 34: ...y the host it will either reply with a de assert report default or NAK set to idle by the host NOTE HID idle behaviour is platform specific and rarely the high level application code will have any con...

Page 35: ...dging over USB and I2C for the XVF3510 UA and XVF3510 INT respectively This allows peripheral devices such as audio hardware connected to XVF3510 to be configured and monitored by the host Figure 4 2...

Page 36: ...g commands are available to read and control GPIs Note that interrupt registers are set to 1 when an edge has been detected and 0 when no event has occurred All interrupt registers are initialised to...

Page 37: ...terrupt on For example a read operation on XVF3510 UA is illustrated below To read the level of pin 2 of the input port first set the port index always 0 for XVF3510 and the pin index 2 in this case v...

Page 38: ...to a specific GPIO pin Arguments are Port Index Pin Index Value SET_GPO_PIN_ACTIVE_LEVEL uint8 WRITE 3 Set the active level for a specific GPO pin Arguments are Port Index Pin Index 0 active low 1 act...

Page 39: ...of GPO The following commands configure the following GPO pin 0 blinking ON for 1 6 seconds then OFF for 1 6 seconds i e a period of 3 2 seconds GPO pin 1 blinking ON for 0 8 seconds then OFF for 0 8...

Page 40: ...C or GET_I2C_WITH_REG command Arguments 1 The 7 bit I2C slave device address 2 The register address within the device 3 The number of bytes to read GET_I2C_READ_HE ADER uint8 READ 0 3 Get the paramete...

Page 41: ...Data bytes All 54 values must be given but only n will be sent SET_I2C_WITH_REG uint8 WRITE 56 0 Write to a specific register of an I2C slave device Arguments 1 The 7 bit I2C slave device address 2 Th...

Page 42: ...t variadic variable number of arguments Hence even when writing a single byte the full number of arguments must be passed Unwritten values are ignored USING THE I2C MASTER TO READ FROM A DEVICE To ver...

Page 43: ...N GET_SPI uint8 READ 56 Gets the contents of the SPI read buffer GET_SPI_READ_HEADER uint8 READ 2 Get the address and count of next SPI read SET_SPI_PUSH uint8 WRITE 56 Push SPI command data onto the...

Page 44: ...rites values 0 to 69 to address 100 70 bytes in total using command to push 56 data values into the queue followed by a push the remaining 14 data words and then execute the transfer vfctrl_usb SET_SP...

Page 45: ...I2 S Inserting audio filtering where a speaker is connected downstream of the XVF3510 via I2 S The blocks supported are as follows Signal Multiplexers These allow dynamic selection switching of signa...

Page 46: ...e gain on the raw mic signals before entering the pipeline arg1 shift value left shift arg2 saturate enable if 1 Where the Destination channels available to be mapped are referenced as follows Table 4...

Page 47: ...D_REF 15 pack 16kHz reference input to pipeline on some 48kHz output See Appendix J Capturing packed samples for further information PACKED_ALL 16 pack 1 channel of 16kHz mic reference input and pipel...

Page 48: ...48kHz I2 S output vfctrl_usb SET_IO_MAP 2 16 vfctrl_usb SET_IO_MAP 3 16 By using Raspberry Pi with I2 S slave interface configured the user can then capture synchronized signals of mic reference and p...

Page 49: ...handled as a saturation it is up to the designer to ensure no saturation occurs from the coefficients chosen to avoid non linear behaviour of the filter The implementation offers three bits of headro...

Page 50: ...LINE_1 5 16kHz mic channel 1 going into the pipeline FILTER_REF_TO_PIPELINE_1 6 16kHz reference channel 0 going into the pipeline Left FILTER_REF_TO_PIPELINE_1 7 16kHz reference channel 1 going into t...

Page 51: ...requency response of the FIR filter has a stopband attenuation of at least 70dB with a passband ripple of less than 0 9dB and a passband of 6 8kHz The total group delay from pin to the XVF3510 audio p...

Page 52: ...peakers The models continually adapt to the acoustic environment to accommodate changes in the room created by events such as doors opening or closing and people moving about The figure below illustra...

Page 53: ...GET_ERLE_CH0_AEC float Get AEC ERLE for channel 0 GET_ERLE_CH1_AEC float Get AEC ERLE for channel 1 RESET_FILTER_AEC This command resets all AEC filters A When the Alternative Architecture ALT_ARCH mo...

Page 54: ...inserted into one of the two paths correcting this delay difference Figure 4 13 ADEC use case diagram The functional blocks in the ADEC are shown below Figure 4 14 ADEC block diagram Delay correction...

Page 55: ...me time This is typically only seen in USB configurations Host processor performance leading to poor USB buffer management The characteristics and specification of the ADEC function is shown below Tab...

Page 56: ...Normal AEC mode 1 delay estimation in progress SET_MANUAL_ADEC_CYCLE_TRI GGER uint32 Trigger a delay estimation cycle The default behaviour in firmware is to trigger a coarse grain delay estimation cy...

Page 57: ...at the automatic fine grain delay control sets if SET_LOCKER_DELAY_SETPOINT_ENABLED is set to 1 and the fine grain estimator fails to converge to a delay GET_LOCKER_STATE STRING Get the current state...

Page 58: ...ground noise and stationary noise sources The following table describes the settings for the Noise Suppressor Table 4 18 Noise Suppressor NS commands COMMAND TYPE VALUE DESCRIPTION SET_BYPASS_SUP GET_...

Page 59: ...OMMAND TYPE VALUE DESCRIPTION SET_ADAPT_CH0_AGC SET_ADAPT_CH1_AGC GET_ADAPT_CH0_AGC GET_ADAPT_CH1_AGC uint32 0 1 Set to enable gain adaptation in the AGC for channel 0 or 1 0 adaptation disabled for t...

Page 60: ...g on the energy in the AEC reference signal to recover resources to be used to increase the specification of the remaining pipeline The two audio pipeline configurations are summarised below ALT_ARCH...

Page 61: ...condition the AEC is able to make use of additional memory increasing the echo cancelling period and making it more resilient to echo in highly reverberant conditions Figure 4 16 Audio pipeline config...

Page 62: ...C disabled No cancellation ALT_ARCH 1 Far end audio present IC disabled AEC enabled Max echo delay 225mS The following table describes the configuration parameters for the Alternative Architecture Tab...

Page 63: ...software vocalfusion 6 REVISION HISTORY DOCUMENT VERSION RELEASE DATE CHANGE DESCRIPTION XM 014232 PC 2 23 Jul 2020 Describes V4 0 Firmware operation Note this document supersedes XM 013914 PC XVF351...

Page 64: ...rmat Appendix D Custom connection for SPI Booting of XVF3510 UA on Development kit Appendix E USB Enumeration data Appendix F USB HID Development kit worked example Appendix G General purpose filter e...

Page 65: ..._ and SET_ for Read and Write respectively BASIC PARAMETERS The following table lists the parameters which allow configuration and control of the device in most applications Table A 1 Basic parameter...

Page 66: ...layed start mode IO_MAP W Set IO map for the device arg1 dest arg2 source IO_MAP_AND_SHIFT R Get IO map and output shift values for the device OUTPUT_SHIFT W For a selected output set the no of bits t...

Page 67: ...S MCLK_IN_TO_PDM_CLK _DIVIDER R W xCORE divider from input master clock to 6 144MHz DDR PDM microphone clock 2 2 ADEC_ENABLED R W Automatic delay estimator controller enabled 0 off 1 on 0 0 ADEC_MODE...

Page 68: ...AW R W Set raw biquad coeffs for a selected filters arg1 10 2 sets of coeffs in forward order b0 b1 b2 E1 a2 signed Q28 format 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FILTER_INDEX R W Set filter index...

Page 69: ...r adapt with variable stepsize 1 filter adapt with fixed stepsize 2 filter fixed 0 0 BYPASS_AEC R W AEC bypass 1 1 COEFF_INDEX_AEC R W AEC coefficient index 0 0 ERLE_CH0_AEC R AEC channel 0 ERLE ERLE_...

Page 70: ...R_IC W IC reset filter note do not prefix with SET_ SIGMA_ALPHA_IC R W IC adaptation config 11 11 X_ENERGY_DELTA_IC R W IC X energy delta X_ENERGY_GAMMA_LOG 2_IC R W IC X energy gamma log2 BYPASS_SUP...

Page 71: ...ENABLED R W Locker delay detection and control 0 0 LOCKER_NUM_BAD_FRA MES_THRESHOLD R W No of bad peak to avg ERLE frames that locker sees before it triggers ADEC 666 666 LOCKER_STATE R Locker state B...

Page 72: ...frame MIN_DSP_TIME_STAGE_B R Stage B min dsp time per frame MIN_IDLE_TIME_STAGE_B R Stage B min idle time per frame MIN_RX_TIME_STAGE_B R Stage B min rx time per frame MIN_TX_TIME_STAGE_B R Stage B m...

Page 73: ...time per frame MAX_DSP_TIME_STAGE_C R Stage C max dsp time per frame MAX_GAIN_CH0_AGC R W Max gain for channel 0 999 9847 999 9847 MAX_GAIN_CH1_AGC R W Max gain for channel 1 999 9847 999 9847 MAX_ID...

Page 74: ...e 6 3 XMOS Internal Information PARAMETER READ WRITE DESCRIPTION 3510 UA DEFAULT 3510 INT DEFAULT BLD_HOST R Build host Jenkins Jenkins BLD_MODIFIED R Build modified from given view hash false false B...

Page 75: ...m reading data partition header Check factory programming May indicate that no data partition is present or a flash wear issue 12 HW_BUILD_TAG_ERROR Problem reading data partition header Check factory...

Page 76: ...ivider 0x9F QSPI_RDID 0 id dummy bytes 3 id size in bytes 0 device id leave zero 0x20 QSPI_SE 4096 Sector erase is always 4KB 0x06 QSPI_WREN 0x04 QSPI_WRDI PROT_TYPE_SR Protection via SR 0x18 0x00 0 0...

Page 77: ...ibbon cable between the PiHat and the XVF3510 device must be disconnected and the following pins must be connected SIGNAL CONNECTION ODD PINS CONNECTOR ODD PINS CONNECTOR EVEN PINS SIGNAL CONNECTION E...

Page 78: ...e 20b1 0014 03 00 00 HidUsb 2 00 USB Input Device During USB enumeration the XVF3510 HID produces three descriptors The listing below shows them as recorded on Windows using USB View For details of th...

Page 79: ...put of proc bus input devices Now toggle INT_N signal on the XK VF3510 board by connecting it to 3V3 and GND using a jump wire Example output from evtest is Input driver version is 1 0 1 Input device...

Page 80: ...the USB input vfctrl_usb SET_IO_MAP 0 7 USB output left outputs USB input left vfctrl_usb SET_IO_MAP 1 8 As above for right channel Now configure the filter vfctrl_usb SET_FILTER_INDEX 2 USB output l...

Page 81: ...The one extra byte is used for status and is the first byte payload 0 of the payload received from the device In the example above payload 0 would be the status byte and payload 1 payload 4 would be t...

Page 82: ...of the format description In this document Q format is used to describe fixed point number formats with the representation given as Qm n format where m is the number of bits reserved for the sign and...

Page 83: ...XM 014232 PC 83 APPENDIX I FLASH PROGRAMMING AND UPDATE FLOW The figure below shows the workflow and the image files that are used to programme the XVF3510 firmware...

Page 84: ...t is not bit perfect it loses 1b for the marker It can work on a Mac if you use a 16b or 24b output resolution on UA device Since microphones signal levels are quite low from the output of the decimat...

Page 85: ...are has booted following the flashing operation it can be verified in the sound control panel that the USB input stream from the XVF3510 UA to the host is now set to 24b Next the audio of interest is...

Page 86: ...audio It packs the two 16kHz samples into three 48kHz samples as follows top 24b of sample 0 with 8b LSB marker 0x00 top 24b of sample 1 with 8b LSB marker 0x01 the bottom 8b of sample 0 the bottom 8...

Reviews: