RSS YouTube LinkedIn Twitter XCore IRC

Search

Projects Tutorials Forum

Personal tools

XMP-64 Group

From XCore Exchange

Jump to: navigation, search

Welcome to the XMP-64 group page. The aim is to gather or link to any useful related information here such as example code, guides or general tips.

What is the XMP-64?

The XMP-64 is an experimental 64-core device. It features 16 XS1-G4 chips connected together in a hypercube topology. For more information check the offical XMOS page.

Performance experiments

Available through the XMOS website is a 'performance measurements' document. This gives details of a number of experiments performed with the device to gain some insight into some of its characteristics, such as the time taken to deliver messages in a congested network.

The source code of the experiments is available, and is a good place to start if writing XMP-64 software for the first time.

Example program

Here is a complete example XC program which runs one process on each of the 64 cores, 16 of which switch on an led attached to the core.

#include <platform.h>
#include <xs1.h>

#define NUM_CORES 64
#define STEP      4

out port leds[] = {
    on stdcore[0] : XS1_PORT_1E,
    on stdcore[4] : XS1_PORT_1E,
    on stdcore[8] : XS1_PORT_1E,
    on stdcore[12]: XS1_PORT_1E,
    on stdcore[16]: XS1_PORT_1E,
    on stdcore[20]: XS1_PORT_1E,
    on stdcore[24]: XS1_PORT_1E,
    on stdcore[28]: XS1_PORT_1E,
    on stdcore[32]: XS1_PORT_1E,
    on stdcore[36]: XS1_PORT_1E,
    on stdcore[40]: XS1_PORT_1E,
    on stdcore[44]: XS1_PORT_1E,
    on stdcore[48]: XS1_PORT_1E,
    on stdcore[52]: XS1_PORT_1E,
    on stdcore[56]: XS1_PORT_1E,
    on stdcore[60]: XS1_PORT_1E
};

void foo(int number, out port led) {
    led <: 1;
    while(1) {}
}

void bar(int number) {
    while(1) {}
}

int main(char args[]) {
    chan c[NUM_CORES];
    par {
        par (int i=0; i<NUM_CORES; i+=STEP) {
            on stdcore[i] : foo(i, leds[i/STEP]);
            par (int j=1; j<STEP; j++)
                on stdcore[i+j] : bar(i+j);
        }
    }
    return 0;
}