<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Providing of FPGA Resources as a Service: Technologies, Deployment and Case-Study</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Inna Kolesnyk</string-name>
          <email>i.kolesnyk@csn.khai.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Artem Perepelitsyn</string-name>
          <email>a.perepelitsyn@csn.khai.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vitaliy Kulanov</string-name>
          <email>v.kulanov@csn.khai.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Key Terms: Computation</institution>
          ,
          <addr-line>ConcurrentComputation, ServiceComposition, Data, HighPerformanceComputing</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Aerospace University “KhAI”</institution>
          ,
          <addr-line>Chkalov str. 17, 61070 Kharkov</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>63</fpage>
      <lpage>68</lpage>
      <abstract>
        <p>In this study we analyzed some aspects of applying the Field Programmable Gate Array (FPGA) technology based on Peripheral Component Interconnect Express (PCIe) bus to create a cloud service. Task classification for a FPGA as a Service (FaaS) was proposed. We considered various approaches to FaaS deploying and feasible ways of communication between the cloud infrastructure and the FPGA platform. We elaborated and approved cost-effective FaaS architecture, which is based on a set of FPGA boards. The input-oriented task based on brute force search of polynomials for nonlinear feedback shift registers of the second degree was implemented. The approach of creating multiparametrized tasks for a wide range of FPGA resources was proved to be effective.</p>
      </abstract>
      <kwd-group>
        <kwd>Cloud Service</kwd>
        <kwd>FPGA</kwd>
        <kwd>FPGA as a Service</kwd>
        <kwd>FaaS Platform</kwd>
        <kwd>FaaS Tasks</kwd>
        <kwd>FaaS Deployment</kwd>
        <kwd>Brute Force Search</kwd>
        <kwd>NLFSR</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The growing demand for the services provided by cloud technologies is due to
their advantages over traditional computing. Accessibility anywhere, relatively low
requirements for computing power of the client machine, and as a result, lower power
consumption for end user, saved hardware and time resources - all greatly accelerate
this trend.</p>
      <p>Applying the FPGA technology in a cloud computing is of great interest nowadays
[1-3]. It can significantly speed up many performance-intensive tasks (or services):
from digital signal processing (digital video processing, audio signal processing,
spectral estimation, speech recognition, imaging processing, biomedicine, radar, sonar,
etc.) to specific mathematical calculations for science. It also allows to propose more
energy-efficient solutions for data centers [4, 5], especially in cases where some part
of a cloud infrastructure can be deployed on FPGA platform.</p>
      <p>In an article on FPGA application analysis [6] it is shown that FPGA can interact
with a cloud infrastructure on three different levels. They are the following:
1. FPGA as a Service (FaaS) - providing end users with "raw" FPGA resources and
giving them ability to define their own projects.
2. FPGA for a Service (FfaS) - providing end users with already defined services (e.g.
audio/video processing, specific DSP algorithms etc.). In this case customer may
not even know about the hardware configuration/characteristics.
3. FPGA for Cloud Infrastructure - the case when FPGA is used to support cloud
infrastructure itself (networking, virtualization platform etc.).</p>
      <p>Among the variety of existing levels, FaaS still requires more attention and
research as there are many methods, tools and techniques that can be applied. The scope
of this paper is to analyze existing FaaS solutions, propose FaaS deployment
techniques and carry out a research work in the deployed computational cluster.
2</p>
    </sec>
    <sec id="sec-2">
      <title>FPGA as a Service: PCIe-based Approach</title>
      <p>For high-performance computing there must be a highly effective interaction
between the CPU (physical hardware) and the accelerators on the FPGA. Among the
various methods of connecting, the PCIe bus is suitable for loosely coupled
accelerators because of its high capacity. A high-performance library used for communication
of the PCIe FPGA with the rest of the system is the key to the enhanced use of
FPGAaccelerators. However, due to the fact that such a universal library does not exist,
FPGA developers have to write a significant amount of code on the side of FPGA for
FPGA. They must also develop a custom code (e.g. drivers, APIs) to use the FPGA
accelerators. All of this only complicates the developers’ work. Today it is a major
problem for the mass usage of FPGA based PCIe accelerators.</p>
      <p>We analyzed the existing solutions targeted at incresing the efficiency and
flexibility of using FPGAs with integrated PCIe.</p>
      <p>PCIe is a multi-layered protocol that includes a physical layer, a data link layer and
a transaction layer. Data is formed into packets and transmitted on the transaction
level. In order to interact with the FPGA through the PCIe, developers can use only a
limited set of common functions reserved for the data transmission. Those who are
interested in working with the low-level functions can use IP-cores for the PCIe,
provided directly by the vendors. However, it is often necessary to use third-party
solutions, which simplify the communication process with the FPGA via the PCIe and
accelerate the development. Existing solutions consist of hardware (IP-core) and
software (drivers, GUI) parts and a set of libraries/APIs.</p>
      <p>On the hardware side, developers gain access to the PCIe interface via IP-core. It
does not require knowledge of addresses, buffer sizes or PCIe packet format. The data
is received and sent by invoking special functions, which act in FIFO-like manner.</p>
      <p>The software includes drivers and the utilities for configuring. The driver can
support simultaneous work of the multiple FPGAs. The software can include a set of
libraries in such languages as C/C++, Python, Java and others to write third-party
programs.</p>
      <p>Some features of existing PCIe-based FPGA projects are shown in table 1. A large
number of projects have open source code and support different operating systems.</p>
      <p>One of the main advantages of the FPGA technology application is the ability to
implement non-standard hardware based solutions, especially when microprocessors
show low efficiency/resource capability, and production of ASIC is still unreasonable
due to the price per product unit. Also, there are special types of computational tasks,
which show better performance and energy-efficiency for FPGA compared with
CPU-based solutions and the increase is immense for GPU-based solutions [13].</p>
      <p>Exactly for such type of tasks FPGA resources may be provided as a service.
Typically that is data processing for science, imaging, cryptography, medicine and
industry. The data flow of such tasks is shown in Fig. 1.</p>
      <sec id="sec-2-1">
        <title>Control</title>
      </sec>
      <sec id="sec-2-2">
        <title>Status</title>
      </sec>
      <sec id="sec-2-3">
        <title>Input Data</title>
      </sec>
      <sec id="sec-2-4">
        <title>Computations</title>
      </sec>
      <sec id="sec-2-5">
        <title>Output Data</title>
        <p>Symmetrical or output oriented throughput tasks require a communication channel
with a high bandwidth. In this case, the PCI Express or Gigabit Ethernet interfaces are
strongly recommended. A large amount of tasks with non-intensive data-exchange
operations may be implemented in FPGA even without fast communication channels,
simply via USB, UART and other widely used interfaces.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>FaaS Deployment Approach</title>
      <p>In spite of all the advantages of the FPGA PCIe-based platforms, they are still too
expensive, and when dealing with input-oriented tasks more cost-effective solutions
can be applied.</p>
      <p>The proposed coarse-grained FaaS infrastructure consists of several components
(see Fig. 2):
 FPGA Development Kit Boards, connected to a server via the USB interface;
 A server machine with running JTAG Server, FaaS Tasks WEB Server and
Serverside application for distributing and collecting data;
 User PC with CAD Tool and a WEB browser.</p>
      <sec id="sec-3-1">
        <title>User PC</title>
        <p>User’s WEB</p>
        <sec id="sec-3-1-1">
          <title>Browser</title>
          <p>s
JTAG rrveeS iltrdee
a
n
c
User’s CAD</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Tool Instance</title>
          <p>Authorization
information and
Binary/HEX Data</p>
          <p>Files
Task Status/
Results Data</p>
          <p>SRAM
Object Files
(SOF)</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Network</title>
      </sec>
      <sec id="sec-3-3">
        <title>Layer</title>
        <sec id="sec-3-3-1">
          <title>FaaS Tasks</title>
        </sec>
        <sec id="sec-3-3-2">
          <title>WEB Server</title>
        </sec>
        <sec id="sec-3-3-3">
          <title>JTAG Server</title>
          <p>SOFs
Binary/HEX
Data Files
Task Status/
Results Data</p>
        </sec>
      </sec>
      <sec id="sec-3-4">
        <title>Server-side</title>
        <sec id="sec-3-4-1">
          <title>Data</title>
        </sec>
        <sec id="sec-3-4-2">
          <title>Distributor</title>
          <p>and Collector
sandm ttsaeaS
oCm dnaD
P
rod tS
tcedauD tsuadna
a</p>
        </sec>
        <sec id="sec-3-4-3">
          <title>FPGA Board</title>
          <p>The efficiency of task implementation in FaaS depends on its parallelization
feature. If the data dependency can be reduced and the algorithm allows the
parallelization, it’s possible to organize the scaling of the FPGA system in a wide range of
available resources. The implementation of tasks using multiparametrization allows
creating a universal project, which can be used in a wide range of FPGA chips
without redesigning.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Case-Study: Brute Force Search</title>
      <p>To verify the proposed approach, FaaS was deployed. A set of Altera DE2 boards
was connected to the host computer (server) via USB interface. In order to give the
remote access and ability to program FPGA boards, the JTAG server was configured.</p>
      <p>The described service was used for solving a scientific problem dealing with the
brute force search of polynomials for nonlinear feedback shift registers [14]. This task
is input-oriented, which means that it has the dominance of pre-generated on the user
side input data. The data set consists of millions of coefficients for non-linear
polynomials. The coefficients of each polynomial can be processed separately. Therefore,
this task is completely suitable for parallelization by means of multiparametrization.
Only a small part of these coefficients can generate maximum length sequence.</p>
      <p>To achieve the best performance, the implementation of search block was
separated from the other parts of the project using dual port RAMs. The dataflow in one
channel (FPGA) is shown in Fig. 3.</p>
      <p>On-chip Data
Distributor</p>
      <p>Full amount of input data was divided between four FPGA boards programmed
with the same project (the same SOF). The distribution and collection of data was
carried by a custom communication software.</p>
      <p>This example of FaaS shows that such type of tasks can be parallelized not only
inside of an integrated circuit (chip) but also between independent boards. If
multiparametrization was used during development of task implementation, the
project may be ported to another chip family without redesigning. FaaS in this case can
include various types of boards.
6</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>Over the past years the FPGA technology has taken a big leap towards conquesting
the cloud service market. The common trend is that the growth in this area is still in
progress due to the advantages that programmable logic can offer.</p>
      <p>In this article FPGA as a Service was considered. The analysis of existing
techniques showed that one should take into account a great variety of different
approaches of deploying FaaS. In most cases the choice depends on many factors, from the
Input Buffer
Input Buffer
Input Buffer</p>
      <p>Output Buffer
Output Buffer
Output Buffer</p>
      <p>On-chip Data</p>
      <p>Collector
Search
Module
(NLFSR)
Search
Module
(NLFSR)
Search
Module
(NLFSR)
final cost of FaaS infrastructure to type of task that is going to be executed. It is also
showed that according to the symmetry of data path throughputs the FaaS tasks can be
classified to symmetric, input-oriented, and output-oriented tasks.</p>
      <p>A cost-effective solution for FPGA as a Service was proposed. This architecture
can be recommended for so called input-oriented tasks, where the requirements for
the input and output dataflow are not so strict. To verify the proposed approach, a
high performance computational task was carried out, used for solving scientific
problem based on brute force search of polynomials for nonlinear feedback shift registers
of second degree. It allowed saving the time and resources to get final results.
11.
12.
13.
14.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shan</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Enabling FPGAs in the Cloud</article-title>
          .
          <source>In: Proceedings of the 11th ACM Conference on Computing Frontiers Article No. 3</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          . Cagliari,
          <string-name>
            <surname>Italy</surname>
          </string-name>
          (
          <year>2014</year>
          ). doi:
          <volume>10</volume>
          .1145/2597917.2597929 Gupta,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Xeon+FPGA platform for the data center</article-title>
          , https://www.ece.cmu.edu/ Fahmy,
          <string-name>
            <given-names>S. A.</given-names>
            ,
            <surname>Vipin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Shreejith</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Virtualized FPGA accelerators for efficient cloud computing</article-title>
          .
          <source>In: IEEE International Conference on Cloud Computing Technology and Science</source>
          , pp.
          <fpage>430</fpage>
          -
          <lpage>435</lpage>
          . Vancouver, Canada (
          <year>2015</year>
          ). doi:
          <volume>10</volume>
          .1109/CloudCom.
          <year>2015</year>
          .60 Yanovskaya,
          <string-name>
            <given-names>O.</given-names>
            ,
            <surname>Yanovsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Kharchenko</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          :
          <article-title>The concept of green Cloud infrastructure based on distributed computing and hardware accelerator within FPGA as a Service</article-title>
          .
          <source>In: Proceedings of the IEEE East-West Design &amp; Test Symposium (EWDTS)</source>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>48</lpage>
          . Kiev, Ukraine (
          <year>2014</year>
          ). doi:
          <volume>10</volume>
          .1109/EWDTS.
          <year>2014</year>
          .7027089 Neshatpour,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Malik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Ghodrat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            ,
            <surname>Sasan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Homayoun</surname>
          </string-name>
          , H.:
          <article-title>Energy-efficient acceleration of Big Data analytics applications using FPGAs</article-title>
          .
          <source>In: BIG DATA '15 Proceedings of the 2015 IEEE International Conference on Big Data (Big Data)</source>
          , pp.
          <fpage>115</fpage>
          -
          <lpage>123</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Washington</surname>
          </string-name>
          , DC, USA (
          <year>2015</year>
          ). doi:
          <volume>10</volume>
          .1109/BigData.
          <year>2015</year>
          .7363748 Kolesnyk,
          <string-name>
            <given-names>I. N.</given-names>
            ,
            <surname>Kulanov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. O.</given-names>
            ,
            <surname>Perepelitsyn</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. E.</surname>
          </string-name>
          :
          <article-title>Analysis of FPGA Technologies Application as a Part of Cloud Infrastructure</article-title>
          .
          <source>In: Radioelectronic and computer systems</source>
          ,
          <volume>6</volume>
          (
          <issue>80</issue>
          ), pp.
          <fpage>130</fpage>
          -
          <lpage>135</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <given-names>A Reusable</given-names>
            <surname>Integration Framework For FPGA Accelerators</surname>
          </string-name>
          , http://riffa.ucsd.edu Marcus,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            ,
            <surname>Kugel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Manner</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          :
          <article-title>The MPRACE framework: An open source stack for communication with custom FPGA-based accelerators</article-title>
          .
          <source>In: Programmable Logic</source>
          , VII Southern Conference, Cordoba, Argentina (
          <year>2011</year>
          ). doi:
          <volume>10</volume>
          .1109/SPL.
          <year>2011</year>
          .
          <article-title>5782641 Bus Master Performance Demonstration Reference Design for the Xilinx Endpoint PCI Express Solutions</article-title>
          , https://www.xilinx.com Lund,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Naylor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Trynosky</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Virtex-5 FPGA Integrated Endpoint Block for PCI Express Designs</article-title>
          , https://www.xilinx.
          <article-title>com EZDMA2 IP for Altera Devices</article-title>
          , http://www.plda.
          <article-title>com XpressRICH3-AXI for ASIC</article-title>
          , https://www.plda.com/ Fowers, J.,
          <string-name>
            <surname>Brown</surname>
          </string-name>
          , G.,
          <string-name>
            <surname>Cooke</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stitt</surname>
            ,
            <given-names>G.:</given-names>
          </string-name>
          <article-title>A performance and energy comparison of FPGAs, GPUs, and multicores for sliding-window applications</article-title>
          .
          <source>In: FPGA '12 Proceedings of the ACM/SIGDA international symposium on Field Programmable Gate Arrays</source>
          , pp.
          <fpage>47</fpage>
          -
          <lpage>56</lpage>
          . Monterey, California, USA (
          <year>2012</year>
          ). doi:
          <volume>10</volume>
          .1145/2145694.2145704 Poluyanenko, N.:
          <article-title>Development of the search method for non-linear shift registers using hardware, implemented on field programmable gate arrays</article-title>
          .
          <source>In: EUREKA: Physics and Engineering</source>
          , pp.
          <fpage>53</fpage>
          -
          <lpage>60</lpage>
          (
          <year>2017</year>
          ). doi:
          <volume>10</volume>
          .21303/
          <fpage>2461</fpage>
          -
          <lpage>4262</lpage>
          .
          <year>2017</year>
          .00271
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>