Using Audio slicekit with triangle port

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
kecericksen
Junior Member
Posts: 5
Joined: Tue Nov 18, 2014 6:36 pm

Using Audio slicekit with triangle port

Post by kecericksen »

Hey,

I've been looking at the examples for the audio slicekit( BiQuad Filter, Loudness, short-delay etc) and I've got them to run just fine. These are configured to run with the audio slice on the circle slot. I tried to do a little bit of experimenting to get the slicekit working on the triangle slot, to no avail.

The ports are defined as follows. I find it a bit strange because it doesn't match up with the documentation on the website at all.

Code: Select all

#define PORT_I2S_DAC0      XS1_PORT_1D
#define PORT_I2S_DAC1      XS1_PORT_1H
#define PORT_I2S_ADC0      XS1_PORT_1K
#define PORT_I2S_ADC1      XS1_PORT_1L
#define PORT_I2S_LRCLK     XS1_PORT_1I
#define PORT_I2S_BCLK      XS1_PORT_1A
#define PORT_MCLK_IN       XS1_PORT_1E
 
#define PORT_GPIO          XS1_PORT_4E
#define PORT_I2C           XS1_PORT_4F

https://www.xmos.com/support/xkits?subc ... 083&page=1

I'm assuming that the code is the correct information, as it works perfectly fine in the circle slot. I suppose the main question that this has been leading up to is: What do I need to do to get the program working on the triangle slot? From what I understand, the only change would be changing

Code: Select all

on stdcore[AUDIO_IO_TILE]: audio_io( c_aud_dsp ); // Audio I/O coar

to where AUDIO_IO_TILE is 0 instead of 1. But it doesn't seem to work at all.

Could anybody shed some light on this for me?

Thanks.


stdefeber
Active Member
Posts: 35
Joined: Wed Dec 18, 2013 9:20 pm

Post by stdefeber »

#define PORT_I2S_DAC0 XS1_PORT_1D
#define PORT_I2S_DAC1 XS1_PORT_1H -> For triangle port change to 8D0
#define PORT_I2S_ADC0 XS1_PORT_1K -> For triangle port change to 1I
#define PORT_I2S_ADC1 XS1_PORT_1L
#define PORT_I2S_LRCLK XS1_PORT_1I -> For triangle port change to 1H
#define PORT_I2S_BCLK XS1_PORT_1A
#define PORT_MCLK_IN XS1_PORT_1E

#define PORT_GPIO XS1_PORT_4E
#define PORT_I2C XS1_PORT_4F
This is what I understood from the linked document.


ST
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

This is quite messy so here are some suggestions and comments.

1) Check your version of the audio slice board and confirm if it matches the following posted and revised schematic - page 1:

Audio Slice Schematics

Assuming they do match, this is the (most) accurate reference point which should be used for your project. Note the PCI Express slot labels and port pins.

2) Noting the above, the webpage for the audio slice which you are referencing in your post is dated / old / out of sync with the revised schematic. This is quite common to XMOS designs and very frustrating and costly in invested time and rework of designs to developers. Note to XMOS - At the very least the work should be cross checked by more than one staff member for accuracy.

3) Moving forward, here is what we observed if you trace the schematic -> working code -> the posted webpage.

#define PORT_I2S_DAC0 XS1_PORT_1D
#define PORT_I2S_DAC1 XS1_PORT_1H ; webpage is incorrect - schematic from 04-2014 was revised & matches port label of working code
#define PORT_I2S_ADC0 XS1_PORT_1K ; webpage is incorrect - schematic from 04-2014 was revised & matches port label of working code
#define PORT_I2S_ADC1 XS1_PORT_1L
#define PORT_I2S_LRCLK XS1_PORT_1I ; webpage is incorrect - schematic from 04-2014 was revised & matches port label of working code
#define PORT_I2S_BCLK XS1_PORT_1A ; webpage is incorrect - schematic from 04-2014 was revised but applies SCLK label; matches working code
#define PORT_MCLK_IN XS1_PORT_1E

#define PORT_GPIO XS1_PORT_4E
#define PORT_I2C XS1_PORT_4F

There are other errors on the webpage for the audio slice but not relevant to your immediate project. Again, review the schematic for their true pin mappings and definitions as they match the working code.

4) Perhaps a bit less important is the issue that in using the triangle port, you will be applying the use of PCI Express pins B2 and B4.

Download the SliceKit schematic to note how the triangle slice connector differs for these 2 pins:

SliceKit schematics

How to configure the mux so that you may use the shared pins on the Triangle slice port for your project:

Mux configuration logic

Observe that B2 and B4 (both have the EXT suffix in their labels) are being shared via a MUX with the SPI flash device. This multiplexer will allow the GPIO pins to steer the lines to either the SPI flash memory device OR to the Triangle slot. This may be a non-issue as the toolchain will apply small piece of code to allow you to use the B2 & B4 pins as your own after the SPI flash boot. However, will not hurt to confirm if this is indeed the proper configuration for your project. A simple test will be to toggle the respective lines and see if the PCIe slot (triangle) does the same. This auto-inserted mux code is valid when you properly define your Slicekit in the makefile.

Here is a nice discussion on topic for your review:

Discussion of mux on triangle port on SliceKit

Hope you have enough details to move forward on your project.

Disclaimer - have the audio slice kit but have not (yet) attempted to use on the Triangle slot but the above are our observations of the issue.
kecericksen
Junior Member
Posts: 5
Joined: Tue Nov 18, 2014 6:36 pm

Post by kecericksen »

Alright, I figured it out. Thanks man!

For anyone in the future, just add module_slicekit_support to the makefile and it runs just peachy.