XCORE Microphone Array Board - AN00121 (TCP/IP) porting Topic is solved

If you have a simple question and just want an answer.
User avatar
andrewxcav
Verified
Experienced Member
Posts: 76
Joined: Wed Feb 17, 2016 5:10 pm

XCORE Microphone Array Board - AN00121 (TCP/IP) porting

Post by andrewxcav »

Hello,

I am trying to port AN00121 (TCP/IP) to the XCORE Microphone Array Board. I have found most of the signals in the hardware manual for the mic board: https://www.xmos.com/download/private/x ... l(1v1).pdf

I have found ports listed for most of the signals but cannot find (using the app note's variable names here):
p_eth_int
p_eth_timing
otp_ports

Does anyone know where these are? What they are? Or have some working demo code for Ethernet on the xCORE?

Thank you,

-Andrew
View Solution
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

User avatar
andrewxcav
Verified
Experienced Member
Posts: 76
Joined: Wed Feb 17, 2016 5:10 pm

Post by andrewxcav »

That is either a link right back to this thread, or the forum software is once again experiencing some issues.
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

I've done a port to the Microphone Array Board on a branch of my fork of lib_xtcp.

By default it is using the MIC_ARRAY board, but also supports the XCORE-200-EXPLOROR board, just update the Makefile and the main.xc to select which board.

Hope that helps,

Peter
User avatar
andrewxcav
Verified
Experienced Member
Posts: 76
Joined: Wed Feb 17, 2016 5:10 pm

Post by andrewxcav »

peter wrote:I've done a port to the Microphone Array Board on a branch of my fork of lib_xtcp.

By default it is using the MIC_ARRAY board, but also supports the XCORE-200-EXPLOROR board, just update the Makefile and the main.xc to select which board.

Hope that helps,

Peter
First of all, thank you, this looks really great. I have selected the correct .xn file in the Makefile, but still have the question from my original post, which pertains to modifying the main.xc file:

port p_eth_rxclk = on tile[1]: XS1_PORT_1J;
port p_eth_rxd = on tile[1]: XS1_PORT_4E;
port p_eth_txd = on tile[1]: XS1_PORT_4F;
port p_eth_rxdv = on tile[1]: XS1_PORT_1K;
port p_eth_txen = on tile[1]: XS1_PORT_1L;
port p_eth_txclk = on tile[1]: XS1_PORT_1I;
port p_eth_int = on tile[1]: XS1_PORT_1O;
port p_eth_rxerr = on tile[1]: XS1_PORT_1P;
port p_eth_timing = on tile[1]: XS1_PORT_8C;
clock eth_rxclk = on tile[1]: XS1_CLKBLK_1;
clock eth_txclk = on tile[1]: XS1_CLKBLK_2;

port p_smi_mdc = on tile[1]: XS1_PORT_1N;
port p_smi_mdio = on tile[1]: XS1_PORT_1M;

otp_ports_t otp_ports = on tile[1]: OTP_PORTS_INITIALIZER;

The highlighted items are not listed in the microphone array hardware manual, and running the app as is produces the same results as far as not getting link lights etc.

Also, for those of you following along at home, you may need to grab the latest lib_ethernet from github: https://github.com/xmos/lib_ethernet

Thanks again,

-Andrew
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

Hi Andrew,

Good question...

p_eth_int looks like a completely unused port. I'm guessing it is legacy that hasn't been cleaned up but it isn't used anywhere

p_eth_timing is a port that is required by the ethernet library use for timing, but it is not necessary for it to be connected to the outside world. The ports on xCORE devices can still be used even if they are not connected to pins, but clearly their data will be junk when read and they can't drive anything. In this case it doesn't matter as it is just being used for a counter value controlled by the same clock as the data ports. This could be any port that is not required by the rest of the application.

otp_ports are ports connected to the One-Time-Programmable device within the xCORE device. These ports are completely internal and can never be used to connect to pins. They have restricted functionality required for connecting to the OTP and are used to recover the MAC address of the device from the OTP. They are defined in lib_optinfo and do not change between devices.

Hope that clarifies things.

Peter
User avatar
andrewxcav
Verified
Experienced Member
Posts: 76
Joined: Wed Feb 17, 2016 5:10 pm

Post by andrewxcav »

peter wrote:Hi Andrew,

Good question...

p_eth_int looks like a completely unused port. I'm guessing it is legacy that hasn't been cleaned up but it isn't used anywhere

p_eth_timing is a port that is required by the ethernet library use for timing, but it is not necessary for it to be connected to the outside world. The ports on xCORE devices can still be used even if they are not connected to pins, but clearly their data will be junk when read and they can't drive anything. In this case it doesn't matter as it is just being used for a counter value controlled by the same clock as the data ports. This could be any port that is not required by the rest of the application.

otp_ports are ports connected to the One-Time-Programmable device within the xCORE device. These ports are completely internal and can never be used to connect to pins. They have restricted functionality required for connecting to the OTP and are used to recover the MAC address of the device from the OTP. They are defined in lib_optinfo and do not change between devices.

Hope that clarifies things.

Peter

Thank you, that is very clear. I think my problem is at another level. I just tried running the app on a second board, and still no link or activity lights, and the host PC displays "network cable unplugged."
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

The device is configured with a fixed IP address of 172.16.0.2, have you put the host NIC on the same subnet?

Peter
User avatar
andrewxcav
Verified
Experienced Member
Posts: 76
Joined: Wed Feb 17, 2016 5:10 pm

Post by andrewxcav »

peter wrote:The device is configured with a fixed IP address of 172.16.0.2, have you put the host NIC on the same subnet?

Peter
Where is that number found? I just configured my NIC to be on the same subnet, but like I say, it is failing at the physical layer (cable unplugged message, no status lights on either end, etc.)
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

True enough, if the link is not coming up the IP isn't going to help... but the IP address is at line 94 of the main.xc if you want to change it in the future.

I've had this issue before when I failed to drive the reset line. In the case of mic array board it is p_rst_shared which is on a shared 4-bit port which has to be driven high. Line 372 should be doing this. Have you changed that at all?