XC, aka XMOS community, is a programming language created in 2005.
#1588on PLDB | 19Years Old | 342Repos |
In computers, XC is a programming language for real-time embedded parallel processors, targeted at the XMOS XCore processor architecture.XC is an imperative language, based on the features for parallelism and communication in occam, and the syntax and sequential features of C. It provides primitive features that correspond to the various architectural resources provided, namely: channel ends, locks, ports and timers. In combination with XCore processors, XC is used to build embedded systems with levels of I/O, real-time performance and computational ability usually attributed to field-programmable gate arrays (FPGAs) or application-specific integrated circuit (ASIC) devices.. Read more on Wikipedia...
int main()
{
int x;
chan c;
par {
c <: 0;
c :> x;
}
return x;
}
#include <stdio.h>
#include <platform.h>
void hello(int id, chanend cin, chanend cout){
if (id > 0) cin :> int;
printf("Hello from core %d!", id);
if (id < 3) cout <: 1;
}
int main(void) {
chan c[3];
par (int i=0; i<4; i++)
on tile[i] : hello(i, c[i], c[(i+1)%4]);
return 0;
}