fpgaアクセラレータの作り方
TRANSCRIPT
Intel (Altera) XilinxPCIe Altera SDK
for OpenCLSDAccel
SoC Altera SDK for OpenCL
SDSoC
FPGAアクセラレータ用ツール
Altera SDK for OpenCL
参考資料
Altera SDK for OpenCL解体新書 perlスクリプト編http://www.slideshare.net/ssuser479fa3/altera-sdk-for-opencl-perl
Altera SDK for OpenCL解体新書 : ホストとデバイスの関係http://www.slideshare.net/ssuser479fa3/altera-sdk-for-opencl
CPU
ホスト側のメモリ
Kernel−A
Kernel−B
Kernel−C
DMA
PCIe PCIe
DMA
デバイス側のメモリ
MIF
PCIeボード
x86-64だけでなく、POWERもサポート
CPU
ホスト側のメモリ
Kernel−A
Kernel−B
Kernel−C
ホスト側のメモリの一部をデバイス側のメモリとして使用し、CPU側からアクセスできるようにマップする
Linuxをブートするときに、引数として、cma=128M のようにして事前に割り当てる
CMA(Continuous Memory Allocator)
参考資料)、https://aelseb.wordpress.com/2015/04/11/contiguous-memory-on-arm-and-cache-coherency/
SoC FPGA
x86 + PCIeボード
参考資料)、http://japan.xilinx.com/products/design-tools/software-zone/sdaccel.html
KernelをC/C++でも書けるのが特徴
OpenCLによる開発フロー
参考資料)、http://japan.xilinx.com/support/documentation/sw_manuals_j/xilinx2015_4/ug1021-sdaccel-tutorial.pdf
アクセラレートするカーネルコードは、OpenCLだけでなく、C/C++でも書けるのが特徴
リコンフィギャラブルシステム
参考資料)、http://japan.xilinx.com/support/documentation/backgrounders/j_sdaccel-backgrounder.pdf
Xilinx SDSoC
参考資料
SDSoC解体新書2016.2版ソフトウェア編 (チラ見)
http://www.slideshare.net/ssuser479fa3/sdsoc
Zynq/Zynq Ultrascale+ MPSoC
参考資料)、http://japan.xilinx.com/products/design-tools/software-zone/sdaccel.html
対応ボード
・zed/microzed/zybo/zc702/zc706 ・zcu102 (Zynq Ultrascale+ MPSoC)
Full System Optimizing Compiler
参考資料)、http://japan.xilinx.com/support/documentation/backgrounders/j_sdsoc-development-environment-backgrounder.pdf
sds/sds++
ハイエンドプラットフォーム
アプリケーションとFPGA間でのデータの移動は不
要。固有デバイスドライバも不要
Intel : Xeon + FPGA Broadwell + Arria 10 Broadwell + Arria 10 GX MCP
IBM : CAPI POWER8 + FPGA (Xilinx/Altera)
Intel Xeon + FPGA
参考資料
「Xeon+FPGA への妄想」 どうやって実装するのか?
http://www.slideshare.net/ssuser479fa3/xeonfpga
Broadwell Xeon (E5-26xx v4) + Arria 10 FPGA
http://www.pactroninc.com/qpi/
Pectron Grantley HSX/BSX QPI SDP
http://www.nextplatform.com/2016/03/14/intel-marrying-fpga-beefy-broadwell-open-compute-future/
開発中のBroadwell + Arria 10 GX MCP
・ASE(VCS : Synopsys HDL Simulator)
・SDP (Intel Software Development Platform)
・BDX(Intel QuickAssist CCI-P FPGA BDX Xeon+FPGA)
Xeon + FPGA開発環境
https://cpufpga.files.wordpress.com/2016/04/harp_isca_2016_final.pdf
ASE = Intel AFU simulation environmentAFU : Accelerator Function Unit
IBM CAPI
参考資料
FPGAアクセラレータの作り方 (IBM POWER + CAPI編)http://www.slideshare.net/ssuser479fa3/ibm-capi-hdl
http://www.nallatech.com/wp-content/uploads/IBM_CAPI_Users_Guide_1-2.pdf
一見すると、CPUとFPGAだがFPGAの中に
ある
PSLと
POWER8の中にある
CAPPが重要
IBM CAPICoherent Accelerator Processor Interface
AFU
POWER8とFPGAの関係
CAPP
PCIe FPGA
PHB : PCIe Host BridgeCAPP : Coherently Attached Processor Proxy
PSL : Power Service LayerAFU : Accelerator Function Unit
PHB
CPU
POWER8
PSL
AFU
CAPIのソフトウェア構成
PCIe FPGA
Applicationは、libcxl (ユーザ空間) API =>Linux CXLデバイスドライバ経由でFPGAのAFUにアクセスする
FPGA(AFU)独自のデバイスドライバは不要
PSL
CXL
Application
POWER8
libcxl
コピー不要 &デバイスドライバ不要
メモリ移動 メモリ移動終了待ち起動
終了待ち起動
http://www.nallatech.com/wp-content/uploads/Ent2014-CAPI-on-Power8.pdf
Applicationのテンプレートコード
// AFUの確認
struct cxl_afu_h *afu_h = cxl_afu_next(NULL);// AFUを獲得
afu_h = cxl_afu_open_h(afu_h,CXL_VIEW_DEDICATED);// AFUの起動
cxl_afu_attach(afu_h, (uint64_t) wed);// 必要ならMMIOをマップ
cxl_mmio_map(afu_h, CXL_MMIO_BIG_ENDIAN);
// ここで何かをやる
cxl_mmio_unmap(afu_h); // MMIOをアンマップ
cxl_afu_free(afu_h); // AFUを開放
Microsoft Catapult
Project Catapult
https://www.microsoft.com/en-us/research/project/project-catapult/
https://www.microsoft.com/en-us/research/publication/a-reconfigurable-fabric-for-accelerating-large-scale-datacenter-services/
Board Design
サーバーユニットに1つのFPGAボードを搭載
https://www.microsoft.com/en-us/research/publication/a-reconfigurable-fabric-for-accelerating-large-scale-datacenter-services/
Catapult Shell Architecture
Shell ・x8 PCIe Core ・DMA Engine ・DDR3−4GB x 2 ・Inter-FPGA Router ・SLIII x 4 ・Peripherals
+ Role ・Appilication
https://www.microsoft.com/en-us/research/wp-content/uploads/2016%2F07/caulfield_adrian_reconfig_fabric_r01.pdf
Factory Summit 2014の資料
「マイクロソフトはどうやってBingをFPGAで実装したか」http://qiita.com/kazunori279/items/6f517648e8a408254a50で詳しく解説されています。