Modify AN01024

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Modify AN01024

Postby fabian » Fri Aug 10, 2018 3:23 pm

Hello.

I'm trying to modify AN01024 to use with two XEF232. But I ran into a lot of problems.

First I needed to figure out which reg-Defines needed to be used. This is solved by using defines from xs2a_registers.h instead of xs1_l_registers.h. DONE.

Then I can't find any information about the use of read_sswitch_reg and write_sswitch_reg instead of using read_node_config_reg and write_node_config_reg. Why are there different access-functions and when to use which of them?

Then I realized that there are no PLink status and Chanend status registers for the XEF232. How to handle that?

Last but not least:
- What destination-Id is needed for the chanend?
In this content also:
- How can I set up a unique RoutingId for each of all 4 nodes ( 2 on each XEF232)?
- Why is in not possible to change the switch node identifier during runtime?

Any explanation is appreciated.

Best regards.
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Postby fabian » Mon Aug 13, 2018 12:33 pm

Hello all.

I'm trying to connect two identical custom boards over xlink 1. The
xcore device is, as mentioned before, a XEF232 which comprises two
nodes with two tiles each.

Let's talk about the channel identifier which is used as the
destination channel by the SETD-Instruction.

It is a 32-bit word consisting out of 8-bits for the node id, 8-bits
for the core id, an 8-bit resource counter and 8-bits resource-type.

The resource-type is RES_TYPE_CHANEND, the resource counter might be a
value between 0 and 31. The core id depends on the custom design and
the used xlink. In my case it is xlink 1 on tile 1 on the first
node. Open point is the node id.

Each custom board gets its own firmware, meaning, there are two
software projects which are compiled independently. The
xlink-connection is done in "hot plug mode". During compilation the
XN-file is used to build up the platform.h and to configure the xlinks
registers in the node configuration. The node id is set by the tools.

In my case after compilation the two software projects contain
identical node ids. I used "xntools --add-routing Xn-File" just to see
the ResourceId of the nodes. If you want to establish a connection
between these two boards over a channel, you have to set the
destination Id. But the destination Id is identical to the "source"
id, because the tools are developing same RoutingIds for both
projects.

A lot of text for the final question:

How can I create different RoutingIds for same XN-Files?


Best regards.
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Postby fabian » Wed Aug 15, 2018 6:23 pm

Hello.

If you want to know something about the XMOS Link specification, there is the XS1-L-System-Specification_X1151A.pdf which explains that in chapter 3 in a surprisingly detailed manner. Is there anything equivalent to the xCORE-200 architecture beside xCORE-200_-The-XMOS-XS2-Architecture-_ISA_1.1.pdf.
I'm interested in how to set up a network or how to assign a RoutingId to a node. I still want to figure out how to modify AN01024 to use hot plugin with 2 XEF232. It seems there is not so much knowledge out there. So maybe there is at least some documentation to that topic. Maybe I missed the describing parts in the document.
Any hints?

Best regards.
User avatar
mon2
XCore Legend
Posts: 1254
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Wed Aug 15, 2018 10:49 pm

Fabian, not sure if you have seen this thread which may help (at least from the hardware connectivity point of view?):

viewtopic.php?t=4837

Code: Select all

http://www.xcore.com/viewtopic.php?t=4837
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Postby fabian » Thu Aug 16, 2018 7:17 am

Hello mon2.

Nice to hear from you.

Yes, I've seen that thread already. And I also gave it a try. Unfortunately it seemed that the signal integrity was not good enough: there were some errors during downloading the software.

Though, it is not really what I need. To put the JTAG signals in a chain makes it more complicated to connect the boards in a "hot plug" - mode.

On my custom boards there are two xlinks (xlink 1 and xlink 2) digital isolated driven by LVDS. The idea was to use XMOS xCONNECT to hot plug these boards. It was not designed to be "one board" which is managed by one XN-File in one software project.

I really need to figure out how to combine the custom boards in hot plug mode.

Best regards.
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Postby fabian » Thu Aug 16, 2018 5:24 pm

Hello.

As mentioned before I wanted to use xlink1 and xlink2 on XEF232 to connect two (identical) custom boards by XMOS xCONNECT in hot plug mode. Until now I couldn't manage it to work. So I'm thinking of another approach: with the xlinks in use there are 2 rx and 2 tx pins available for each xlink. So why leaving xCONNECT being a nice idea or marketing gag and build up a custom bus and protocol for my own. But here is the problem: the pins are only available via xlink or P32A. So how can I handle that?
P32A3, P32A4, P32A12 and P32A13 needs to be input port-pins while P32A5, P32A6, P32A15 and P32A16 must be output port-pins. Other parts of P32A are used by xlink7 and xlink4 which connect the two nodes of XEF232 and must not be disturbed.

Any ideas how I can use parts of P32A independently in two directions and without blocking other parts of P32A, while using a "high speed communication rate"?

Thanks.
fabian
Member++
Posts: 23
Joined: Wed Apr 12, 2017 9:13 pm

Postby fabian » Sun Aug 19, 2018 7:47 am

Hello.

In this post I would like to know two things:

1. What is a unique id of a node?

2. How to write a unique node id to the switch node identifier register?


Starting with the second question, there is the possibility to write a node id to the digital node registers. The XEF232 node registers include a so called "Switch node identifier" on number 0x05 of the registers. The node id can be written to the bits [15:0] of that register. But to write to that register you have to make sure that bit 31 of the "Switch configuration" - register (0x04) is set to zero which is the case after reset. At least this is what I believe.
I used "write_node_config_reg" to write 0 to bit 31 of the "Switch configuration" - register to get write access to "Switch node identifier" - register and after that wrote a 1 as a node id into bits [15:0] of the "Switch node identifier". After a delay of 100ms (just to be safe) I read the node id with "read_node_config_reg" and the id was 0 (!).
So, what went wrong?

To the first question:
The node id in the node configuration can't be the same as the node id you use in the xn-file, since the value in the xn-file is of type "string". But there is an attribute called "RoutingId" which is part of the node tag in the xn-file. Is there a relationship between the RoutingId in the xn-file and the node id in the node configuration? If yes, how can I set up a unique RoutingId? If not, how does the node id look like?

Best regards.
User avatar
mon2
XCore Legend
Posts: 1254
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Sun Aug 19, 2018 1:58 pm

Found another document which may help. You may have already seen this document as it was referenced in the same app note.

How are the multiple xmos devices interconnected? Raw cable or using external LVDS transceivers? If yes on transceivers, which ones? What is the wiring and pinout details?

Please see attached which discusses hot plugging and links.

https://www.xmos.com/support/tools/docu ... nent=17556
Attachments
xmos_hot_plug_links.png
(41.32 KiB) Not downloaded yet
xmos_hot_plug_links.png
(41.32 KiB) Not downloaded yet
xCONNECT-Architecture_1.0.pdf
(1.11 MiB) Downloaded 20 times
xCONNECT-Architecture_1.0.pdf
(1.11 MiB) Downloaded 20 times
User avatar
mon2
XCore Legend
Posts: 1254
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Sun Aug 19, 2018 4:31 pm

Then I realized that there are no PLink status and Chanend status registers for the XEF232. How to handle that?


Section D.16 of the XEF232 datasheet offers the Plink status.

Also review D.18 of the XEF232 datasheet. The keyword channel end is referenced here.
Attachments
xef232_plink_status.png
(73.33 KiB) Not downloaded yet
xef232_plink_status.png
(73.33 KiB) Not downloaded yet
User avatar
mon2
XCore Legend
Posts: 1254
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Sun Aug 19, 2018 9:18 pm

Ok. After some random reads believe I understand your intent for this project.

1) Noted above in your post that you are using LVDS transceivers. Can you post the relevant schematic or wiring details? Are these correct and in the proper direction between XMOS CPU # 1 to the remote PCB with XMOS CPU # 2?

2) Do not believe the project has any dependency to the XN file for your interconnect. Instead, you will be assigning the static links (ie. non routed) as per AN01024 for the reasons raised in section 2.2 of the same document. You will manually select the point to point communication parameters, just like this application note.

3) Suggesting to start with the same example code from this appnote. On the node id,
Note that if the code is to be run on a different tile, modify the node_id according to the
receive application tile id, as printed from the receive application’s console.


If you run the receive app code on one of your XEF232 processors, what is the output? Does the app offer the node details in the console?

What does the transmit app report when ran on the other XEF232 processor custom board?

Who is online

Users browsing this forum: No registered users and 16 guests