New user to Xmos chips.

New to XMOS and XCore? Get started here.
Post Reply
Acelink
New User
Posts: 2
Joined: Tue May 09, 2017 1:33 am

New user to Xmos chips.

Post by Acelink »

Hi Guys, I'm new to the Xmos family and want to start developing using the XUF216-512-TQ128 500Mhz MPU.
I've been programming in Assembler for years now using ATMEL, TI and PIC32 MPU's and now want to delve into XMOS.

Can you guys please answer these few questions. :)
1. SPI & USART functions on XUF216.
I've been reading the manual for the XUF216 and can't seen to find any USART Serial device or a SPI Master/Slave device on the MPU.
Does that mean that the device doesn't support these functions? I downloaded xTIMEcomposer and noticed in the libraries section there
are C routines that have these functions which baffles me cos the chip doesn't have the hardware functions.
In order to use USART or SPI do I have to write my own BITBANG assembler routines on an individual pin?

2. xTIME Composer.
I download the latest ver for my MAC and created a new project. I noticed that you can't create an Assembler project.
Do I have to create a C project and then create a .S file and then use the C function EXTERN to call the assembler program file?

3. Program run location.
I read in the manual that the MPU copies the flash code to the sram and runs the code from there. Can it run the code
from internal FLASH mem? The MPU has 512k split into 2 so does that mean my code can only be 256k in size?
The MPU has 2MB Flash. I will definitely need the full 2MB of flash for my projects.

4. xTIME Composer.
I chose the VIEW tab and can't seem to see a view disassembly window. Does xTIME composer support a disassembly window?
Also does it have a CPU REGISTERS window.

5. Assembler snipets or material on learning Xmos RISC.
I'm pretty experienced in Assembler but not in the syntax of Xmos so any help in assembler for Xmos would be greatly appreciated.

6. Programming my own target board.
Is there a more in-depth manual for the XU216? I need register locations, sram memory maps and programming pins.
I'll be creating my own target board in a few weeks once I make absolutely sure I can use the XUF216 so I'll need to know how to program it
externally. Is there any circuit diagrams I can check out?

lol. That's about it. I hope it wasn't too much for my first post. :)

Thanks for your help guys and mostly appreciated. I can't wait to start developing with Xmos.
Peter. :)


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Hi Guys, I'm new to the Xmos family and want to start developing using the XUF216-512-TQ128 500Mhz MPU.
I've been programming in Assembler for years now using ATMEL, TI and PIC32 MPU's and now want to delve into XMOS.
Welcome! Hope you enjoy the architecture and tools..
Can you guys please answer these few questions. :)
1. SPI & USART functions on XUF216.
I've been reading the manual for the XUF216 and can't seen to find any USART Serial device or a SPI Master/Slave device on the MPU.
Does that mean that the device doesn't support these functions? I downloaded xTIMEcomposer and noticed in the libraries section there
are C routines that have these functions which baffles me cos the chip doesn't have the hardware functions.
In order to use USART or SPI do I have to write my own BITBANG assembler routines on an individual pin?
There are no peripherals on Xmos. You get a bunch of threads, ports with timing/buffering and an event system. From that, you can build super fast event driven state machines that respond to inputs and generate outputs. Posh bit banging if you like..
Have a look here for serial libraries - https://www.xmos.com/support/libraries? ... eripherals
2. xTIME Composer.
I download the latest ver for my MAC and created a new project. I noticed that you can't create an Assembler project.
Do I have to create a C project and then create a .S file and then use the C function EXTERN to call the assembler program file?
No - assembler should be fine. However, due to the amount of work the compiler does, and the fact you need to start multiple threads (see par{}), I'd recommend using a C wrapper to call your assembler file.
3. Program run location.
I read in the manual that the MPU copies the flash code to the sram and runs the code from there. Can it run the code
from internal FLASH mem? The MPU has 512k split into 2 so does that mean my code can only be 256k in size?
The MPU has 2MB Flash. I will definitely need the full 2MB of flash for my projects.
No - there is no data bus to the FLASH. It sits on ports which can be accessed from SPI. Yes, code can only be 256K in size, but this is per tile. If your program is distributed across two tiles (Eg. XU216) then some it can use up to 512KB for code and data.

You can access the FLASH data storage at run time though, if that helps.
https://www.xmos.com/support/appnotes/AN00154
Or you could consider this alpha library - https://github.com/xmos/lib_filesystem . It only supports read so far, but I have used it successfully to read files out of flash at run time. It uses simple c stdio style file ops.. Works really well.
4. xTIME Composer.
I chose the VIEW tab and can't seem to see a view disassembly window. Does xTIME composer support a disassembly window?
Also does it have a CPU REGISTERS window.
Top right hand window when in debug context - there should be a tab showing disassembly.
5. Assembler snipets or material on learning Xmos RISC.
I'm pretty experienced in Assembler but not in the syntax of Xmos so any help in assembler for Xmos would be greatly appreciated.
Hmm there were on this site, but seem to have got lost when blogs got superseded. This may be handy though:

https://www.xmos.com/support/examples/AN10118

You can build a simple c example and see what the compiler did.

It may be helpful I guess to have a boiler plate.. Are you planning single or dual issue ASM? Here are some nice single issue examples:

http://old.xcore.com/blog/vinith/post/asm-examples

6. Programming my own target board.
Is there a more in-depth manual for the XU216? I need register locations, sram memory maps and programming pins.
I'll be creating my own target board in a few weeks once I make absolutely sure I can use the XUF216 so I'll need to know how to program it
externally. Is there any circuit diagrams I can check out?
There are no memory mapped registers! Programming is done over JTAG..

lol. That's about it. I hope it wasn't too much for my first post. :)
Thanks for your help guys and mostly appreciated. I can't wait to start developing with Xmos.
Peter. :)
Cool! Hope the 256KB code size per tile isn't a show stopper.
Acelink
New User
Posts: 2
Joined: Tue May 09, 2017 1:33 am

Post by Acelink »

Thank you very much infiniteimprobability for the info. Muchly appreciated. I'll check out the examples and do a little more research on Xmos.
Have a great day mate :)
Pete
Post Reply