SlideShare a Scribd company logo
1 of 51
Download to read offline
2013/01/17 リコンフィギャラブルシステム研究会
FPGA計算応用 (15:15-15:40) 発表20分 + 質疑応答5分




       メッシュ接続FPGAアレーを用いた
      高性能ステンシル計算機の設計と実装



             ☆小林 諒平†1 高前田(山崎) 伸也†1 †2 吉瀬 謙二†1

                  †1 東京工業大学 大学院情報理工学研究科
                     †2 日本学術振興会 特別研究員(DC1)
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       1
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       2
2D Stencil Computation
 固定パターンによってデータセットの更新を行う反復計算
 偏微分方程式の近似解を求める手法の1つ
 ► (e.g. 熱力学,流体力学,電磁気学など)

                       v1[i][j] =
                       (C0 * v0[i-1][j]) + (C1 * v0[i][j+1]) +
                       (C2 * v0[i][j-1]) + (C3 * v0[i+1][j]);


                  v1[i][j]は4近傍の値を足し合わせることによって計算される
                  C0, C1, C2, C3: 重み定数

                  Time-step k




                          Update data set
                                                                 3
FPGAアレーにおけるステンシル計算
   :格子点
                   FPGA        FPGA        FPGA        FPGA

                PROM   SRAM PROM   SRAM PROM   SRAM PROM   SRAM




                   FPGA        FPGA        FPGA        FPGA

                PROM   SRAM PROM   SRAM PROM   SRAM PROM   SRAM




                   FPGA        FPGA        FPGA        FPGA

                PROM   SRAM PROM   SRAM PROM   SRAM PROM   SRAM




                   FPGA        FPGA        FPGA        FPGA

                PROM   SRAM PROM   SRAM PROM   SRAM PROM   SRAM




  ・データセットはFPGAの数に応じて分割され,格納される
  ・各FPGAは並列にステンシル計算を実行する
                                                                  4
ScalableCore System   *Takamaeda-Yamazaki,   S., (ARC 2012) (2012).



 小容量FPGAを複数用いたタイル型アーキテクチャシミュレータ
 ► メニーコアプロセッサの高速シミュレータ
 ► このシステムのハードウェアをHPCハードウェアアクセラレータの基
   礎として使用


                                                       One FPGA node



                                                                  FPGA


                                                           PROM          SRAM




                                                                                5
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       6
各FPGAにおける格子点の計算順序




                 提案手法


・FPGAが上下に接続したときの計算順序を比較する
・我々の提案手法は許容できる通信レイテンシを増加させる   7
Comparison between (a) and (b) (1/2)

・イテレーション : 全ての格子点を1度計算するための処理
・簡単のため,値の更新はかかるサイクル数は1とする
・各FPGA は割り当てられた格子点16 個の値を各イテレーションごと更新する
(格子点0から15への順番で更新する)


              A0    A1    A2    A3                   C12   C13   C14   C15
    FPGA(A)




                                           FPGA(C)
              A4    A5    A6    A7                   C8    C9    C10   C11

              A8    A9    A10   A11                  C4    C5    C6    C7

              A12

              B0
                    A13

                    B1
                          A14

                          B2
                                A15

                                B3
                                      vs             C0

                                                     D0
                                                           C1

                                                           D1
                                                                 C2

                                                                 D2
                                                                       C3

                                                                       D3
    FPGA(B)




                                           FPGA(D)

              B4    B5    B6    B7                   D4    D5    D6    D7

              B8    B9    B10   B11                  D8    D9    D10   D11

              B12   B13   B14   B15                  D12   D13   D14   D15
     (a)                                    (b) Proposed method              8
Comparison between (a) and (b) (2/2)
                       A0    A1    A2     A3
                                                                               First Iteration end
                                               0                                                       16
            FPGA(A)

                       A4    A5    A6     A7

                       A8    A9    A10   A11       A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1

                       A12   A13   A14   A15                                                                     …
                                                   B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1
                       B0    B1    B2     B3
           FPGA(B)




                       B4    B5    B6     B7

                       B8    B9    B10   B11


      (a)              B12   B13   B14   B15



Proposed               C12   C13   C14   C15   0                              First Iteration end      16
 method
             FPGA(C)




                       C8    C9    C10   C11       C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1

                       C4    C5    C6    C7                                                                      …
                                                   D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1
                       C0    C1    C2    C3

                       D0    D1    D2    D3
           FPGA(D)




                       D4    D5    D6    D7

                       D8    D9    D10   D11


       (b)             D12   D13   D14   D15                                                                     9
Comparison between (a) and (b) (2/2)
                       A0    A1    A2     A3
                                                                                First Iteration end
                                               0                                                       16
            FPGA(A)

                       A4    A5    A6     A7

                       A8    A9    A10   A11       A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1

                       A12   A13   A14   A15                                                                     …
                                                   B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1
                       B0    B1    B2     B3

                                                       In order not to stall the computation
           FPGA(B)




                       B4    B5    B6     B7
                                                       of B1, the value of A13 must be
                       B8    B9    B10   B11
                                                       communicated within three cycles
      (a)              B12   B13   B14   B15           (14, 15, 16) after the computation…

Proposed               C12   C13   C14   C15   0                               First Iteration end     16
 method
             FPGA(C)




                       C8    C9    C10   C11       C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1

                       C4    C5    C6    C7                                                                      …
                                                   D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1
                       C0    C1    C2    C3

                       D0    D1    D2    D3
           FPGA(D)




                       D4    D5    D6    D7

                       D8    D9    D10   D11


       (b)             D12   D13   D14   D15                                                                10
Comparison between (a) and (b) (2/2)
                       A0    A1    A2     A3
                                                                                First Iteration end
                                               0                                                       16
            FPGA(A)

                       A4    A5    A6     A7

                       A8    A9    A10   A11       A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1

                       A12   A13   A14   A15                                                                     …
                                                   B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1
                       B0    B1    B2     B3

                                                       In order not to stall the computation
           FPGA(B)




                       B4    B5    B6     B7
                                                       of B1, the value of A13 must be
                       B8    B9    B10   B11
                                                       communicated within three cycles
      (a)              B12   B13   B14   B15           (14, 15, 16) after the computation…

Proposed               C12   C13   C14   C15   0                               First Iteration end     16
 method
             FPGA(C)




                       C8    C9    C10   C11       C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1

                       C4    C5    C6    C7                                                                      …
                                                   D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1
                       C0    C1    C2    C3

                       D0    D1    D2    D3
           FPGA(D)




                       D4    D5    D6    D7
                                                            In order not to stall the
                       D8    D9    D10   D11               computation of D1 of Iteration 2
                                                           (17th cycle), the margin to send
       (b)             D12   D13   D14   D15                                                                11
                                                           value of C1 (1st cycle) is 15 cycles
Comparison between (a) and (b) (N×M grid-points)
                    N            If the N×M grid-points are assigned to a
                                 single FPGA, every shared value must be
                                 communicated within N–1cycles
             FPGA




                        M                                    Iteration end


                            …                                                          …
            FPGA




           (a)                                                            N-1 cycles

                                If the N×M grid-points are assigned to a
Proposed            N
                                single FPGA, every shared value must be
 method
                                communicated within N×M–1cycles
            FPGA




                        M                                     Iteration end

                            …                                                          …
           FPGA




                                                    N×M-1 cycles                       12
           (b)
Computing Order Applied Proposed Method




                                     :computation order




 この提案手法により約1イテレーションの許容できる通信レイテンシを確保
 格子点の数が増加するほど,許容できる通信レイテンシはスケールする
                                                    13
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       14
System Architecture
                                                                                                                                Configura on ROM
                                                                                                                                      XCF04S




                                                                              Ser/Des

                                                                                        North
            Clock                                                                                                           FPGA
                                                                                                                          Spartan-6
            Reset

            Sync
                                                                 mux2
                                                                                                                                    Memory unit (BlockRAMs)


                    W 0         1         2               3              4               5           6        7       E             Computation unit
                           0         1         2                 3            4                 5         6       7
                           0         1         2                 3            4                 5         6       7                 (Multiply and Adder)
                     mux       mux       mux           mux              mux             mux         mux       mux

                     MADD      MADD      MADD          MADD          MADD               MADD        MADD      MADD

  Ser/Des
                                                                                                                             Ser/Des
  West                                                                                                                       East


                                                             mux8
                                               South
                                                       Ser/Des




                                                                                                                                                           15
Relationship between The Data Subset and
  BlockRAM(Memory unit)
                     BlockRAM: low-latency SRAM which each FPGA has.




FPGA array 4×4                                     BlockRAMs
(Data is assigned)
         The data set which assigned to each FPGA is split in the
         vertical direction, and is stored in each BlockRAM (0~7)

                If the data set of 64×128 is assigned to one FPGA, the split data set
                (8×128) is stored in each BlockRAM (0~7).


                                                                                        16
Relationship between MADD and
BlockRAM(Memory unit)
                       ・The data set stored in each
                       BlockRAM is computed by each MADD.
                       ・Each MADD performs the
                       computation in parallel.
                       ・The computed data is stored in
                       BlockRAM.




                                                       17
MADD Architecture(Computation unit)
 MADD
  ► Multiply: seven pipeline stages
  ► Adder: seven pipeline stages
  ► Both multiply and adder are single precision floating-point unit which
    conforms to IEEE 754.




                                                                             18
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                              8-stages




                                              8-stages




                                                             19
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C0
                                              8-stages




                                              8-stages




                                                             20
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C1
                                                 8-stages


                                 Take 8 cycles

                                                 8-stages




                                                             21
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C1
                                              8-stages




                                              8-stages




                                                             22
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C2
                                                 8-stages


                                 Take 8 cycles

                                                 8-stages

                            Take 8 cycles


                                                             23
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C2
                                              8-stages




                                              8-stages




                                                             24
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                  C3
                                              8-stages




                                              8-stages




                                                             25
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                              8-stages




                                              8-stages




                                                             26
Stencil Computation at MADD
 v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 *
  v0[i][j+1]) + (C3 * v0[i+1][j]);




                                              8-stages




                                              8-stages




                               V1[i][j]                      27
MADD Pipeline Operation(Computation unit)
 The computation of grid-points 11~18


                                                         8-stages
                        Input2(adder)

                                                         8-stages


                                         Input1(adder)




                                                                28
MADD Pipeline Operation (in cycles 0〜7)
   The computation of grid-points 11~18              8
                                                      7
                                                      6
                                                      5
The grid-points 1~8 are loaded from                   4
                                                      3
BlockRAM and they are input to the                    2
                                                      1
multiplier in cycles 0~7.                                                 8-stages
                                      Input2(adder)

                                                                          8-stages


                                                          Input1(adder)




                                                                                 29
MADD Pipeline Operation (in cycles 8〜15)
 The computation of grid-points 11~18                17
                                                      16
                                                      15
                                                      14
                                                      13
 The computation result is output from                12
                                                      11
 multiplier, at the same times, grid-points           10
 10~17 are input to the multiplier in                       8              8-stages
                                                            7
 cycles 8~15.                                               6
                                                            5
                                                            4
                                                            3
                                      Input2(adder)         2              8-stages
                                                            1



                                                           Input1(adder)




                                                                                  30
MADD Pipeline Operation (in cycles 16〜23)
 The computation of grid-points 11~18                    19
                                                          18
                                                          17
                                                          16
The grid-points 12~19 are input to the                    15
                                                          14
multiplier, at the same time, value of grid-              13
                                                          12
points 1〜8 and 10~17 multiplied by a                  8         17
                                                      7         16             8-stages
weighting factor are summed in cycles 16~             6         15
                                                      5         14
23.                                                   4         13
                                                      3         12
                                                      2         11             8-stages
                                      Input2(adder)   1         10



                                                               Input1(adder)




                                                                                      31
MADD Pipeline Operation (in cycles 24〜31)
  The computation of grid-points 11~18                    28
                                                           27
                                                           26
                                                           25
Input2(adder): 1~8 and 10~17 grid-points          8   17   24
                                                           23
Input1(adder): 12~19 grid-points                  7   16   22
                                                           21
                                                  6   15
Input(multiplier): 21~28 grid-points                            19
                                                                                8-stages
                                                  5   14        18
                                                      13        17
                                                  4
                                  Input2(adder)   3
                                                                16
                                                      12        15
                                                  2   11        14
                                                  1   10
                                                                13              8-stages
                                                                12



                                                                Input1(adder)




                                                                                       32
MADD Pipeline Operation (in cycles 32〜39)
    The computation of grid-points 11~18                         18
                                                                  17
                                                                  16
                                                                  15
Input2(adder): 1~8, 10~17 and 12~19 grid-points         8   17 19 14
                                                                  13
Input1(adder): 21~28 grid-points                        7   16 18 12
                                                                  11
Input(multiplier): 11~18 grid-points                    6   15 17       28
                                                        5   14 16       27             8-stages
                                                        4   13 15       26
                                        Input2(adder)                   25
                                                        3   12 14       24
                                                        2   11 13       23
                                                        1   10 12
                                                                        22
                                                                        21
                                                                                       8-stages


                                                                       Input1(adder)




                                                                                              33
MADD Pipeline Operation (in cycles 40〜48)
    The computation of grid-points 11~18                        27
                                                                 26
                                                                 25
                                                                 24
The computation results that data of up, down,                   23
                                                                 22
left and right gird-points are multiplied by a                   21     18
                                                                 20     17
weighting factor and summed are output in                               16
cycles 40~48.                                                           15             8-stages
                                                                        14
                                                                        13
                                          Input2(adder)                 12
                                                                        11
                                                          8    17 19   28              8-stages
                                                          7    16 18   27
                                                          6   15 17    26
                                                          5   14 16    25
                                                          4   13 15    Input1(adder)
                                                                       24
                                                          3   12 14    23
                                                          2   11 13    22
                                                          1   10 12    21




                                                                                              34
MADD Pipeline Operation(Computation unit)
The filing rate of the pipeline: (N-8/N)×100%                          (N is
  cycles which taken this computation.)
   ► Achievement of high computation performance and the small circuit area
   ► This scheduling is valid only when width of computed grid is equal to the
     pipeline stages of multiplier and adder.




                                                                                 35
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       36
FPGAアレーシステムの問題点
 このFPGAアレーシステムはグローバルクロックを有していない!
 ► 各ノードは固有のクロックドメインを持っている




  ノード数を増加させた時に,計算機の不具合を発見!
    各FPGAノードのクロック周期のばらつきが原因??




 クロック周期のずれを定量的に評価
 計算機が長時間,安定して動作するための機構を設計・実装


                                    37
クロックオシレータ (CSX-750PB(B))
 各FPGAノードに搭載 (40MHz)

 周波数安定度:±50ppm以内を保証
  ► 1,000,000サイクルでずれるサイクルは±50サイクル以内


 各FPGAノードのクロックのずれは,周波数安定度の値によ
  って左右される




                            CSX-750PB(B)


                                           38
クロックのずれの評価(1/3)
 ScalableCoreシステムを利用 (8×8構成)
 計測時間を変化させてクロックのずれを測定
Display

            Power Supply      FPGA        FPGA        FPGA          FPGA        FPGA          FPGA

          USB
          Port             PROM   SRAM PROM   SRAM PROM   SRAM   PROM   SRAM PROM   SRAM   PROM   SRAM




                              FPGA        FPGA        FPGA          FPGA        FPGA          FPGA


                           PROM   SRAM PROM   SRAM PROM   SRAM PROM     SRAM PROM   SRAM   PROM   SRAM




                              FPGA        FPGA        FPGA         FPGA         FPGA          FPGA


                           PROM   SRAM PROM   SRAM PROM   SRAM PROM     SRAM PROM   SRAM   PROM   SRAM




                                                                                                         39
クロックのずれの評価(2/3)
                                        X軸,Y軸:各FPGAノードの座標
                                        Z軸1,000,000サイクルあたりのクロックのずれ(ppm)

                                                                                                                      x=1                                                                                                                         x=1                                                                                                                         x=1
                              25.00                                                                                                                       25.00                                                                                                                       25.00
                                                                                                                      x=2                                                                                                                         x=2                                                                                                                         x=2
 cycle variea on / M ccycle




                                                                                                                             cycle variea on / M ccycle




                                                                                                                                                                                                                                                         cycle variea on / M ccycle
                              20.00                                                                                   x=3                                 20.00                                                                                   x=3                                 20.00                                                                                   x=3

                              15.00                                                                                   x=4                                 15.00                                                                                   x=4                                 15.00                                                                                   x=4

                                                                                                                      x=5                                  10.00                                                                                  x=5                                  10.00                                                                                  x=5
                               10.00
                                                                                                                  x=8 x=6
                                                                                                            x=7
                                                                                                                                                            5.00                                                                              x=8 x=6                                   5.00                                                                              x=8 x=6
                                5.00
                                                                                                      x=6                                                                                                                               x=7                                                                                                                         x=7
                                                                                                                      x=7                                   0.00                                                                                  x=7                                   0.00                                                                                  x=7
                                                                                                x=5                                                                                                                               x=6                                                                                                                         x=6
                                 0.00                                                                                                                               1                                                                                                                           1
                                                                                          x=4                         x=8                                   -5.00                                                           x=5                   x=8                                   -5.00                                                           x=5                   x=8
                                                                                                                                                                        2                                                                                                                           2
                                        1                                                                                                                                   3                                         x=4                                                                               3                                         x=4
                                            2                                       x=3                                                                                         4                                                                                                                           4
                                                3                                                                                                                                   5                           x=3                                                                                             5                           x=3
                                                    4                         x=2                                                                                                       6                                                                                                                           6
                                                        5
                                                            6
                                                                7
                                                                        x=1                           20sec                                                                                 7
                                                                                                                                                                                                8
                                                                                                                                                                                                    x=1
                                                                                                                                                                                                          x=2
                                                                                                                                                                                                                              80sec                                                                                     7
                                                                                                                                                                                                                                                                                                                            8
                                                                                                                                                                                                                                                                                                                                x=1
                                                                                                                                                                                                                                                                                                                                      x=2
                                                                                                                                                                                                                                                                                                                                                        320sec
                                                                    8




測定時間:20sec                                                                                                                  測定時間:80sec                                                                                                                  測定時間:80sec
最悪のずれ:20.5ppm (x=3, y=5)                                                                                                    最悪のずれ:20.5ppm (x=3, y=5)                                                                                                    最悪のずれ:20.7ppm (x=3, y=5)
クロックのばらつきの標準偏差:4.73                                                                                                         クロックのばらつきの標準偏差:4.73                                                                                                         クロックのばらつきの標準偏差:4.79




                                                                        ・周波数安定度±50ppmが保証されていることを確認

                                                                                                                                                                                                                                                                                                                                                                                    40
クロックのずれの評価(3/3)
                                                                                                                            測定時間[sec]     最悪のずれ           ずれの標準偏差
                                                                                                                                           [ppm]

                                                                                                                               20       20.47(x=3, y=5)     4.73
                                                                                                                      x=1

                             1.50                                                                                     x=2
cycle variea on / M ccycle




                             1.00                                                                                     x=3
                             0.50                                                                                              40       20.47(x=3, y=5)     4.68
                              0.00                                                                                    x=4
                             -0.50    1                                                                               x=5
                             -1.00        2
                                              3
                                                  4                                                                   x=6
                              -1.50
                              -2.00
                                                      5
                                                          6
                                                                                                                               80       20.47(x=3, y=5)     4.73
                                                                                                                x=8   x=7
                               -2.50                          7
                                                                  8                                       x=7
                               -3.00                                                                                  x=8
                                                                                                    x=6
                                -3.50
                                                                                              x=5
                                -4.00
                                                                                        x=4
                                                                                                                               160      20.59(x=3, y=5)     4.77
                                                                                  x=3
                                                                            x=2
                                                                      x=1
                                                                                                                               320      20.66(x=3, y=5)     4.79
                                     320secのクロックのずれを20sec
                                     のクロックのずれで割ったグラフ
                                                                                                                            各測定時間における最悪のずれとずれの標準偏差


・クロックのずれは,時間には依存しないことを確認
→時間軸上ではほぼ変化しないクロックのずれを考慮したシステム設計が必要

                                                                                                                                                                   41
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       42
同期機構の設計
     FPGAノード(A)をMasterノードと定義
     各FPGAノードはMasterノードからα +β の周期で送信される信号に同期して計算
      を実行
     同期信号を受信するまで,Masterノード以外のノードは計算をストール
          synchronize   synchronize
      α     β       α    β      α     β       α :1 イテレーション間におけ
A                                             るステンシル計算に要するサ
                                              イクル
            stall       stall         stall
B                                             β :各FPGAノードのクロック
                                              のずれを吸収するマージン
C
D


                                                             43
同期機構の実装
 各FPGAノードはMasterノードからα +β の周期で送信される信号に同期して計算
  を実行
 同期信号を受信するまで,Masterノード以外のノードは計算をストール
 信号を受信したFPGAノードは数サイクル待ってから,左方向と下方向に同期信
  号を送信し,計算を再開

                              α      β
               A    α   β
  A
         B
master          B
                            for anti-chattering
                C
  C      D
                D
                              for anti-chattering
                                                    44
同期機構の動作検証(100ノード)




   Coming soon!!    45
発表の流れ
 FPGAアレーにおけるステンシル計算
 ► アレー間通信の最適化
 ► 演算ユニットのデータ処理
 FPGAアレーシステムの問題点
 ► クロックのばらつきの定量評価
 同期機構の設計・実装
 性能評価・結論




                       46
Environment (Performance of Single FPGA Node)
 FPGA:Xilinx Spartan-6 XC6SLX16
    ► BlockRAM: 64KB
 Design tool: Xilinx ISE webpack 13.3
 Hardware description language: Verilog HDL
 Implementation of MADD:IP core generated by Xilinx core-generator
    ► Implementing single MADD expends four pieces of 32 DSP-blocks which a Spartan-6
      FPGA has.
        ◇ Therefore, the number of MADD to be able to be implemented in single FPGA is
           eight




                                                                      SRAM is not used.
                                                   ScalableCore board
                                                                                         47
Performance of Single FPGA Node(1/2)
 Grid-size:64×128
 Iteration:500,000
 Performance and Power Consumption(160MHz)
    ► Performance:2.24GFlop/s
    ► Power Consumption:2.37W

                                            Peak performance[GFlop/s]

                               Peak = 2×F×NFPGA×NMADD×7/8
                                 Peak:Peak performance[GFlop/s]
                                     F:Operation frequency[GHz]
                                 NFPGA:the number of FPGA
                                 NMADD:the number of MADD
                                    7/8: Average utilization of MADD unit
                                 → The four multiplications and the three additions
                                      v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j+1]) +
                                                (C2 * v0[i][j-1]) + (C3 * v0[i+1][j]);

                                                                                           48
Performance of Single FPGA Node(2/2)
 演算性能 (160MHz)
  ► 2.24GFlop/s
      26% of Intel Core i7-2600 (single
        thread, 3.4GHz, -O3 option)
  ► 電力あたりの演算性能:0.95GFlop/sW


                          Performance/W value is about six-times
                          better than Nvidia GTX280 GPU card.

  Nvidia GTX 280 card

 ハードウェア資源使用率
  ► LUT: 50%
  ► Slice: 67%
  ► BlockRAM: 75%
  ► DSP48A1: 100%                                                  49
Conclusion
 クロックのずれを定量的に評価
  ► クロックのずれは動作時間に依存しない
 設計および実装
  ► 各FPGAノードの位置情報を取得する回路を実装
  ► 各FPGAが同期する機構を実装
  ► 100ノードでの動作を確認
 性能評価 (One-FPGA node)
  ► 動作周波数 160MHz (no communication)
  ► 実行性能 2.24GFlop/s. 消費電力 2.37W.
  ► ハードウェア資源使用率 : Slices 67%
 今後の課題
  ► FPGAアレーの性能評価
  ► 低電力に向けた実装

                                      50

More Related Content

Viewers also liked

私が上智に通って唯一誇れること
私が上智に通って唯一誇れること私が上智に通って唯一誇れること
私が上智に通って唯一誇れること
Ryohei Kobayashi
 

Viewers also liked (11)

3bOS: A flexible and lightweight embedded OS operated using only 3 buttons
3bOS: A flexible and lightweight embedded OS operated using only 3 buttons3bOS: A flexible and lightweight embedded OS operated using only 3 buttons
3bOS: A flexible and lightweight embedded OS operated using only 3 buttons
 
Fully-Functional FPGA Prototype with Fine-Grain Programmable Body Biasing (FP...
Fully-Functional FPGA Prototype with Fine-Grain Programmable Body Biasing (FP...Fully-Functional FPGA Prototype with Fine-Grain Programmable Body Biasing (FP...
Fully-Functional FPGA Prototype with Fine-Grain Programmable Body Biasing (FP...
 
CMPP 2012 held in conjunction with ICNC’12
CMPP 2012 held in conjunction with ICNC’12CMPP 2012 held in conjunction with ICNC’12
CMPP 2012 held in conjunction with ICNC’12
 
hpc2013_20131223
hpc2013_20131223hpc2013_20131223
hpc2013_20131223
 
A survey of how to efficiently implement application-specific hardware on an ...
A survey of how to efficiently implement application-specific hardware on an ...A survey of how to efficiently implement application-specific hardware on an ...
A survey of how to efficiently implement application-specific hardware on an ...
 
FACE: Fast and Customizable Sorting Accelerator for Heterogeneous Many-core S...
FACE: Fast and Customizable Sorting Accelerator for Heterogeneous Many-core S...FACE: Fast and Customizable Sorting Accelerator for Heterogeneous Many-core S...
FACE: Fast and Customizable Sorting Accelerator for Heterogeneous Many-core S...
 
FPGAを用いた世界最速のソーティングハードウェアの実現に向けた試み
FPGAを用いた世界最速のソーティングハードウェアの実現に向けた試みFPGAを用いた世界最速のソーティングハードウェアの実現に向けた試み
FPGAを用いた世界最速のソーティングハードウェアの実現に向けた試み
 
多数の小容量FPGAを用いた スケーラブルなステンシル計算機の開発
多数の小容量FPGAを用いた スケーラブルなステンシル計算機の開発多数の小容量FPGAを用いた スケーラブルなステンシル計算機の開発
多数の小容量FPGAを用いた スケーラブルなステンシル計算機の開発
 
FPGAベースのソーティングアクセラレータの設計と実装
FPGAベースのソーティングアクセラレータの設計と実装FPGAベースのソーティングアクセラレータの設計と実装
FPGAベースのソーティングアクセラレータの設計と実装
 
私が上智に通って唯一誇れること
私が上智に通って唯一誇れること私が上智に通って唯一誇れること
私が上智に通って唯一誇れること
 
A High-speed Verilog HDL Simulation Method using a Lightweight Translator
A High-speed Verilog HDL Simulation Method using a Lightweight TranslatorA High-speed Verilog HDL Simulation Method using a Lightweight Translator
A High-speed Verilog HDL Simulation Method using a Lightweight Translator
 

Similar to IEICE technical report (RECONF), January 2013. (6)

Myoshimi extreme
Myoshimi extremeMyoshimi extreme
Myoshimi extreme
 
Takep lpc1114-190614
Takep lpc1114-190614Takep lpc1114-190614
Takep lpc1114-190614
 
高位合成友の会@ドワンゴ,2015年12月8日
高位合成友の会@ドワンゴ,2015年12月8日高位合成友の会@ドワンゴ,2015年12月8日
高位合成友の会@ドワンゴ,2015年12月8日
 
[DL Hacks]FPGA入門
[DL Hacks]FPGA入門[DL Hacks]FPGA入門
[DL Hacks]FPGA入門
 
High speed-pc-router 201505
High speed-pc-router 201505High speed-pc-router 201505
High speed-pc-router 201505
 
FPGAスタートアップ資料
FPGAスタートアップ資料FPGAスタートアップ資料
FPGAスタートアップ資料
 

IEICE technical report (RECONF), January 2013.

  • 1. 2013/01/17 リコンフィギャラブルシステム研究会 FPGA計算応用 (15:15-15:40) 発表20分 + 質疑応答5分 メッシュ接続FPGAアレーを用いた 高性能ステンシル計算機の設計と実装 ☆小林 諒平†1 高前田(山崎) 伸也†1 †2 吉瀬 謙二†1 †1 東京工業大学 大学院情報理工学研究科 †2 日本学術振興会 特別研究員(DC1)
  • 2. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 1
  • 3. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 2
  • 4. 2D Stencil Computation  固定パターンによってデータセットの更新を行う反復計算  偏微分方程式の近似解を求める手法の1つ ► (e.g. 熱力学,流体力学,電磁気学など) v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j+1]) + (C2 * v0[i][j-1]) + (C3 * v0[i+1][j]); v1[i][j]は4近傍の値を足し合わせることによって計算される C0, C1, C2, C3: 重み定数 Time-step k Update data set 3
  • 5. FPGAアレーにおけるステンシル計算 :格子点 FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM ・データセットはFPGAの数に応じて分割され,格納される ・各FPGAは並列にステンシル計算を実行する 4
  • 6. ScalableCore System *Takamaeda-Yamazaki, S., (ARC 2012) (2012).  小容量FPGAを複数用いたタイル型アーキテクチャシミュレータ ► メニーコアプロセッサの高速シミュレータ ► このシステムのハードウェアをHPCハードウェアアクセラレータの基 礎として使用 One FPGA node FPGA PROM SRAM 5
  • 7. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 6
  • 8. 各FPGAにおける格子点の計算順序 提案手法 ・FPGAが上下に接続したときの計算順序を比較する ・我々の提案手法は許容できる通信レイテンシを増加させる 7
  • 9. Comparison between (a) and (b) (1/2) ・イテレーション : 全ての格子点を1度計算するための処理 ・簡単のため,値の更新はかかるサイクル数は1とする ・各FPGA は割り当てられた格子点16 個の値を各イテレーションごと更新する (格子点0から15への順番で更新する) A0 A1 A2 A3 C12 C13 C14 C15 FPGA(A) FPGA(C) A4 A5 A6 A7 C8 C9 C10 C11 A8 A9 A10 A11 C4 C5 C6 C7 A12 B0 A13 B1 A14 B2 A15 B3 vs C0 D0 C1 D1 C2 D2 C3 D3 FPGA(B) FPGA(D) B4 B5 B6 B7 D4 D5 D6 D7 B8 B9 B10 B11 D8 D9 D10 D11 B12 B13 B14 B15 D12 D13 D14 D15 (a) (b) Proposed method 8
  • 10. Comparison between (a) and (b) (2/2) A0 A1 A2 A3 First Iteration end 0 16 FPGA(A) A4 A5 A6 A7 A8 A9 A10 A11 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1 A12 A13 A14 A15 … B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1 B0 B1 B2 B3 FPGA(B) B4 B5 B6 B7 B8 B9 B10 B11 (a) B12 B13 B14 B15 Proposed C12 C13 C14 C15 0 First Iteration end 16 method FPGA(C) C8 C9 C10 C11 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1 C4 C5 C6 C7 … D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1 C0 C1 C2 C3 D0 D1 D2 D3 FPGA(D) D4 D5 D6 D7 D8 D9 D10 D11 (b) D12 D13 D14 D15 9
  • 11. Comparison between (a) and (b) (2/2) A0 A1 A2 A3 First Iteration end 0 16 FPGA(A) A4 A5 A6 A7 A8 A9 A10 A11 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1 A12 A13 A14 A15 … B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1 B0 B1 B2 B3 In order not to stall the computation FPGA(B) B4 B5 B6 B7 of B1, the value of A13 must be B8 B9 B10 B11 communicated within three cycles (a) B12 B13 B14 B15 (14, 15, 16) after the computation… Proposed C12 C13 C14 C15 0 First Iteration end 16 method FPGA(C) C8 C9 C10 C11 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1 C4 C5 C6 C7 … D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1 C0 C1 C2 C3 D0 D1 D2 D3 FPGA(D) D4 D5 D6 D7 D8 D9 D10 D11 (b) D12 D13 D14 D15 10
  • 12. Comparison between (a) and (b) (2/2) A0 A1 A2 A3 First Iteration end 0 16 FPGA(A) A4 A5 A6 A7 A8 A9 A10 A11 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A0 A1 A12 A13 A14 A15 … B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B13 B14 B15 B0 B1 B0 B1 B2 B3 In order not to stall the computation FPGA(B) B4 B5 B6 B7 of B1, the value of A13 must be B8 B9 B10 B11 communicated within three cycles (a) B12 B13 B14 B15 (14, 15, 16) after the computation… Proposed C12 C13 C14 C15 0 First Iteration end 16 method FPGA(C) C8 C9 C10 C11 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C0 C1 C4 C5 C6 C7 … D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D0 D1 C0 C1 C2 C3 D0 D1 D2 D3 FPGA(D) D4 D5 D6 D7 In order not to stall the D8 D9 D10 D11 computation of D1 of Iteration 2 (17th cycle), the margin to send (b) D12 D13 D14 D15 11 value of C1 (1st cycle) is 15 cycles
  • 13. Comparison between (a) and (b) (N×M grid-points) N If the N×M grid-points are assigned to a single FPGA, every shared value must be communicated within N–1cycles FPGA M Iteration end … … FPGA (a) N-1 cycles If the N×M grid-points are assigned to a Proposed N single FPGA, every shared value must be method communicated within N×M–1cycles FPGA M Iteration end … … FPGA N×M-1 cycles 12 (b)
  • 14. Computing Order Applied Proposed Method :computation order  この提案手法により約1イテレーションの許容できる通信レイテンシを確保  格子点の数が増加するほど,許容できる通信レイテンシはスケールする 13
  • 15. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 14
  • 16. System Architecture Configura on ROM XCF04S Ser/Des North Clock FPGA Spartan-6 Reset Sync mux2 Memory unit (BlockRAMs) W 0 1 2 3 4 5 6 7 E Computation unit 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 (Multiply and Adder) mux mux mux mux mux mux mux mux MADD MADD MADD MADD MADD MADD MADD MADD Ser/Des Ser/Des West East mux8 South Ser/Des 15
  • 17. Relationship between The Data Subset and BlockRAM(Memory unit) BlockRAM: low-latency SRAM which each FPGA has. FPGA array 4×4 BlockRAMs (Data is assigned) The data set which assigned to each FPGA is split in the vertical direction, and is stored in each BlockRAM (0~7) If the data set of 64×128 is assigned to one FPGA, the split data set (8×128) is stored in each BlockRAM (0~7). 16
  • 18. Relationship between MADD and BlockRAM(Memory unit) ・The data set stored in each BlockRAM is computed by each MADD. ・Each MADD performs the computation in parallel. ・The computed data is stored in BlockRAM. 17
  • 19. MADD Architecture(Computation unit)  MADD ► Multiply: seven pipeline stages ► Adder: seven pipeline stages ► Both multiply and adder are single precision floating-point unit which conforms to IEEE 754. 18
  • 20. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); 8-stages 8-stages 19
  • 21. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C0 8-stages 8-stages 20
  • 22. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C1 8-stages Take 8 cycles 8-stages 21
  • 23. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C1 8-stages 8-stages 22
  • 24. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C2 8-stages Take 8 cycles 8-stages Take 8 cycles 23
  • 25. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C2 8-stages 8-stages 24
  • 26. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); C3 8-stages 8-stages 25
  • 27. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); 8-stages 8-stages 26
  • 28. Stencil Computation at MADD  v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j-1]) + (C2 * v0[i][j+1]) + (C3 * v0[i+1][j]); 8-stages 8-stages V1[i][j] 27
  • 29. MADD Pipeline Operation(Computation unit)  The computation of grid-points 11~18 8-stages Input2(adder) 8-stages Input1(adder) 28
  • 30. MADD Pipeline Operation (in cycles 0〜7)  The computation of grid-points 11~18 8 7 6 5 The grid-points 1~8 are loaded from 4 3 BlockRAM and they are input to the 2 1 multiplier in cycles 0~7. 8-stages Input2(adder) 8-stages Input1(adder) 29
  • 31. MADD Pipeline Operation (in cycles 8〜15)  The computation of grid-points 11~18 17 16 15 14 13 The computation result is output from 12 11 multiplier, at the same times, grid-points 10 10~17 are input to the multiplier in 8 8-stages 7 cycles 8~15. 6 5 4 3 Input2(adder) 2 8-stages 1 Input1(adder) 30
  • 32. MADD Pipeline Operation (in cycles 16〜23)  The computation of grid-points 11~18 19 18 17 16 The grid-points 12~19 are input to the 15 14 multiplier, at the same time, value of grid- 13 12 points 1〜8 and 10~17 multiplied by a 8 17 7 16 8-stages weighting factor are summed in cycles 16~ 6 15 5 14 23. 4 13 3 12 2 11 8-stages Input2(adder) 1 10 Input1(adder) 31
  • 33. MADD Pipeline Operation (in cycles 24〜31)  The computation of grid-points 11~18 28 27 26 25 Input2(adder): 1~8 and 10~17 grid-points 8 17 24 23 Input1(adder): 12~19 grid-points 7 16 22 21 6 15 Input(multiplier): 21~28 grid-points 19 8-stages 5 14 18 13 17 4 Input2(adder) 3 16 12 15 2 11 14 1 10 13 8-stages 12 Input1(adder) 32
  • 34. MADD Pipeline Operation (in cycles 32〜39)  The computation of grid-points 11~18 18 17 16 15 Input2(adder): 1~8, 10~17 and 12~19 grid-points 8 17 19 14 13 Input1(adder): 21~28 grid-points 7 16 18 12 11 Input(multiplier): 11~18 grid-points 6 15 17 28 5 14 16 27 8-stages 4 13 15 26 Input2(adder) 25 3 12 14 24 2 11 13 23 1 10 12 22 21 8-stages Input1(adder) 33
  • 35. MADD Pipeline Operation (in cycles 40〜48)  The computation of grid-points 11~18 27 26 25 24 The computation results that data of up, down, 23 22 left and right gird-points are multiplied by a 21 18 20 17 weighting factor and summed are output in 16 cycles 40~48. 15 8-stages 14 13 Input2(adder) 12 11 8 17 19 28 8-stages 7 16 18 27 6 15 17 26 5 14 16 25 4 13 15 Input1(adder) 24 3 12 14 23 2 11 13 22 1 10 12 21 34
  • 36. MADD Pipeline Operation(Computation unit) The filing rate of the pipeline: (N-8/N)×100% (N is cycles which taken this computation.) ► Achievement of high computation performance and the small circuit area ► This scheduling is valid only when width of computed grid is equal to the pipeline stages of multiplier and adder. 35
  • 37. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 36
  • 38. FPGAアレーシステムの問題点  このFPGAアレーシステムはグローバルクロックを有していない! ► 各ノードは固有のクロックドメインを持っている ノード数を増加させた時に,計算機の不具合を発見! 各FPGAノードのクロック周期のばらつきが原因??  クロック周期のずれを定量的に評価  計算機が長時間,安定して動作するための機構を設計・実装 37
  • 39. クロックオシレータ (CSX-750PB(B))  各FPGAノードに搭載 (40MHz)  周波数安定度:±50ppm以内を保証 ► 1,000,000サイクルでずれるサイクルは±50サイクル以内  各FPGAノードのクロックのずれは,周波数安定度の値によ って左右される CSX-750PB(B) 38
  • 40. クロックのずれの評価(1/3)  ScalableCoreシステムを利用 (8×8構成)  計測時間を変化させてクロックのずれを測定 Display Power Supply FPGA FPGA FPGA FPGA FPGA FPGA USB Port PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM FPGA FPGA FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM FPGA FPGA FPGA FPGA FPGA FPGA PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM PROM SRAM 39
  • 41. クロックのずれの評価(2/3)  X軸,Y軸:各FPGAノードの座標  Z軸1,000,000サイクルあたりのクロックのずれ(ppm) x=1 x=1 x=1 25.00 25.00 25.00 x=2 x=2 x=2 cycle variea on / M ccycle cycle variea on / M ccycle cycle variea on / M ccycle 20.00 x=3 20.00 x=3 20.00 x=3 15.00 x=4 15.00 x=4 15.00 x=4 x=5 10.00 x=5 10.00 x=5 10.00 x=8 x=6 x=7 5.00 x=8 x=6 5.00 x=8 x=6 5.00 x=6 x=7 x=7 x=7 0.00 x=7 0.00 x=7 x=5 x=6 x=6 0.00 1 1 x=4 x=8 -5.00 x=5 x=8 -5.00 x=5 x=8 2 2 1 3 x=4 3 x=4 2 x=3 4 4 3 5 x=3 5 x=3 4 x=2 6 6 5 6 7 x=1 20sec 7 8 x=1 x=2 80sec 7 8 x=1 x=2 320sec 8 測定時間:20sec 測定時間:80sec 測定時間:80sec 最悪のずれ:20.5ppm (x=3, y=5) 最悪のずれ:20.5ppm (x=3, y=5) 最悪のずれ:20.7ppm (x=3, y=5) クロックのばらつきの標準偏差:4.73 クロックのばらつきの標準偏差:4.73 クロックのばらつきの標準偏差:4.79 ・周波数安定度±50ppmが保証されていることを確認 40
  • 42. クロックのずれの評価(3/3) 測定時間[sec] 最悪のずれ ずれの標準偏差 [ppm] 20 20.47(x=3, y=5) 4.73 x=1 1.50 x=2 cycle variea on / M ccycle 1.00 x=3 0.50 40 20.47(x=3, y=5) 4.68 0.00 x=4 -0.50 1 x=5 -1.00 2 3 4 x=6 -1.50 -2.00 5 6 80 20.47(x=3, y=5) 4.73 x=8 x=7 -2.50 7 8 x=7 -3.00 x=8 x=6 -3.50 x=5 -4.00 x=4 160 20.59(x=3, y=5) 4.77 x=3 x=2 x=1 320 20.66(x=3, y=5) 4.79 320secのクロックのずれを20sec のクロックのずれで割ったグラフ 各測定時間における最悪のずれとずれの標準偏差 ・クロックのずれは,時間には依存しないことを確認 →時間軸上ではほぼ変化しないクロックのずれを考慮したシステム設計が必要 41
  • 43. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 42
  • 44. 同期機構の設計  FPGAノード(A)をMasterノードと定義  各FPGAノードはMasterノードからα +β の周期で送信される信号に同期して計算 を実行  同期信号を受信するまで,Masterノード以外のノードは計算をストール synchronize synchronize α β α β α β α :1 イテレーション間におけ A るステンシル計算に要するサ イクル stall stall stall B β :各FPGAノードのクロック のずれを吸収するマージン C D 43
  • 45. 同期機構の実装  各FPGAノードはMasterノードからα +β の周期で送信される信号に同期して計算 を実行  同期信号を受信するまで,Masterノード以外のノードは計算をストール  信号を受信したFPGAノードは数サイクル待ってから,左方向と下方向に同期信 号を送信し,計算を再開 α β A α β A B master B for anti-chattering C C D D for anti-chattering 44
  • 47. 発表の流れ  FPGAアレーにおけるステンシル計算 ► アレー間通信の最適化 ► 演算ユニットのデータ処理  FPGAアレーシステムの問題点 ► クロックのばらつきの定量評価  同期機構の設計・実装  性能評価・結論 46
  • 48. Environment (Performance of Single FPGA Node)  FPGA:Xilinx Spartan-6 XC6SLX16 ► BlockRAM: 64KB  Design tool: Xilinx ISE webpack 13.3  Hardware description language: Verilog HDL  Implementation of MADD:IP core generated by Xilinx core-generator ► Implementing single MADD expends four pieces of 32 DSP-blocks which a Spartan-6 FPGA has. ◇ Therefore, the number of MADD to be able to be implemented in single FPGA is eight SRAM is not used. ScalableCore board 47
  • 49. Performance of Single FPGA Node(1/2)  Grid-size:64×128  Iteration:500,000  Performance and Power Consumption(160MHz) ► Performance:2.24GFlop/s ► Power Consumption:2.37W Peak performance[GFlop/s] Peak = 2×F×NFPGA×NMADD×7/8 Peak:Peak performance[GFlop/s] F:Operation frequency[GHz] NFPGA:the number of FPGA NMADD:the number of MADD 7/8: Average utilization of MADD unit → The four multiplications and the three additions v1[i][j] = (C0 * v0[i-1][j]) + (C1 * v0[i][j+1]) + (C2 * v0[i][j-1]) + (C3 * v0[i+1][j]); 48
  • 50. Performance of Single FPGA Node(2/2)  演算性能 (160MHz) ► 2.24GFlop/s 26% of Intel Core i7-2600 (single thread, 3.4GHz, -O3 option) ► 電力あたりの演算性能:0.95GFlop/sW Performance/W value is about six-times better than Nvidia GTX280 GPU card. Nvidia GTX 280 card  ハードウェア資源使用率 ► LUT: 50% ► Slice: 67% ► BlockRAM: 75% ► DSP48A1: 100% 49
  • 51. Conclusion  クロックのずれを定量的に評価 ► クロックのずれは動作時間に依存しない  設計および実装 ► 各FPGAノードの位置情報を取得する回路を実装 ► 各FPGAが同期する機構を実装 ► 100ノードでの動作を確認  性能評価 (One-FPGA node) ► 動作周波数 160MHz (no communication) ► 実行性能 2.24GFlop/s. 消費電力 2.37W. ► ハードウェア資源使用率 : Slices 67%  今後の課題 ► FPGAアレーの性能評価 ► 低電力に向けた実装 50