SlideShare a Scribd company logo
XMOS
    XMOS XS1 Chip
XC programming language



                  Ruben Vandamme

                  Christophe Scholliers
                  Coen De Roover
                                          1
Introduction
      ●   XMOS XS1 chip
          ●   multicore,
              multithreaded chip
          ●   event-driven
          ●   similar to Transputer
      ●   XC
          ●   allows use of special
              features of the chip
          ●   based upon CSP
          ●   C/C++ support
                                      2
Multicore - multithreaded
                        ●   4 XCores/CPUs
                        ●   Max 8 threads per
                            XCore
                            ●   ↔ java threads
                            ●   message passing
                            ●   preemptive scheduling
                        ●   Every XCore has I/O
                        ●   JTAG for debugging

                                                    3
Source: XMOS
Event driven
●   Threads can subscribe to events
    ●   a timer has past
    ●   a button is pushed
    ●   another thread wants to send data
●   Supported in hardware
    ●   no need for interrupts
    ●   with extra event conditions



                                            4
Concurrency support
                                     ●   Par
par                                      ●   runs functions in
{
      on stdcore[0] : function1();           parallel/interleaved (fork)
      on stdcore[1] : function2();

}
      ...                                ●   ends when all functions
                                             have returned (join)
                                         ●   assign a thread to a core




                                                                     5
Communication between threads
void sender ( chanend output )
{
                                  ●   Channels & chanends
    output<:1;
}                                     ●   mapping by compiler
void receiver ( chanend input )
{
                                      ●   two way
    int i;
    input:>i;
    printf("%d",i);
                                      ●   blocking
}

void main()
                                  ●   Write to channel
{
    chan channel;                     ●   chanend <: value
    par
    {
         sender(channel);
                                  ●   Read from channel
         receiver(channel);
    }
    return 0;
                                      ●   chanend :> variable
}
                                  ●   Printf()
                                      ●   shows data in IDE     6
Channels in hardware
                         ●   Communication
                             ●   in a single XCore
                             ●   to another XCore
                             ●   to another XS chip
                         ●   Transparant but
                             increasing latency




                                                      7
Source: XMOS
Sum + Divide
                                               ●   Pipeline
           54321
                                                   ●   sum
   f 5 :           =3                                divide
               5                                   ●



           321
   f 3 :       =2
             3


        init      start      sum        calc       divide     end    result


        5                 5+4..+1=15               15/5=3             3


                                                                              8
Source: Parallel Processing (The Transputer and Occam), A. Carling
Sum + Divide (2)
void init(chanend outi){                       init
    outi <: 5;
}
                                                  outi
void sum(chanend ins, chanend outs){
    int max, sum = 0;
    ins:>max;
                                                  ins
    for (int i = 0 ; i <= max ; i++)
         sum+=i;                              divide
    outs<:max;
    outs<:sum;
}                                                 outs
void divide(chanend divi, chanend divo){
    int average, sum, max;                        divi
    divi:>max;
    divi:>sum;
    average = sum/max;                        sum
    divo<:average;
}
                                                  divo
void result(chanend resi){
    int result;                                   resi
    resi:>result;
    printf("result: %d", result);
}                                             result
                                                         9
Sum + Divide (3)

int main(void)
                                               ●   Steps can concurrently
{
    chan start, calc,
    par
                         end;                  ●   But communication is
    {
         on stdcore[0]   :   init(start);
                                                   blocking
         on stdcore[1]   :   sum(start, calc);
         on stdcore[2]   :   average(calc, end);
         on stdcore[3]   :   result(end);
    }
    return 0;
}




                                                                       10
Select statement
                                  ●   ≠ switch statement
select                                ●   all case predicates are evaluated
{
    case a == 1 => input1 :> c:
        ...
                                  ●   boolean guard => input resource
        break;
    case a == 2 => input2 :> c:
        ...
                                  ●   Select an alternative if
        break;

}
    ...                               ●   Boolean guard evaluates to true
                                      ●   Checks whether resource is ready,
                                          but does not block
                                  ●   Selection is non-deterministic
                                      but fair
                                                                        11
Bounded buffer
                            data                   data
                                       buffer




                       producer                     consumer
                                           more




●   Asynchronous producer & consumer
●   Bounded together with a buffer
●   Used when producing rate ≠ consuming rate


                                                               12
Source: Communicating Sequential Processes, C.A.R Hoare
Bounded buffer (2)
                                          ●   Timers
void producerprocess(chanend buffer){
    for(int i = 0 ; i<= 15 ; i++){            ●   wait until a specified time
         buffer <: i;

    }
         printf("producing %dn", i);         ●   read the current time
}
void consumerprocess(chanend buffer){
    timer tc;
                                              ●   not reset
    int i, t = CONSUMER_DELAY;
    while(1){
                                              ●   can be used in select to
         tc when timerafter(t) :> void;
         t += CONSUMER_DELAY;                     create a timeout
         buffer <: 1; // more signal
         buffer :> i;
         printf("consuming %dn", i);
                                              ●   supported in hardware
    }
}




                                                                          13
Bounded buffer (3)
void boundedbuffer(chanend producer, chanend consumer){
    int moreSignal;
    int buffer[12];
    int inp = 0;
    int outp = 0;
    while(1){
         select{
         case inp < outp + 12 => producer :> buffer[inp % 12]:
             inp++;
             break;
         case outp < inp => consumer :> moreSignal:
             consumer <: buffer[outp % 12];
             outp++;
             break;
         }
    }
}
                  0    1   2    3   4    5    6     7     8   9   10   11

                                1   1    1    1




                               outp=3             inp=7
                                                                            14
Bounded buffer (4)

int main(void){

    chan producer, consumer;

    par
    {
          on stdcore[0] : boundedbuffer( producer, consumer );
          on stdcore[1] : consumerprocess( consumer);
          on stdcore[2] : producerprocess( producer );
    }
    return 0;
}




                                                                 15
Purpose
●   Architecture designed for
    ●   DSP
    ●   audio, video
    ●   networking


●   Port Scheme
    ●   allow usage of XC features via Scheme
    ●   XMOS challenge

                                                16
Questions ?




              17

More Related Content

What's hot

PKCS5
PKCS5PKCS5
Lab
LabLab
OpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick ReferenceOpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick Reference
The Khronos Group Inc.
 
C++11 talk
C++11 talkC++11 talk
C++11 talk
vpoliboyina
 
Constructor,destructors cpp
Constructor,destructors cppConstructor,destructors cpp
Constructor,destructors cpp
रमन सनौरिया
 
Storage classes
Storage classesStorage classes
Storage classes
priyanka jain
 
OpenGurukul : Language : PHP
OpenGurukul : Language : PHPOpenGurukul : Language : PHP
OpenGurukul : Language : PHP
Open Gurukul
 
Storage classes
Storage classesStorage classes
Storage classes
Praveen M Jigajinni
 
RSA криптосистем
RSA криптосистемRSA криптосистем
RSA криптосистем
sodhero
 
Integer security analysis using smt solver
Integer security analysis using smt solverInteger security analysis using smt solver
Integer security analysis using smt solver
Dharmalingam Ganesan
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемые
Platonov Sergey
 
Code Contracts In .Net
Code Contracts In .NetCode Contracts In .Net
Code Contracts In .Net
Bruce Johnson
 
Byte code field report
Byte code field reportByte code field report
Byte code field report
Rafael Winterhalter
 
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for EducationPythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
ECAM Brussels Engineering School
 
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
MobileMonday Estonia
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Ovidiu Farauanu
 
The Kumofs Project and MessagePack-RPC
The Kumofs Project and MessagePack-RPCThe Kumofs Project and MessagePack-RPC
The Kumofs Project and MessagePack-RPC
Sadayuki Furuhashi
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
corehard_by
 
Zeromq anatomy & jeromq
Zeromq anatomy & jeromqZeromq anatomy & jeromq
Zeromq anatomy & jeromq
Dongmin Yu
 
Vulkan 1.0 Quick Reference
Vulkan 1.0 Quick ReferenceVulkan 1.0 Quick Reference
Vulkan 1.0 Quick Reference
The Khronos Group Inc.
 

What's hot (20)

PKCS5
PKCS5PKCS5
PKCS5
 
Lab
LabLab
Lab
 
OpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick ReferenceOpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick Reference
 
C++11 talk
C++11 talkC++11 talk
C++11 talk
 
Constructor,destructors cpp
Constructor,destructors cppConstructor,destructors cpp
Constructor,destructors cpp
 
Storage classes
Storage classesStorage classes
Storage classes
 
OpenGurukul : Language : PHP
OpenGurukul : Language : PHPOpenGurukul : Language : PHP
OpenGurukul : Language : PHP
 
Storage classes
Storage classesStorage classes
Storage classes
 
RSA криптосистем
RSA криптосистемRSA криптосистем
RSA криптосистем
 
Integer security analysis using smt solver
Integer security analysis using smt solverInteger security analysis using smt solver
Integer security analysis using smt solver
 
Конверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемыеКонверсия управляемых языков в неуправляемые
Конверсия управляемых языков в неуправляемые
 
Code Contracts In .Net
Code Contracts In .NetCode Contracts In .Net
Code Contracts In .Net
 
Byte code field report
Byte code field reportByte code field report
Byte code field report
 
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for EducationPythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
Pythia Reloaded: An Intelligent Unit Testing-Based Code Grader for Education
 
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
Peeter Laud: "Formal Analysis of the Mobile-ID protocol"
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
 
The Kumofs Project and MessagePack-RPC
The Kumofs Project and MessagePack-RPCThe Kumofs Project and MessagePack-RPC
The Kumofs Project and MessagePack-RPC
 
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
C++ CoreHard Autumn 2018. Concurrency and Parallelism in C++17 and C++20/23 -...
 
Zeromq anatomy & jeromq
Zeromq anatomy & jeromqZeromq anatomy & jeromq
Zeromq anatomy & jeromq
 
Vulkan 1.0 Quick Reference
Vulkan 1.0 Quick ReferenceVulkan 1.0 Quick Reference
Vulkan 1.0 Quick Reference
 

Similar to XMOS XS1 and XC

Giorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrencyGiorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrency
Giorgio Zoppi
 
Presentation buffer overflow attacks and theircountermeasures
Presentation buffer overflow attacks and theircountermeasuresPresentation buffer overflow attacks and theircountermeasures
Presentation buffer overflow attacks and theircountermeasures
tharindunew
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
Sri Prasanna
 
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH  SRIVATHS PC_BASICS FOR C PROGRAMMER WITH  SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
amankr1234am
 
2013 05 ny
2013 05 ny2013 05 ny
2013 05 ny
Sri Ambati
 
Lab 6
Lab 6Lab 6
Lab 6
alish sha
 
Introduction to CUDA
Introduction to CUDAIntroduction to CUDA
Introduction to CUDA
Raymond Tay
 
C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1
Ammara Javed
 
Programming basics
Programming basicsProgramming basics
Programming basics
Bipin Adhikari
 
Class 16: Making Loops
Class 16: Making LoopsClass 16: Making Loops
Class 16: Making Loops
David Evans
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilog
venravi10
 
Computer network (8)
Computer network (8)Computer network (8)
Computer network (8)
NYversity
 
Fundamental concurrent programming
Fundamental concurrent programmingFundamental concurrent programming
Fundamental concurrent programming
Dimas Prawira
 
TLPI - 6 Process
TLPI - 6 ProcessTLPI - 6 Process
TLPI - 6 Process
Shu-Yu Fu
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
National Cheng Kung University
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hood
RichardWarburton
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
rohassanie
 
Iteration
IterationIteration
Iteration
Liam Dunphy
 
Appsec obfuscator reloaded
Appsec obfuscator reloadedAppsec obfuscator reloaded
Appsec obfuscator reloaded
Cyber Security Alliance
 
MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103
Linaro
 

Similar to XMOS XS1 and XC (20)

Giorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrencyGiorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrency
 
Presentation buffer overflow attacks and theircountermeasures
Presentation buffer overflow attacks and theircountermeasuresPresentation buffer overflow attacks and theircountermeasures
Presentation buffer overflow attacks and theircountermeasures
 
Other Approaches (Concurrency)
Other Approaches (Concurrency)Other Approaches (Concurrency)
Other Approaches (Concurrency)
 
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH  SRIVATHS PC_BASICS FOR C PROGRAMMER WITH  SRIVATHS P
C_BASICS FOR C PROGRAMMER WITH SRIVATHS P
 
2013 05 ny
2013 05 ny2013 05 ny
2013 05 ny
 
Lab 6
Lab 6Lab 6
Lab 6
 
Introduction to CUDA
Introduction to CUDAIntroduction to CUDA
Introduction to CUDA
 
C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
Class 16: Making Loops
Class 16: Making LoopsClass 16: Making Loops
Class 16: Making Loops
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilog
 
Computer network (8)
Computer network (8)Computer network (8)
Computer network (8)
 
Fundamental concurrent programming
Fundamental concurrent programmingFundamental concurrent programming
Fundamental concurrent programming
 
TLPI - 6 Process
TLPI - 6 ProcessTLPI - 6 Process
TLPI - 6 Process
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hood
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
 
Iteration
IterationIteration
Iteration
 
Appsec obfuscator reloaded
Appsec obfuscator reloadedAppsec obfuscator reloaded
Appsec obfuscator reloaded
 
MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 

XMOS XS1 and XC

  • 1. XMOS XMOS XS1 Chip XC programming language Ruben Vandamme Christophe Scholliers Coen De Roover 1
  • 2. Introduction ● XMOS XS1 chip ● multicore, multithreaded chip ● event-driven ● similar to Transputer ● XC ● allows use of special features of the chip ● based upon CSP ● C/C++ support 2
  • 3. Multicore - multithreaded ● 4 XCores/CPUs ● Max 8 threads per XCore ● ↔ java threads ● message passing ● preemptive scheduling ● Every XCore has I/O ● JTAG for debugging 3 Source: XMOS
  • 4. Event driven ● Threads can subscribe to events ● a timer has past ● a button is pushed ● another thread wants to send data ● Supported in hardware ● no need for interrupts ● with extra event conditions 4
  • 5. Concurrency support ● Par par ● runs functions in { on stdcore[0] : function1(); parallel/interleaved (fork) on stdcore[1] : function2(); } ... ● ends when all functions have returned (join) ● assign a thread to a core 5
  • 6. Communication between threads void sender ( chanend output ) { ● Channels & chanends output<:1; } ● mapping by compiler void receiver ( chanend input ) { ● two way int i; input:>i; printf("%d",i); ● blocking } void main() ● Write to channel { chan channel; ● chanend <: value par { sender(channel); ● Read from channel receiver(channel); } return 0; ● chanend :> variable } ● Printf() ● shows data in IDE 6
  • 7. Channels in hardware ● Communication ● in a single XCore ● to another XCore ● to another XS chip ● Transparant but increasing latency 7 Source: XMOS
  • 8. Sum + Divide ● Pipeline 54321 ● sum f 5 : =3 divide 5 ● 321 f 3 : =2 3 init start sum calc divide end result 5 5+4..+1=15 15/5=3 3 8 Source: Parallel Processing (The Transputer and Occam), A. Carling
  • 9. Sum + Divide (2) void init(chanend outi){ init outi <: 5; } outi void sum(chanend ins, chanend outs){ int max, sum = 0; ins:>max; ins for (int i = 0 ; i <= max ; i++) sum+=i; divide outs<:max; outs<:sum; } outs void divide(chanend divi, chanend divo){ int average, sum, max; divi divi:>max; divi:>sum; average = sum/max; sum divo<:average; } divo void result(chanend resi){ int result; resi resi:>result; printf("result: %d", result); } result 9
  • 10. Sum + Divide (3) int main(void) ● Steps can concurrently { chan start, calc, par end; ● But communication is { on stdcore[0] : init(start); blocking on stdcore[1] : sum(start, calc); on stdcore[2] : average(calc, end); on stdcore[3] : result(end); } return 0; } 10
  • 11. Select statement ● ≠ switch statement select ● all case predicates are evaluated { case a == 1 => input1 :> c: ... ● boolean guard => input resource break; case a == 2 => input2 :> c: ... ● Select an alternative if break; } ... ● Boolean guard evaluates to true ● Checks whether resource is ready, but does not block ● Selection is non-deterministic but fair 11
  • 12. Bounded buffer data data buffer producer consumer more ● Asynchronous producer & consumer ● Bounded together with a buffer ● Used when producing rate ≠ consuming rate 12 Source: Communicating Sequential Processes, C.A.R Hoare
  • 13. Bounded buffer (2) ● Timers void producerprocess(chanend buffer){ for(int i = 0 ; i<= 15 ; i++){ ● wait until a specified time buffer <: i; } printf("producing %dn", i); ● read the current time } void consumerprocess(chanend buffer){ timer tc; ● not reset int i, t = CONSUMER_DELAY; while(1){ ● can be used in select to tc when timerafter(t) :> void; t += CONSUMER_DELAY; create a timeout buffer <: 1; // more signal buffer :> i; printf("consuming %dn", i); ● supported in hardware } } 13
  • 14. Bounded buffer (3) void boundedbuffer(chanend producer, chanend consumer){ int moreSignal; int buffer[12]; int inp = 0; int outp = 0; while(1){ select{ case inp < outp + 12 => producer :> buffer[inp % 12]: inp++; break; case outp < inp => consumer :> moreSignal: consumer <: buffer[outp % 12]; outp++; break; } } } 0 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 outp=3 inp=7 14
  • 15. Bounded buffer (4) int main(void){ chan producer, consumer; par { on stdcore[0] : boundedbuffer( producer, consumer ); on stdcore[1] : consumerprocess( consumer); on stdcore[2] : producerprocess( producer ); } return 0; } 15
  • 16. Purpose ● Architecture designed for ● DSP ● audio, video ● networking ● Port Scheme ● allow usage of XC features via Scheme ● XMOS challenge 16