Detecting processor type

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
Redeye
XCore Addict
Posts: 131
Joined: Wed Aug 03, 2011 9:13 am

Detecting processor type

Post by Redeye »

Is there any way to programmatically determine which processor variant code is being run on? The reason I ask is because I have code which seems to run with no problems on both an XL232 and XE232 chip with no changes to the XN file (which is configured for the XL232). It would be a useful to be able to distinguish between the two variants, just in case we need to know for any reason in the future. I've tried reading the processor ID from the tile config register, but this seems to give 0x1A for both devices, so I'm just wondering if there's another read-only register somewhere which might be able to tell the difference between an XE232 and an XL232?


User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

The main difference is that presumably the XL232 doesn't actually have hard RGMII or USB IP in the chip. They probably have the same processor core. I would refer to p 69 of the datasheet: https://www.xmos.ai/download/XE232-1024 ... (1.16).pdf

You can see there you can read the USB node configuration. That might be a good place to start and see if there's any difference in the two chips. Then if not proceed to trying to read the data from the USB PHY itself (p 71), or trying to write a RW register on the PHY and then reading it back (e.g. the UIFM Device Address). The write peripheral with or without acknowledgement features might be useful here.

I think from that you should be able to tell if you have an XL or an XE/XU device. To see if you have an RGMII or not is probably a little more complicated. If you can give up all the IO then you could probably run the RGMII in external loopback and see if you can get data out and in. It doesn't seem to have specialized registers from what I can tell.
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

On the other hand, they may all be exactly the same chip(s) internally, just with different wire bondings. I really don't know.
Redeye
XCore Addict
Posts: 131
Joined: Wed Aug 03, 2011 9:13 am

Post by Redeye »

That's a good idea. I was looking for a common register to read in both XL232 and XE232, but maybe the USB register will read differently or not at all on an XL232. I'll give it a try.
Post Reply