SlideShare a Scribd company logo
vincent@cteq.eu https://www.linkedin.com/in/vincentclaes/ 1
Abstract—R is a programming language for statistical
computing. It has many built in functions for statistical
calculations of large datasets and even more available libraries to
expand this functionality. R is however fundamentally single
threaded. As the size of the used datasets increases, so does the
processing time. This limits the use of R in real-time applications
with large amounts of data where statistical analysis is necessary.
By offloading intensive calculations to an FPGA with massive
parallel processing power these calculations can be sped up to
make R valid for real-time processing. This paper proposes a
simple way to send data from an application in R to the digital
logic in an FPGA and back. In this way applications like sensor
fusion systems, machine learning algorithms for “Internet-of-
things” applications can be realized in the future on this Xilinx
Zynq embedded systems platform. In this way intelligent IoT
Gateways could be realized.
Index Terms— R-project, R, FPGA, Statistical computing,
hardware acceleration, Xillybus, Xilinx, Zynq, zedboard, machine
learning, sensor fusion
I. INTRODUCTION
He last few years we have seen a massive increase in
interest in using FPGAs (Field Programmable Gate Arrays)
to offload difficult calculation from processors. By
leveraging custom digital logic with its parallel potential
processes, which are normally run solely on a processor, can be
sped up and power consumption decreased. At first sight,
combining software with digital logic seems like a daunting
task. Besides software design and digital logic design an
interface has to be created between the two. For these reasons
it is often avoided unless absolutely necessary. Fortunately
there exist tools to simplify this design process, especially the
interface between the application software and digital logic. To
illustrate this, this paper provides a solution to interface an
application written on R and running on a Linux host with
digital logic on an FPGA. With this interface hardware
acceleration for intensive calculations can be implemented on
the FPGA while the ease of use and native support for statistical
computing of R is retained.
II. TOOLS AND SOFTWARE
A zedboard was used as development board. It is a board with
T. Nulens is a student at Hasselt University, Faculty of Engineering
Technology, Diepenbeek, Belgium. E-mail: tom.nulens@student.uhasselt.be.
a Xilinx Zynq system-on-chip and various inputs and outputs
like USB, VGA and much more. The Zynq system-on-chip
consists of a 32bit ARM dual core processor and a large amount
of programmable logic.
Figure 1 Top and bottom view of the zedboard
The application software runs on the processor and
communicates with the programmable logic as required. A
special distribution of Ubuntu, named Xillinux, is installed on
the processor. Xillinux is a version of Ubuntu LTS 12.04 for
ARM with Xillybus drivers preinstalled. The operating system
runs from a SD card which acts as hard drive for the zedboard.
Finally, R version 3.1.2 was installed. Since Xillybus is already
supported on this device, it’s the obvious choice to use as
interface between the processor and digital logic. Xillybus takes
care of both the digital logic implementation and the software
drivers for the interface. It also works with both AXI (Advanced
eXtensible Interface) and PCIe (Peripheral Component
Interconnect Express) which makes it possible to transfer the
application on the Zynq system-on-chip to a full desktop
without worrying about those interfaces.
III. XILLYBUS
Xillybus is a combination of an IP core for the FPGA as well as
a driver for the operating system on the processor. Together it
allows a simple interface between the digital logic and the
application software. The IP core implements the digital logic
required to send and receive data from the processor with First
In First Out shift (FIFO) registers. It provides the signals to
drive FIFO registers, signals like clock and write enable. These
signals must then be used to drive a user-defined FIFO in the
implementation. The Xillybus IP core then connects to a PCIe
V. Claes is the owner of cteq.eu vincent@cteq.eu
https://www.linkedin.com/in/vincentclaes/
Implementing an interface in R to communicate
with Programmable Fabric in a Xilinx ZYNQ
FPGA
Vincent Claes, Tom Nulens [Project realized in 2015]
T
vincent@cteq.eu https://www.linkedin.com/in/vincentclaes/ 2
interface IP core or AXI (Advanced eXtensible Interface) IP
core, depending on the platform. In the Zynq chip, AXI is used
to connect the digital logic to the processor. The IP core is
generated at the IP factory web interface on the website of
Xillybus. Specifications such as bandwidth, data width and data
direction are defined here. Afterwards the IP core is generated
and available for download. The bandwidth on an AXI interface
is limited to 200 Mbytes/s.
Figure 2 FPGA block diagram with the Xillybus IP core and a PCIe
interface
On the processor side the Xillybus driver allows read and write
operations through a standard input/output file-interface. A data
connection is opened between the application software and
digital logic by simply opening a file defined by the Xillybus
driver and writing to or reading from that file.
Figure 3 Processor host interface block diagram
IV. INTERFACE BETWEEN R AND XILLYBUS
A. Problems with interfacing R with Xillybus
In the previous paragraph I noted that to write to or read from
the FPGA a standard file IO system is everything that is
required. Although R has this functionality, reading or writing
in native R is not very efficient for real-time applications for
two reasons: First, an R application is single threaded. This
means that when transferring data back and forth between the
processor and FPGA, no other calculation can be performed by
the processor. With large datasets a significant amount of time
would be lost due to this data transferring. By doing the reading
and writing in background threads the host application can
continue with different calculations regardless of what is
happening in the digital logic. There are some solutions for
parallelism in R, they are however aimed at dividing
calculations over multiple cores instead of doing different tasks
concurrently. Second, as a high level programming language,
datatype manipulation is less transparent than it is in languages
like C. Depending on the digital logic you have designed, the
interface will expect anything ranging from 32bit doubles to
8bit unsigned integers. For this reason it is advantageous to use
a language with explicit datatypes.
B. Proposed solution
By using the R library Rcpp, C++ functions and classes can be
called from R. Rcpp provides a C++ header file with the
definition for an R object. This object along with a short
wrapper allows Rcpp to compile custom C++ classes and
functions that can directly take R objects as argument and return
them too. C++ can then be used to prepare data from R to write
to the FPGA or to read data from the FPGA before returning it
to R. By combining this with the C++ library thread.h read and
write functionality can be given separate threads from the main
R thread. The Xillybus programming guide proposes the
following diagram for an implementation of hardware
acceleration:
Figure 4 Host-FPGA interface with Thread A as writer and Thread B
as reader. Main thread not pictured
In the main thread two threads are started, one to write data to
the FPGA and one to read the calculated results. These two
threads run continuously in the background while different
calculations can still be performed in the main thread. A
continues data flow is possible in this implementation provided
enough data is fed into the write thread to make use of the full
bandwidth. The write thread takes care of the translation of the
R objects to the datatypes the digital logic expects while the
read thread takes care of the reverse.
C. Implementation
First use the Xillybus IP factory to generate an IP core with
separate downstream and upstream device files and implement
this IP core in the FPGA design.
Figure 5 Configuration of an upstream and downstream device file in
the Xillybus IP factory
Afterwards a regular C++ class can be written to open those two
device files to read and write from separate threads. Make sure
to use the R objects defined by the Rcpp header file as
arguments and return values for the methods in this class. The
R wrapper is defined separately from the class definition but it
is placed in the same source file.
vincent@cteq.eu https://www.linkedin.com/in/vincentclaes/ 3
Figure 6 Example of the R wrapper for a C++ class called ‘Manager’
In the wrapper definition the chosen class is given along with
the names for all the exposed methods as well as function
pointers to the corresponding methods in their C++ class. This
source file is then ready to be compiled through Rcpp with the
command: sourceCpp(“/path/class.cpp”). At that point the class
is ready to be used in R. The following R script illustrates the
implementation of the interface.
Figure 7 R script with FPGA interface. Green are comments, red are
the outputs
In the above script a loopback is implemented in the FPGA. The
Class Manager was written in C++. The object u is an instance
of Manager.
V. CONCLUSION
An interface between an R application and an FPGA has been
made. The processor and FPGA reside on the same system-on-
chip and are connected by AXI. By using Xillybus the
complexity on the software side that comes from AXI is
completely removed. The Xillybus driver also works regardless
of whether the interface is AXI or PCIe which means that the
whole application can be moved to a desktop computer with an
FPGA board connected on a PCIe slot in case this becomes
desirable. On the FPGA side the IP core governs the interface
and requires only a read and write FIFO in the user logic. The
complexity of AXI or PCIe on the FPGA is reduced to
connecting the right signals from the Xillybus IP core to the
fitting Xilinx or Altera IP core. This interface is therefore ideal
for rapid prototyping.
VI. ACKNOWLEDGEMENT
This project was realized for cteq.eu [http://www.cteq.eu] with
support from Hasselt University. I would like to thank V. Claes
for technical support.
VII. REFERENCES
[1] "Xillybus Product Brief," Xillybus Ltd., 7 March 2014.
[Online]. Available:
http://xillybus.com/downloads/xillybus_product_brief.p
df. [Accessed April 2015].
[2] "ZedBoard," Avnet, [Online]. Available:
http://zedboard.org/product/zedboard. [Accessed April
2015].
[3] Radford M. Neal, University of Toronto, "Speeding up R
with Multithreading,," 29 November 2013. [Online].
Available: http://www.cs.utoronto.ca/~radford/ftp/pqR-
guelph.pdf. [Accessed April 2015].
[4] Xillybus Ltd, "Getting started with the FPGA demo
bundle for Xilinx," [Online]. Available:
http://xillybus.com/downloads/doc/xillybus_getting_star
ted_xilinx.pdf. [Accessed April 2015].
[5] Xillybus Ltd., "Getting started with Xillinux for Zynq-
7000 EPP," [Online]. Available:
http://xillybus.com/downloads/doc/xillybus_getting_star
ted_zynq.pdf. [Accessed April 2015].
[6] Xillybus Ltd., "Getting started with Xillybus on a Linux
host," [Online]. Available:
http://xillybus.com/downloads/doc/xillybus_getting_star
ted_linux.pdf. [Accessed April 2015].
[7] Xillybus Ltd., "Xillybus FPGA designer’s guide,"
[Online]. Available:
http://xillybus.com/downloads/doc/xillybus_fpga_api.pd
f. [Accessed April 2015].
[8] Xillybus Ltd., "The guide to defining a custom Xillybus
IP core," [Online]. Available:
http://xillybus.com/downloads/doc/xillybus_custom_ip.
pdf. [Accessed April 2015].
[9] Xillybus Ltd., "Xillybus host application programming
guide for Linux," [Online]. Available:
http://xillybus.com/downloads/doc/xillybus_host_progra
mming_guide_linux.pdf. [Accessed April 2015].
[10] The R Core Team, "R: A Language and Environment for
Statistical Computing - Reference Index," 9 March 2015.
[Online]. Available: http://cran.r-
project.org/manuals.html. [Accessed April 2015].
[11] R Core Team, "Writing R Extensions," 9 March 2015.
[Online]. Available: http://cran.r-
project.org/doc/manuals/r-release/R-exts.html.
[Accessed April 2015].
[12] Dirk Eddelbuettel and Romain François, "Exposing C++
functions and classes with Rcpp modules," 4 March
2015. [Online]. Available: http://cran.r-
project.org/web/packages/Rcpp/vignettes/Rcpp-
modules.pdf. [Accessed April 2015].
Ad

More Related Content

What's hot (19)

A Common Backend for Hardware Acceleration of DSLs on FPGA
A Common Backend for Hardware Acceleration of DSLs on FPGAA Common Backend for Hardware Acceleration of DSLs on FPGA
A Common Backend for Hardware Acceleration of DSLs on FPGA
NECST Lab @ Politecnico di Milano
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
IOSR Journals
 
R language
R languageR language
R language
Kìshør Krîßh
 
Performance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Performance Optimization of SPH Algorithms for Multi/Many-Core ArchitecturesPerformance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Performance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Dr. Fabio Baruffa
 
FPGA Implementation of LDPC Encoder for Terrestrial Television
FPGA Implementation of LDPC Encoder for Terrestrial TelevisionFPGA Implementation of LDPC Encoder for Terrestrial Television
FPGA Implementation of LDPC Encoder for Terrestrial Television
AI Publications
 
R programming
R programmingR programming
R programming
Shantanu Patil
 
2016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
2016 IEEE VLSI TITES FROM MSR PROJECTS-95814641422016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
2016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
MSR PROJECTS
 
0507036
05070360507036
0507036
meraz rizel
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
chiportal
 
R Programming
R ProgrammingR Programming
R Programming
Abhishek Pratap Singh
 
Class ppt intro to r
Class ppt intro to rClass ppt intro to r
Class ppt intro to r
JigsawAcademy2014
 
Networking models tcp
Networking models tcpNetworking models tcp
Networking models tcp
Bhaskar Karimuri
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
hemasri56
 
How to get started with R programming
How to get started with R programmingHow to get started with R programming
How to get started with R programming
Ramon Salazar
 
R programming
R programmingR programming
R programming
Nandhini G
 
R programming
R programmingR programming
R programming
TIB Academy
 
DrazenGrasovec_CV
DrazenGrasovec_CVDrazenGrasovec_CV
DrazenGrasovec_CV
dra?en gra?ovec
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
Victor Ordu
 
R programming presentation
R programming presentationR programming presentation
R programming presentation
Akshat Sharma
 
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
Performance Evaluation of IPv4 Vs Ipv6 and Tunnelling Techniques Using Optimi...
IOSR Journals
 
Performance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Performance Optimization of SPH Algorithms for Multi/Many-Core ArchitecturesPerformance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Performance Optimization of SPH Algorithms for Multi/Many-Core Architectures
Dr. Fabio Baruffa
 
FPGA Implementation of LDPC Encoder for Terrestrial Television
FPGA Implementation of LDPC Encoder for Terrestrial TelevisionFPGA Implementation of LDPC Encoder for Terrestrial Television
FPGA Implementation of LDPC Encoder for Terrestrial Television
AI Publications
 
2016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
2016 IEEE VLSI TITES FROM MSR PROJECTS-95814641422016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
2016 IEEE VLSI TITES FROM MSR PROJECTS-9581464142
MSR PROJECTS
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
chiportal
 
Introduction to R Programming
Introduction to R ProgrammingIntroduction to R Programming
Introduction to R Programming
hemasri56
 
How to get started with R programming
How to get started with R programmingHow to get started with R programming
How to get started with R programming
Ramon Salazar
 
Introduction to R programming
Introduction to R programmingIntroduction to R programming
Introduction to R programming
Victor Ordu
 

Similar to Implementing an interface in r to communicate with programmable fabric in a xilinx zynq fpga (20)

Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...
Ashley Carter
 
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGSA STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
International Journal of Technical Research & Application
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIESSTUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
ijdpsjournal
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIESSTUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
journalijdps
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA  PLANE AND OPTIMIZATION POSSIBILITIES STUDY ON EMERGING APPLICATIONS ON DATA  PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
ijdpsjournal
 
Project report of 2016 Trainee_final
Project report of 2016 Trainee_finalProject report of 2016 Trainee_final
Project report of 2016 Trainee_final
Akash Chowdhury
 
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCENETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
cscpconf
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Intel® Software
 
Applications of Fuzzy Logic in Image Processing – A Brief Study
Applications of Fuzzy Logic in Image Processing – A Brief StudyApplications of Fuzzy Logic in Image Processing – A Brief Study
Applications of Fuzzy Logic in Image Processing – A Brief Study
Computer Science Journals
 
Resume
ResumeResume
Resume
aquibhussain torgal
 
maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_Magazine
Max Kleiner
 
Cockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with ElixirCockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with Elixir
Hideki Takase
 
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
EUDAT
 
Programmable logic controller performance enhancement by field programmable g...
Programmable logic controller performance enhancement by field programmable g...Programmable logic controller performance enhancement by field programmable g...
Programmable logic controller performance enhancement by field programmable g...
ISA Interchange
 
Raspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extended
WiseNaeem
 
electronics-11-03883.pdf
electronics-11-03883.pdfelectronics-11-03883.pdf
electronics-11-03883.pdf
RioCarthiis
 
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET Journal
 
Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...
Iaetsd Iaetsd
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
Boris Adryan
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
Max Kleiner
 
Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...
Ashley Carter
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIESSTUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
ijdpsjournal
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIESSTUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
journalijdps
 
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA  PLANE AND OPTIMIZATION POSSIBILITIES STUDY ON EMERGING APPLICATIONS ON DATA  PLANE AND OPTIMIZATION POSSIBILITIES
STUDY ON EMERGING APPLICATIONS ON DATA PLANE AND OPTIMIZATION POSSIBILITIES
ijdpsjournal
 
Project report of 2016 Trainee_final
Project report of 2016 Trainee_finalProject report of 2016 Trainee_final
Project report of 2016 Trainee_final
Akash Chowdhury
 
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCENETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
NETWORK TRAFFIC ANALYSIS: HADOOP PIG VS TYPICAL MAPREDUCE
cscpconf
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Intel® Software
 
Applications of Fuzzy Logic in Image Processing – A Brief Study
Applications of Fuzzy Logic in Image Processing – A Brief StudyApplications of Fuzzy Logic in Image Processing – A Brief Study
Applications of Fuzzy Logic in Image Processing – A Brief Study
Computer Science Journals
 
maXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_MagazinemaXbox_Arduino_Pascal_Magazine
maXbox_Arduino_Pascal_Magazine
Max Kleiner
 
Cockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with ElixirCockatrice: A Hardware Design Environment with Elixir
Cockatrice: A Hardware Design Environment with Elixir
Hideki Takase
 
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
Introduction to HPC Programming Models - EUDAT Summer School (Stefano Markidi...
EUDAT
 
Programmable logic controller performance enhancement by field programmable g...
Programmable logic controller performance enhancement by field programmable g...Programmable logic controller performance enhancement by field programmable g...
Programmable logic controller performance enhancement by field programmable g...
ISA Interchange
 
Raspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extended
WiseNaeem
 
electronics-11-03883.pdf
electronics-11-03883.pdfelectronics-11-03883.pdf
electronics-11-03883.pdf
RioCarthiis
 
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET- A Review- FPGA based Architectures for Image Capturing Consequently Pr...
IRJET Journal
 
Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...
Iaetsd Iaetsd
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
Boris Adryan
 
maXbox Arduino Tutorial
maXbox Arduino TutorialmaXbox Arduino Tutorial
maXbox Arduino Tutorial
Max Kleiner
 
Ad

More from Vincent Claes (20)

Percepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDPercepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZED
Vincent Claes
 
Xilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldXilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello World
Vincent Claes
 
Programming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKProgramming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDK
Vincent Claes
 
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockDebugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Vincent Claes
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Vincent Claes
 
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Vincent Claes
 
Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot Python
Vincent Claes
 
Installation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopInstallation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python Workshop
Vincent Claes
 
ZYNQ BRAM Implementation
ZYNQ BRAM ImplementationZYNQ BRAM Implementation
ZYNQ BRAM Implementation
Vincent Claes
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud Service
Vincent Claes
 
Launching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT ProjectsLaunching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT Projects
Vincent Claes
 
Real Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMReal Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARM
Vincent Claes
 
R Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleR Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by Example
Vincent Claes
 
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadUsing Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Vincent Claes
 
Hogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorHogeschool PXL Smart Mirror
Hogeschool PXL Smart Mirror
Vincent Claes
 
Softcore vs Hardcore processor
Softcore vs Hardcore processorSoftcore vs Hardcore processor
Softcore vs Hardcore processor
Vincent Claes
 
MySQL / PHP Server
MySQL / PHP ServerMySQL / PHP Server
MySQL / PHP Server
Vincent Claes
 
fTales workshop
fTales workshopfTales workshop
fTales workshop
Vincent Claes
 
Maker Revolution
Maker RevolutionMaker Revolution
Maker Revolution
Vincent Claes
 
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Vincent Claes
 
Percepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZEDPercepio Tracealyzer for FreeRTOS on MiniZED
Percepio Tracealyzer for FreeRTOS on MiniZED
Vincent Claes
 
Xilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello WorldXilinx Vitis FreeRTOS Hello World
Xilinx Vitis FreeRTOS Hello World
Vincent Claes
 
Programming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDKProgramming STM32L432 Nucleo with Keil MDK
Programming STM32L432 Nucleo with Keil MDK
Vincent Claes
 
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP BlockDebugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Debugging Xilinx Zynq Project using ILA Integrated Logic Analyzer IP Block
Vincent Claes
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Vincent Claes
 
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Profiling Xilinx Zynq Software Applications in SDK (MiniZED board)
Vincent Claes
 
Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot Python
Vincent Claes
 
Installation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python WorkshopInstallation Anaconda Navigator for Python Workshop
Installation Anaconda Navigator for Python Workshop
Vincent Claes
 
ZYNQ BRAM Implementation
ZYNQ BRAM ImplementationZYNQ BRAM Implementation
ZYNQ BRAM Implementation
Vincent Claes
 
Implementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud ServiceImplementing a Database and API for your Cloud Service
Implementing a Database and API for your Cloud Service
Vincent Claes
 
Launching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT ProjectsLaunching Python Cloud Services for AI/IoT Projects
Launching Python Cloud Services for AI/IoT Projects
Vincent Claes
 
Real Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARMReal Time Filtering on Embedded ARM
Real Time Filtering on Embedded ARM
Vincent Claes
 
R Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by ExampleR Markdown, Rpubs & github publishing and Shiny by Example
R Markdown, Rpubs & github publishing and Shiny by Example
Vincent Claes
 
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL LaunchpadUsing Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Using Texas Instruments Code Composer Studio for The CC3200XL Launchpad
Vincent Claes
 
Hogeschool PXL Smart Mirror
Hogeschool PXL Smart MirrorHogeschool PXL Smart Mirror
Hogeschool PXL Smart Mirror
Vincent Claes
 
Softcore vs Hardcore processor
Softcore vs Hardcore processorSoftcore vs Hardcore processor
Softcore vs Hardcore processor
Vincent Claes
 
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Debugging IoT Sensor Interfaces (SPI) with Digilent Analog Discovery 2
Vincent Claes
 
Ad

Recently uploaded (20)

How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Mastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdfMastering Advance Window Functions in SQL.pdf
Mastering Advance Window Functions in SQL.pdf
Spiral Mantra
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Vaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without HallucinationsVaibhav Gupta BAML: AI work flows without Hallucinations
Vaibhav Gupta BAML: AI work flows without Hallucinations
john409870
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 

Implementing an interface in r to communicate with programmable fabric in a xilinx zynq fpga

  • 1. [email protected] https://www.linkedin.com/in/vincentclaes/ 1 Abstract—R is a programming language for statistical computing. It has many built in functions for statistical calculations of large datasets and even more available libraries to expand this functionality. R is however fundamentally single threaded. As the size of the used datasets increases, so does the processing time. This limits the use of R in real-time applications with large amounts of data where statistical analysis is necessary. By offloading intensive calculations to an FPGA with massive parallel processing power these calculations can be sped up to make R valid for real-time processing. This paper proposes a simple way to send data from an application in R to the digital logic in an FPGA and back. In this way applications like sensor fusion systems, machine learning algorithms for “Internet-of- things” applications can be realized in the future on this Xilinx Zynq embedded systems platform. In this way intelligent IoT Gateways could be realized. Index Terms— R-project, R, FPGA, Statistical computing, hardware acceleration, Xillybus, Xilinx, Zynq, zedboard, machine learning, sensor fusion I. INTRODUCTION He last few years we have seen a massive increase in interest in using FPGAs (Field Programmable Gate Arrays) to offload difficult calculation from processors. By leveraging custom digital logic with its parallel potential processes, which are normally run solely on a processor, can be sped up and power consumption decreased. At first sight, combining software with digital logic seems like a daunting task. Besides software design and digital logic design an interface has to be created between the two. For these reasons it is often avoided unless absolutely necessary. Fortunately there exist tools to simplify this design process, especially the interface between the application software and digital logic. To illustrate this, this paper provides a solution to interface an application written on R and running on a Linux host with digital logic on an FPGA. With this interface hardware acceleration for intensive calculations can be implemented on the FPGA while the ease of use and native support for statistical computing of R is retained. II. TOOLS AND SOFTWARE A zedboard was used as development board. It is a board with T. Nulens is a student at Hasselt University, Faculty of Engineering Technology, Diepenbeek, Belgium. E-mail: [email protected]. a Xilinx Zynq system-on-chip and various inputs and outputs like USB, VGA and much more. The Zynq system-on-chip consists of a 32bit ARM dual core processor and a large amount of programmable logic. Figure 1 Top and bottom view of the zedboard The application software runs on the processor and communicates with the programmable logic as required. A special distribution of Ubuntu, named Xillinux, is installed on the processor. Xillinux is a version of Ubuntu LTS 12.04 for ARM with Xillybus drivers preinstalled. The operating system runs from a SD card which acts as hard drive for the zedboard. Finally, R version 3.1.2 was installed. Since Xillybus is already supported on this device, it’s the obvious choice to use as interface between the processor and digital logic. Xillybus takes care of both the digital logic implementation and the software drivers for the interface. It also works with both AXI (Advanced eXtensible Interface) and PCIe (Peripheral Component Interconnect Express) which makes it possible to transfer the application on the Zynq system-on-chip to a full desktop without worrying about those interfaces. III. XILLYBUS Xillybus is a combination of an IP core for the FPGA as well as a driver for the operating system on the processor. Together it allows a simple interface between the digital logic and the application software. The IP core implements the digital logic required to send and receive data from the processor with First In First Out shift (FIFO) registers. It provides the signals to drive FIFO registers, signals like clock and write enable. These signals must then be used to drive a user-defined FIFO in the implementation. The Xillybus IP core then connects to a PCIe V. Claes is the owner of cteq.eu [email protected] https://www.linkedin.com/in/vincentclaes/ Implementing an interface in R to communicate with Programmable Fabric in a Xilinx ZYNQ FPGA Vincent Claes, Tom Nulens [Project realized in 2015] T
  • 2. [email protected] https://www.linkedin.com/in/vincentclaes/ 2 interface IP core or AXI (Advanced eXtensible Interface) IP core, depending on the platform. In the Zynq chip, AXI is used to connect the digital logic to the processor. The IP core is generated at the IP factory web interface on the website of Xillybus. Specifications such as bandwidth, data width and data direction are defined here. Afterwards the IP core is generated and available for download. The bandwidth on an AXI interface is limited to 200 Mbytes/s. Figure 2 FPGA block diagram with the Xillybus IP core and a PCIe interface On the processor side the Xillybus driver allows read and write operations through a standard input/output file-interface. A data connection is opened between the application software and digital logic by simply opening a file defined by the Xillybus driver and writing to or reading from that file. Figure 3 Processor host interface block diagram IV. INTERFACE BETWEEN R AND XILLYBUS A. Problems with interfacing R with Xillybus In the previous paragraph I noted that to write to or read from the FPGA a standard file IO system is everything that is required. Although R has this functionality, reading or writing in native R is not very efficient for real-time applications for two reasons: First, an R application is single threaded. This means that when transferring data back and forth between the processor and FPGA, no other calculation can be performed by the processor. With large datasets a significant amount of time would be lost due to this data transferring. By doing the reading and writing in background threads the host application can continue with different calculations regardless of what is happening in the digital logic. There are some solutions for parallelism in R, they are however aimed at dividing calculations over multiple cores instead of doing different tasks concurrently. Second, as a high level programming language, datatype manipulation is less transparent than it is in languages like C. Depending on the digital logic you have designed, the interface will expect anything ranging from 32bit doubles to 8bit unsigned integers. For this reason it is advantageous to use a language with explicit datatypes. B. Proposed solution By using the R library Rcpp, C++ functions and classes can be called from R. Rcpp provides a C++ header file with the definition for an R object. This object along with a short wrapper allows Rcpp to compile custom C++ classes and functions that can directly take R objects as argument and return them too. C++ can then be used to prepare data from R to write to the FPGA or to read data from the FPGA before returning it to R. By combining this with the C++ library thread.h read and write functionality can be given separate threads from the main R thread. The Xillybus programming guide proposes the following diagram for an implementation of hardware acceleration: Figure 4 Host-FPGA interface with Thread A as writer and Thread B as reader. Main thread not pictured In the main thread two threads are started, one to write data to the FPGA and one to read the calculated results. These two threads run continuously in the background while different calculations can still be performed in the main thread. A continues data flow is possible in this implementation provided enough data is fed into the write thread to make use of the full bandwidth. The write thread takes care of the translation of the R objects to the datatypes the digital logic expects while the read thread takes care of the reverse. C. Implementation First use the Xillybus IP factory to generate an IP core with separate downstream and upstream device files and implement this IP core in the FPGA design. Figure 5 Configuration of an upstream and downstream device file in the Xillybus IP factory Afterwards a regular C++ class can be written to open those two device files to read and write from separate threads. Make sure to use the R objects defined by the Rcpp header file as arguments and return values for the methods in this class. The R wrapper is defined separately from the class definition but it is placed in the same source file.
  • 3. [email protected] https://www.linkedin.com/in/vincentclaes/ 3 Figure 6 Example of the R wrapper for a C++ class called ‘Manager’ In the wrapper definition the chosen class is given along with the names for all the exposed methods as well as function pointers to the corresponding methods in their C++ class. This source file is then ready to be compiled through Rcpp with the command: sourceCpp(“/path/class.cpp”). At that point the class is ready to be used in R. The following R script illustrates the implementation of the interface. Figure 7 R script with FPGA interface. Green are comments, red are the outputs In the above script a loopback is implemented in the FPGA. The Class Manager was written in C++. The object u is an instance of Manager. V. CONCLUSION An interface between an R application and an FPGA has been made. The processor and FPGA reside on the same system-on- chip and are connected by AXI. By using Xillybus the complexity on the software side that comes from AXI is completely removed. The Xillybus driver also works regardless of whether the interface is AXI or PCIe which means that the whole application can be moved to a desktop computer with an FPGA board connected on a PCIe slot in case this becomes desirable. On the FPGA side the IP core governs the interface and requires only a read and write FIFO in the user logic. The complexity of AXI or PCIe on the FPGA is reduced to connecting the right signals from the Xillybus IP core to the fitting Xilinx or Altera IP core. This interface is therefore ideal for rapid prototyping. VI. ACKNOWLEDGEMENT This project was realized for cteq.eu [http://www.cteq.eu] with support from Hasselt University. I would like to thank V. Claes for technical support. VII. REFERENCES [1] "Xillybus Product Brief," Xillybus Ltd., 7 March 2014. [Online]. Available: http://xillybus.com/downloads/xillybus_product_brief.p df. [Accessed April 2015]. [2] "ZedBoard," Avnet, [Online]. Available: http://zedboard.org/product/zedboard. [Accessed April 2015]. [3] Radford M. Neal, University of Toronto, "Speeding up R with Multithreading,," 29 November 2013. [Online]. Available: http://www.cs.utoronto.ca/~radford/ftp/pqR- guelph.pdf. [Accessed April 2015]. [4] Xillybus Ltd, "Getting started with the FPGA demo bundle for Xilinx," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_getting_star ted_xilinx.pdf. [Accessed April 2015]. [5] Xillybus Ltd., "Getting started with Xillinux for Zynq- 7000 EPP," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_getting_star ted_zynq.pdf. [Accessed April 2015]. [6] Xillybus Ltd., "Getting started with Xillybus on a Linux host," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_getting_star ted_linux.pdf. [Accessed April 2015]. [7] Xillybus Ltd., "Xillybus FPGA designer’s guide," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_fpga_api.pd f. [Accessed April 2015]. [8] Xillybus Ltd., "The guide to defining a custom Xillybus IP core," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_custom_ip. pdf. [Accessed April 2015]. [9] Xillybus Ltd., "Xillybus host application programming guide for Linux," [Online]. Available: http://xillybus.com/downloads/doc/xillybus_host_progra mming_guide_linux.pdf. [Accessed April 2015]. [10] The R Core Team, "R: A Language and Environment for Statistical Computing - Reference Index," 9 March 2015. [Online]. Available: http://cran.r- project.org/manuals.html. [Accessed April 2015]. [11] R Core Team, "Writing R Extensions," 9 March 2015. [Online]. Available: http://cran.r- project.org/doc/manuals/r-release/R-exts.html. [Accessed April 2015]. [12] Dirk Eddelbuettel and Romain François, "Exposing C++ functions and classes with Rcpp modules," 4 March 2015. [Online]. Available: http://cran.r- project.org/web/packages/Rcpp/vignettes/Rcpp- modules.pdf. [Accessed April 2015].