XN Files

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm
Contact:

XN Files

Post by jonathan »

For people who want to know more about XN files, "Chapter 3 - Describing Hardware Platforms" from the Tools User Guide and an appendix with the XN reference are now available as a separate document on the website at:

http://www.xmos.com/published/xtools_en_ch3

Enjoy!


Image
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post by leon_heller »

Thanks, Jonathan. That is useful.

Leon
User avatar
AtomSoft
XCore Addict
Posts: 135
Joined: Mon Dec 14, 2009 3:02 pm
Contact:

Post by AtomSoft »

thanks!
Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

Thank you for that.

Perhaps the info I want is coming up in some new XN reference document. What I can't work out, and have asked about a few times here already, is how to define external links that don't have XMOS devices on both ends. Say one end is an FPGA or other MCU.

From the linked document : "A Link element must contain exactly two LinkEndpoint children". Reading on we find the end point children are defined in terms of nodes and cores. Which deos not help much if there are none!

Anyone any suggestions for external link to FPGA XN files including setting link speed etc?
User avatar
AtomSoft
XCore Addict
Posts: 135
Joined: Mon Dec 14, 2009 3:02 pm
Contact:

Post by AtomSoft »

Can you give a clearer example? i thought LINKS like that are for XMOS devices only... You cant link a XMOS and PIC. You can send data serially tho. Im not sure what your trying to do tho.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.
Contact:

Post by leon_heller »

Slow XLinks can be implemented in software on a PIC or any other MCU, XMOS has an example of them implemented on an AVR.

Leon
Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

AtomSoft, over on the xlinkers forum there is a project involving connecting an XMOS chip to an AVR micro-controller. This is done using the 4 wire link interface, the xlink protocol being generated in software on the AVR end. "bit-banging" the data in an out of GPIO pins. Of course this XMOS to AVR link is running much slower than normal link speed which can be done by tweaking number of clocks between bits and the number of clock between tokens on the link. Also the XMOS switch clock can be slowed to get to slower bit rates.

In the XMOS-AVR project all this link set up on the XMOS is done in XC and assembler but I am told that it is possible to do it from XN files which would be much simpler. Just that no one seems to know how yet.

The XC programming manual talks about defining "service" functions in XC and callable from from XC that have no actual XC code because the service is performed by an external hardware, an FPGA say, over a link. The service links being defined in XN. Trouble is it does not describe how to do that.

In my case I want to connect an XMOS device to a Propeller MCU from Parallax Inc. Using the xlink saves code and thread resources at the XMOS end because it is all handled in the xlink hardware. So far I have the Propeller able to Tx/Rx the 4 wire xlink protocol at 5Mb/s or 10Mb/s. I have no XMOS hardware to test against yet though. When I do I will set up a project here for it.
User avatar
AtomSoft
XCore Addict
Posts: 135
Joined: Mon Dec 14, 2009 3:02 pm
Contact:

Post by AtomSoft »

i see what you mean now... heh ok i would see how you could save a thread in not having to dedicate one to it.
User avatar
AtomSoft
XCore Addict
Posts: 135
Joined: Mon Dec 14, 2009 3:02 pm
Contact:

Post by AtomSoft »

May i ask what XMOS IC are you using?
Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

Currently I don't have any XMOS devices. I'm just about to order a dev board, but which one?

The XMOS-AVR project is working with L1 devices and a version of the code for the G devices is promised. So I guess if I was smart I would go for a board with an L1 chip and use the working code as a reference. Then worry about this XN file business when something is working with my Propeller MCU.

Having easy access to the links would be good so it looks like an XK-1 board with it's links coming out in connectors is what I need.

From my studies so far I find there are significant difference between G and L external links. One of them has a "hello" control token it it's protocol the other does not. Also the registers provided for setting the number of clocks between bits and between tokens is much wider on the L devices which means you can configure L devices down to much lower speeds. It's amazing that L and G links are not compatible with each other.

I'd also like a G4 device and lots of I/O so I might have to get a XC-2 Ethernet kit as well...
Post Reply