xCORE-200 MC Audio AVB (AN00203) @ 100 Mbps

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
akp
Respected Member
Posts: 428
Joined: Thu Nov 26, 2015 11:47 pm

xCORE-200 MC Audio AVB (AN00203) @ 100 Mbps

Postby akp » Wed Sep 28, 2016 3:26 pm

Hello

I have been testing the xCORE-200 MC Audio TDM audio (AN00203) with a MacBook Pro running El Capitan.

I have an interesting problem. I would like to use a GbE switch (MOTU AVB switch) to connect the MC audio board to the Mac. The Mac is connected to the switch using 1000BASE-T. This works fine when the MC-Audio board has a 1000BASE-T GbE connection to the switch. However, when I have a 100BASE-TX FE (100 Mbps) connection it will not PTP sync lock (and doesn't show up in the Mac's Audio Midi Setup - Network Device Browser). I have reduced the channel count to 1 stream x 8 ch @ 48kHz sampling so there should be no issue with bandwidth over the link.

Note: to force 100BASE-TX connection I physically cut the brown and blue twisted pairs in a CAT-6 cable and left the PHYs to autodetect (eventually I want to use just 2 TP in my application not 4 TP as is necessary for 1000BASE-T). But the same behaviour occurs when I force the PHYs to 100Mbps through software but use an unmodified full CAT-5E cable.

Here's where some interesting tidbits arise:

1. Directly connecting the MC audio board to the Mac over 100BASE-TX works without any difficulty, even with 32 ch of audio. So this means the PHY on the MC-Audio board is fine to use at 100 Mbps.

2. Connecting the older AVB-DC board to the Mac through the switch works fine, even though the AVB-DC board uses 100BASE-TX and the Mac is using 1000BASE-T. So the MOTU AVB switch supports converting 100BASE-TX to 1000BASE-T for AVB streams.

3. If I use a 100BASE-TX connection from the Mac to the switch, and 1000BASE-T from the switch to the MC-Audio board, that also works. So there is no inherent problem with a conversion between GbE and FE with the MC-Audio board.

It seems like the only situation that doesn't work is 100BASE-TX to the switch. If I use a switch then I need 1000BASE-T. Unfortunately, what I want is 100BASE-TX from the MC-Audio board to the switch and 1000BASE-T from the switch to the Mac. Since as I said above it works fine with the AVB-DC board, it seems to me there must be some incompatibility between the MOTU switch and the MC-Audio board software, which doesn't exist in the AVB-DC software.

Here is the xscope output when the MC-Audio board is connected to the MOTU AVB switch using 1000BASE-T, and Mac is connected to the MOTU AVB switch using 1000BASE-T:

Code: Select all

info program
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
PTP Port 0 Role: Master
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
MAAP reserved Talker stream #0 address: 91:E0:F0:0:E8:B9
PTP Port 0 Role: Master
PTP Port 0 Role: Slave
PTP sync locked
1722.1 Controller 0FE109532 acquired entity
CONNECTING Talker stream #0 (229780FC30000) -> Listener A9:20:66:10:95:32:0:11
MSRP: Register stream request 229780:FC30000
Added stream:
 ID: 229780FC30000
 DA:91:E0:F0:0:E8:B9:
 max size: 224
 interval: 1
MVRP: Joined VID 2
Talker stream #0 ready
CONNECTING Listener sink #0 -> Talker stream A820661095320017, DA: 91:E0:F0:0:0:6B
Listener sink #0 chan map:
  0 -> 0
  1 -> 1
  2 -> 2
  3 -> 3
  4 -> 4
  5 -> 5
  6 -> 6
  7 -> 7
MSRP: Register attach request A8206610:95320017
Added stream:
 ID: A820661095320017
MVRP: Joined VID 2
Added stream:
 ID: A820661095320017
 DA:91:E0:F0:0:0:6B:
 max size: 256
 interval: 1
Increasing port 0 shaper bandwidth to 17024000 bps
Talker stream #0 on
Media output 0 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 3 locked: -41 samples shorter
Media output 4 locked: -41 samples shorter
Media output 5 locked: -41 samples shorter
Media output 6 locked: -41 samples shorter
Media output 7 locked: -41 samples shorter
Media output 0 locked: -42 samples shorter
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 locked: -42 samples shorter
Media output 2 locked: -42 samples shorter
Here is the xscope output when the MC-Audio board is connected directly to the Mac using 100BASE-T:

Code: Select all

info program
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
PTP Port 0 Role: Master
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
MAAP reserved Talker stream #0 address: 91:E0:F0:0:E8:B9
PTP Port 0 Role: Master
PTP Port 0 Role: Slave
PTP sync locked
1722.1 Controller 0FE109532 acquired entity
CONNECTING Talker stream #0 (229780FC30000) -> Listener A9:20:66:10:95:32:0:12
MSRP: Register stream request 229780:FC30000
Added stream:
 ID: 229780FC30000
 DA:91:E0:F0:0:E8:B9:
 max size: 224
 interval: 1
MVRP: Joined VID 2
Talker stream #0 ready
CONNECTING Listener sink #0 -> Talker stream A820661095320018, DA: 91:E0:F0:0:63:44
Listener sink #0 chan map:
  0 -> 0
  1 -> 1
  2 -> 2
  3 -> 3
  4 -> 4
  5 -> 5
  6 -> 6
  7 -> 7
MSRP: Register attach request A8206610:95320018
Added stream:
 ID: A820661095320018
MVRP: Joined VID 2
Added stream:
 ID: A820661095320018
 DA:91:E0:F0:0:63:44:
 max size: 256
 interval: 1
Increasing port 0 shaper bandwidth to 17024000 bps
Talker stream #0 on
Media output 0 locked: -41 samples shorter
Media output 1 locked: -41 samples shorter
Media output 2 locked: -41 samples shorter
Media output 3 locked: -40 samples shorter
Media output 4 locked: -40 samples shorter
Media output 5 locked: -41 samples shorter
Media output 6 locked: -41 samples shorter
Media output 7 locked: -41 samples shorter
Here is the xscope output when the MC-Audio board is connected to the MOTU AVB switch using 100BASE-TX, and Mac is connected to the MOTU AVB switch using 1000BASE-T:

Code: Select all

info program
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
PTP Port 0 Role: Master
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
MAAP reserved Talker stream #0 address: 91:E0:F0:0:E8:B9
--> then as soon as I connect the MC-Audio board to the switch using 1000BASE-T rather than 100BASE-TX it sync locks and shows up on the Mac OK.


Any thoughts?

-- Adam
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Postby Andy » Wed Sep 28, 2016 3:45 pm

What's the output if you enable

#define DEBUG_PRINT_AS_CAPABLE 1

in gptp.xc?
User avatar
akp
Respected Member
Posts: 428
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Wed Sep 28, 2016 4:37 pm

Here is the output when the MC-Audio is connected to the MOTU AVB switch using 100BASE-TX:

Code: Select all

info program
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
Lost responses: 1
Lost responses: 2
Lost responses: 3
PTP Port 0 Role: Master
Lost responses: 1
Lost responses: 2
Average pdelay of 0 ns
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
MAAP reserved Talker stream #0 address: 91:E0:F0:0:93:CD
Average pdelay of 0 ns
Average pdelay of 0 ns
Average pdelay of 0 ns
Average pdelay of 0 ns
Average pdelay of 0 ns
... and it keeps spitting out the same "Average pdelay of 0 ns"

Here is the output when the MC-Audio is connected to the MOTU AVB switch using 1000BASE-T:

Code: Select all

info program
Program stopped at 0x40000.
It stopped with signal SIGTRAP, Trace/breakpoint trap.
Type "info stack" or "info registers" for more information.
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
Lost responses: 1
Lost responses: 2
Lost responses: 3
PTP Port 0 Role: Master
Average pdelay of 208 ns
Average pdelay of 208 ns
MAAP reserved Talker stream #0 address: 91:E0:F0:0:93:CD
Average pdelay of 10 ns
PTP Port 0 Role: Master
asCapable = 1
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
PTP Port 0 Role: Slave
Average pdelay of 61 ns
PTP sync locked
Average pdelay of 61 ns
Average pdelay of 60 ns
1722.1 Controller 0FE109532 acquired entity
Average pdelay of 60 ns
Average pdelay of 60 ns
CONNECTING Talker stream #0 (229780FC00000) -> Listener A9:20:66:10:95:32:0:1B
MSRP: Register stream request 229780:FC00000
Added stream:
 ID: 229780FC00000
 DA:91:E0:F0:0:93:CD:
 max size: 224
 interval: 1
MVRP: Joined VID 2
Talker stream #0 ready
CONNECTING Listener sink #0 -> Talker stream A820661095320021, DA: 91:E0:F0:0:5D:DE
Listener sink #0 chan map:
  0 -> 0
  1 -> 1
  2 -> 2
  3 -> 3
  4 -> 4
  5 -> 5
  6 -> 6
  7 -> 7
MSRP: Register attach request A8206610:95320021
Added stream:
 ID: A820661095320021
MVRP: Joined VID 2
MSRP: Deregister attach request A8206610:95320021
Listener MAD_Leave
Increasing port 0 shaper bandwidth to 17024000 bps
Talker stream #0 on
Added stream:
 ID: A820661095320021
 DA:91:E0:F0:0:5D:DE:
 max size: 256
 interval: 1
Talker stream #0 off
Setting clock source: INPUT_STREAM_DERIVED
Talker stream #0 on
Listener sink #0 chan map:
  0 -> 0
  1 -> 1
  2 -> 2
  3 -> 3
  4 -> 4
  5 -> 5
  6 -> 6
  7 -> 7
MSRP: Register attach request A8206610:95320021
MVRP: Joined VID 2
Listener sink #0 chan map:
  0 -> 0
  1 -> 1
  2 -> 2
  3 -> 3
  4 -> 4
  5 -> 5
  6 -> 6
  7 -> 7
Average pdelay of 60 ns
Media output 0 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 3 locked: -41 samples shorter
Media output 4 locked: -41 samples shorter
Media output 5 locked: -41 samples shorter
Media output 6 locked: -42 samples shorter
Media output 7 locked: -42 samples shorter
Media output 0 locked: -42 samples shorter
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -42 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -42 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 compensation too large: -43 samples
Media output 2 compensation too large: -43 samples
Media output 1 locked: -42 samples shorter
Media output 2 locked: -42 samples shorter
Average pdelay of 60 ns
Average pdelay of 60 ns
Average pdelay of 59 ns
Average pdelay of 59 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 58 ns
Average pdelay of 57 ns
Average pdelay of 57 ns
Average pdelay of 57 ns
Average pdelay of 57 ns
-- so it can't calculate the pdelay?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Postby Andy » Wed Sep 28, 2016 4:46 pm

Try tweaking the 100Mb delay values (350 ns) in the PHY driver in main.xc to get approx the same pdelay value as 1G:

Code: Select all

  eth.set_ingress_timestamp_latency(0, LINK_100_MBPS_FULL_DUPLEX, 350);
  eth.set_egress_timestamp_latency(0, LINK_100_MBPS_FULL_DUPLEX, 350);
User avatar
akp
Respected Member
Posts: 428
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Wed Sep 28, 2016 6:50 pm

Hi Andy,

Thanks. I was able to connect OK using 100BASE-TX and get a pdelay value pretty close to the 1000BASE-T value (within 5ns) by changing the ingress and egress latency from 350ns to 320ns for FE. The pdelay values are quite different from each other when direct connected to the Mac (~380ns for FE and ~90ns for GbE) but I don't know if that's an issue or not.

Cheers,
Adam

Who is online

Users browsing this forum: No registered users and 4 guests