A more in depth look (XUF216-512-TQ128) XMOS Powered Car A more in depth look (XUF216-512-TQ128)
XMOS MCU Overview 16 Cores across 2 Tiles 512K single cycle SRAM Each tile shares 256K of 512K Single cycle instructions(except divide) Entirely deterministic, no cache, no flash pages 2MB on-chip flash memory Core speeds from 62.5 MHz up to 100 MHz (100 MHz up to 5 threads, 500/N_cores MHz beyond 5)
In actuality… Dual core 500 MHz RISC MCU Hardware task scheduler Provides 0 overhead context switching 8 sets of internal registers Event driven as opposed to interrupt driven Uses Xc a very C-like language No FPU, but is 32-bit
Pros Many threads running at the same time Can daisy chain multiple MCU’s for expansion Xc provides C++-like type checking Buffered, timed, and flexible I/O ports 10ns event response time Able to debug over USB via XTAG (Custom JTAG) Flexible thread placement, or automatic placement All software, pick your own peripherals
Cons All software, pick your own peripherals Exceptions built-in to keep all your hacks in check Tools are not without issues, including compiler Pointer and array semantics are very strict Xc requires some ugliness as a template SRAM is shared for Stack, Code, and Data I/O only 1.0V - 3.3V compatible Physical board layout not straight forward, timing requirements for I/O and core voltages, PLL noise
Thread() { While (1) { Select { Case my_func() -> int ret_val: { //Some Code }
Main() { Iface1 myIface1; Iface2 myIface2[2]; Par { thread1(myIface1, myIface2); thread2(myIface1, myIface2[0]); thread3(myIface2[1]); }
USB XTAG The board Reset 24MHz MEMS LED 1.0V / 3.3V
New reset circuit
Hardware Setup Hardware setup Serial 1.2Mbps I2C I2C I2C PWM PWM
Teensy 3.6 Software Manages bluetooth messaging Manages all data logging Data logged is different between manual and auto Receives structure of data from XMOS during runtime Controls headlights via bluetooth or button
XMOS Software Reads wheel sensors which provide speed and distance Reads data from IMU which provides orientation In manual mode reads PWM values from receiver and sends them to ESC/Steering servo In automatic mode manages ESC/Steering through PID control. Provides car state to Teensy for logging over I2C Manages recording/driving/auto states
PC Software Allows Path viewing and editing Compare driven path to intended path OpenGL based, written in C++ All pathing files must be local, no remote car access Allows taking screenshots for sharing Auto-scale path window for maximum resolution Properly scales for high DPI screens