![Page 1: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/1.jpg)
SDSoC解体新書
2016.2版ソフトウェア編
(チラ見用)
![Page 2: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/2.jpg)
Vengineer DEATH
無限ゲームのなか
いつものように、
よろしくお願いします。
@Vengineer に居ます
![Page 3: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/3.jpg)
本資料では、SDSoC™が生成するソフト
ウェアについて調べた結果をまとめたも
のです。
ご利用は、自己責任でお願いします。
![Page 4: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/4.jpg)
SDSoC™とは
![Page 5: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/5.jpg)
SDSoC™ Software-Defined Development Environment for System-on-Chip
SDSoC システムコンパイラをフロントエンドとして、
Vivado HLS/Vivado Design Suiteを使って、
HDL => FPGA Bitstreamの生成だけでなく、
FPGAの部を制御するためのソフトウェアも自動生
成するという優れもの!
いやー、びっくりポン、ですよ。(古い?)
Trademark付いていますよ®ではない
![Page 6: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/6.jpg)
SDSoCプラットフォーム
![Page 7: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/7.jpg)
SDSoCプラットフォーム
SDSoCを使うためには、ターゲットボード用の
SDSoCプラットフォームを作成しないといけない
SDAccelやAltera SDK for OpenCLでも同じよう
にターゲットボード用にプラットフォームを用意する
必要があるので、特別なことではない
![Page 8: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/8.jpg)
SDSoCプラットフォーム
各ボードに対応したものが必要
2016.2のサンプルプラットフォーム
・microzed ・zc702 ・zc706 ・zcu102 (Zynq Ultrascale+ MPSoC) ・zed ・zybo
![Page 9: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/9.jpg)
SDSoC 環境プラットフォームおよびライブラリ UG1146 (v2016.2) 2016 年 7 月 13 日, Page.6
SDSoCプラットフォーム
![Page 10: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/10.jpg)
• メタデータファイル – Vivadoツールを使用して生成されたプラットフォームハードウェア記述
– 手動で記述したプラットフォームソフトウェア記述ファイル
• Vivado Design Suiteプロジェクト – ソース/ 制約/IPブロック
• ソフトウェアファイル – ライブラリヘッダーファイル (オプション) – スタティックライブラリ (オプション) – Linux関連オブジェクト (デバイスツリー、U-Boot、Linuxカーネル、ramdisk)
• ビルド済みハードウェアファイル(オプション) – ビットストリーム
– SDK用にエクスポートされたハードウェアファイル
– 前もって生成されたデバイス登録およびポート情報ソフトウェアファイル
– 前もって生成されたハードウェアおよびソフトウェアインターフェイスファイル
SDSoCプラットフォーム
SDSoC 環境プラットフォームおよびライブラリ UG1146 (v2016.2) 2016 年 7 月 13 日, Page.7
![Page 11: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/11.jpg)
SDSoC 環境プラットフォームおよびライブラリ UG1146 (v2016.2) 2016 年 7 月 13 日, Page.7
SDSoCプラットフォーム
![Page 12: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/12.jpg)
SDSoC 環境プラットフォームおよびライブラリ UG1146 (v2016.2) 2016 年 7 月 13 日, Page.7
SDSoCプラットフォーム
Zyboでは、 ディレクトリ
・vivado ・boot ・hardware ・freertos ・aarch32-none
メタデータファイル
・zybo_hw.pfm Vivadoツールを使用して生成されたプラットフォームハードウェア記述
・zybo_sw.pfm 手動で記述したプラットフォームソフトウェア記述ファイル
![Page 13: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/13.jpg)
ソフトウェア構成
![Page 14: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/14.jpg)
オリジナルプログラムでの構成
Application
Linux
GCC (gcc/g++)にてコンパイル、必要なライブラリをリンクし、すべ
てをZynq内のCPUでプログラムとして実行する
![Page 15: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/15.jpg)
SDSoCで実装したときの構成
Accel-Library
Application
/dev/xlnk/dev/uioX
Linux
PL (FPGA)
生成されるファイル
・SW Accel-Library・HW FPGA bitstream
![Page 16: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/16.jpg)
例題で確認しよう
![Page 17: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/17.jpg)
チュートリアルで確認
SDSoC 環境ユーザー ガイド
SDSoC 環境の概要(UG1028)
「第2章 チュートリアル : プロジェクトの作成、ビル
ド、実行」
で、[Matrix Multiplication and Addition]をハードウェア化してみよう!
SDReleaseではなく、SDDebugで
SDSoC 環境ユーザーガイド SDSoC環境の概要 UG1028 (v2016.2) 2016 年 7 月 13 日, Page.20
![Page 18: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/18.jpg)
チュートリアルのプログラムでの構成
Application(mmult + madd)
Linux
mmult(mmult.cpp) と madd(madd.cpp)を、
SdSoCを使ってハードウェア化しています
![Page 19: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/19.jpg)
FPGAの部屋
SDSoC 2015.2 のチュートリアルをやってみた
http://marsee101.blog19.fc2.com/blog-entry-3212.htmlhttp://marsee101.blog19.fc2.com/blog-entry-3213.htmlhttp://marsee101.blog19.fc2.com/blog-entry-3214.htmlhttp://marsee101.blog19.fc2.com/blog-entry-3215.html
![Page 20: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/20.jpg)
SDDebugディレクトリ
![Page 21: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/21.jpg)
SDSoCで実装したときの構成
Accel-Library
Application
/dev/xlnk/dev/uioX
Linux
PL (FPGA)
生成されるファイル
・SW Accel-Library (mmult + madd)・HW FPGA bitstream
![Page 22: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/22.jpg)
生成されたファイルを見てみよう
SDDebugディレクトリ
・_sds : Accel-Library
・labn.elf : 実行ファイル
・labn.elf.bit : FPGA部のbitstream
・makefile ・object.mk ・sd_card : ブートに必要なファイル
・source.mk ・src : mmult/maddソースコード
![Page 23: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/23.jpg)
sd_cardディレクトリ
![Page 24: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/24.jpg)
Zynqでsd_cardに必要なものは?
・BOOT.BIN
以下のファイルは入っている
・fsbl.elf Booting・u-boot.elf
・devicetree.dtb Linux・uImage・uramdisk.image.gz
http://www.wiki.xilinx.com/Zynq+2016.2+Release
![Page 25: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/25.jpg)
SDSoCが出力するsd_card中身は?
・BOOT.BIN Booting (fsbl.elf + u-boot.elf)・devicetree.dtb Linux・uImage・uramdisk.image.gz
・README.tx・_sds/_p0_.bin FPGA bitstream・labn.elf Application
ここがポイント!
![Page 26: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/26.jpg)
SDSoCが生成するポイントは!
FPGA bitstream (labn.elf.bit.bin)SDSoCプロントエンドで切り出したハードウェ
ア部分を Vivado HLS/Vivado Design Suiteを呼び出し生成する
Application (labn.elf)SDSoCフロントエンドでライブラリとリンクして
生成する
![Page 27: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/27.jpg)
_sds_ディレクトリ
![Page 28: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/28.jpg)
_sdsディクリトリ
・iprepo : 生成したHWのIP
・p0 : Partition 0に必要なファイル全部
・reports : レポート/ログファイル
・swstubs : ソフトウェアのスタブファイル
・vhls : Vivado HLS実行ディレクトリ
![Page 29: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/29.jpg)
_sds_/p0ディレクトリ
![Page 30: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/30.jpg)
_sds_/p0の中身
・.boot・.cf_work・.xsd・ipi・sd_card : SDカードの内容
![Page 31: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/31.jpg)
_sds_/p0/sd_cardの中身
・BOOT.BIN Booting・devicetree.dtb Linux・uImage・uramdisk.image.gz
・README.tx・boot.bif・labn.elf・labn.elf.bit.bin
![Page 32: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/32.jpg)
boot.bifの内容
皆さんおなじみのbootgenスクリプト/* /xxxxxx/SDDebug/_sds/p0/.boot/boot.bif *//* Command to create bitstream .bin file: *//* bootgen -image <bif_file> -split bin -w *//* Command to create BOOT.BIN file: *//* bootgen -image <bif_file> -w -o i BOOT.BIN *//* linux */the_ROM_image:{ [bootloader]/xxxx/zybo/boot/fsbl.elf /yyyy/SDDebug/labn.elf.bit /xxxx/zybo/boot/u-boot.elf}
![Page 33: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/33.jpg)
_sds_/p0/sd_cardの中身
・BOOT.BIN Booting (fsbl.elf + u-boot.elf + labn.elf.bit)・devicetree.dtb Linux・uImage・uramdisk.image.gz
・labn.elf.bit.bin FPGA bitstream・labn.elf Application
ここがポイント!
![Page 34: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/34.jpg)
_sds_/swstubsディレクトリ
![Page 35: SDSoC解体新書2016.2版ソフトウェア編 (チラ見) : Inside SDSoC v2016.2 (Software short edtion)](https://reader033.vdocuments.site/reader033/viewer/2022051006/5873d25b1a28ab9d168b66e5/html5/thumbnails/35.jpg)
この後に、
調査した結果をまとめていきます