0 comments Sunday, October 3, 2010

XMOS Bit Scheme has won the "Project Of The Month" award on XCore.com!

0 comments Monday, September 13, 2010

The XMOS BIT Scheme code is now available on XCore Exchange (under the GPL3 license)!

0 comments Sunday, September 5, 2010

I've recently finished my thesis titled "Implementing Concurrency Abstractions for Programming Multi-Core Embedded Systems in Scheme" in which I've ported Bit Scheme to the XMOS platform. During the project, I switched from the XMOSlisp, mentioned before to Bit Scheme which contains much functionality.

In the following movie you can see a demo application written in Scheme running on an XK-1a development board. This board performs a red-green LED and communicates with another board via XBee. You can find a bit more information about this demo in the presentation below.



I've also uploaded the slides of my defense online in order to show the basic usage of the XMOS Bit Scheme interpreter.

0 comments Monday, March 8, 2010

The XMOSlisp code is now available on xcore.com
http://xcore.com/projects/xmoslisp
Since the last blogpost, a simple garbagecollector has been added too.

0 comments Sunday, February 28, 2010

Intro

Recently I've made progress on having an interpreted language running on the XMOS chip. I've found a small (but incomplete) lisp interpreter which fits in and runs with the limited memory of the chip. By using an interpreted language, programs can be run on the XMOS chip without the need for compilation. Unfortunately it doesn't contain a garbage collector (at this moment), meaning that an inevitable crash awaits a lot of the programs.

Examples

Primitives for ports and timers are added to allow various IO operations.
For example turning some leds on, on the development board:

(pout clockled0 15)

This function returns the value set (in this case 15), allowing to chain multiple outputs:

(pout clockled0 (pout clockled1 (pout clockled2 15)))

Input is also supported using the following methods:
  • simple read: (pin button)
  • pin equal: (peq button 12)
  • pin not equal: (pne button 15)
These methods obviously return the value read from the port allowing combinations like:

(pout clockled0 (pne button 15))

There is also support for timers. These evaluate to an integer value similar to the way they are used in XC. That way delays can easily be created by doing:

(after (+ (timer) 100000000) value)

Using these timers the following demo was made. It is a function which is called recursively generating a small animation using the LEDs on the development board. The initial value (being 1) is multiplied by two on every function call, effectively shifting to the next led. The "mod 15", keeps everything in range.

((lambda x (apply (car x) x))
 (lambda (f n)
  (f f
   (after (+ (timer) 20000000)
    (% (* 2 (pout clockled0 (pout clockled1 (pout clockled2 n)))) 15)
 )))
 1
)

Due to the lack of a garbage collector and the use of recursion, it will run out of memory after about 10-15 seconds.





Parallellism

At this moment there is no way to use the multithreading in the XMOS chip using the lisp interpreter.