●表A Nios Vカスタム命令関係の信号

●表B Nios Vの演算回路

●リストA [カスタム命令呼び出し用マクロ]

●今回使うデザインをPlatform Designerで配置したところ

 Platformdesignerで配置したところ

●コンポーネントのパラメータ設定用GUI画面

クロックブリッジの設定(Explicit clock rate)

リセットブリッジの設定はデフォルトのまま

IOPLLの設定

NIOS Vの設定

JTAG UARTの設定はデフォルトのまま

 RAMのサイズを1048576に設定.それ以外はデフォルトのまま

●リストB [Tensorflowのサンプルを準備する]

●展開されたTensorflowのファイル

$ ls -l tflite-micro/tflite_app
total 28
drwxrwxr-x 3 altera altera  4096 Dec 20 10:16 examples
-rw-rw-r-- 1 altera altera 11358 Dec 20 10:16 LICENSE
drwxrwxr-x 4 altera altera  4096 Dec 20 10:16 signal
drwxrwxr-x 4 altera altera  4096 Dec 20 10:16 tensorflow
drwxrwxr-x 6 altera altera  4096 Dec 20 10:16 third_party

$ ls -l tflite-micro/tflite_app/examples/person_detection/
total 48
-rw-rw-r-- 1 altera altera 1135 Dec 10 10:16 detection_responder.cc
-rw-rw-r-- 1 altera altera 1545 Dec 10 10:16 detection_responder.h
-rw-rw-r-- 1 altera altera  960 Dec 10 10:16 image_provider.cc
-rw-rw-r-- 1 altera altera 2036 Dec 10 10:16 image_provider.h
-rw-rw-r-- 1 altera altera 1061 Dec 10 10:16 main.cc
-rw-rw-r-- 1 altera altera 4263 Dec 10 10:16 main_functions.cc
-rw-rw-r-- 1 altera altera 1348 Dec 10 10:16 main_functions.h
-rw-rw-r-- 1 altera altera  781 Dec 10 10:16 model_settings.cc
-rw-rw-r-- 1 altera altera 1477 Dec 10 10:16 model_settings.h

●表C

●表D

●リストC [人検出アプリケーションを生成する]

アプリケーションに必要なソースファイルをコピーする

$ mkdir -p sw/tflite_person_detection
$ cp -r tflite-micro/tflite_app/examples    sw/tflite_person_detection
$ cp -r tflite-micro/tflite_app/signal      sw/tflite_person_detection
$ cp -r tflite-micro/tflite_app/tensorflow  sw/tflite_person_detection
$ cp -r tflite-micro/tflite_app/third_party sw/tflite_person_detection 

CMake用ファイルを生成するための,niosv-appコマンド

$ niosv-app --bsp-dir=sw/tflite_bsp --app-dir=sw/tflite_person_detection \
        --srcs-recursive=sw/tflite_person_detection/examples/person_detection \
        --srcs-recursive=sw/tflite_person_detection/signal \
        --srcs-recursive=sw/tflite_person_detection/tensorflow \
        --incs=sw/tflite_person_detection \
        --incs=sw/tflite_person_detection/examples/person_detection \
        --incs=sw/tflite_person_detection/tensorflow \
        --incs=sw/tflite_person_detection/third_party/flatbuffers/include \
        --incs=sw/tflite_person_detection/third_party/gemmlowp\
        --incs=sw/tflite_person_detection/third_party/kissfft\
        --incs=sw/tflite_person_detection/third_party/ruy

●図A

●リストD

●表E

●リスト18 省略していない版

●表F

●Platform Designerにカスタム命令を登録

TFL_EXEのバス幅

TFL_GETの専用バス幅

TFL_SETの専用バス幅

●図B カスタム命令の登録

●参考文献

(17)Nios V Embedded Processor Design Handbook
https://www.intel.com/content/www/us/en/docs/programmable/726952/24-2/about-the-embedded-processor.html
(18)Agilex 5 FPGA E-Series 065B Premium Development Kit
https://www.intel.com/content/www/us/en/products/details/fpga/development-kits/agilex/a5e065b-premium.html
(19)DE25-Standard Development Kit
https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&No=1354
(20)AN 978: Nios V Processor Migration Guidelines
https://www.intel.com/content/www/us/en/docs/programmable/773196/current/overview.html
(21)Intel Quartus Prime Installer (GUI mode)
https://www.youtube.com/watch?v=Ie9eKoQCOns
(22)Nios V Processor Reference Manual
https://www.intel.com/content/www/us/en/docs/programmable/683632/current/overview.html
(23)RISC-V Specifications
https://riscv.org/technical/specifications
(24)Nios V Processor
https://www.intel.com/content/www/us/en/products/details/fpga/intellectual-property/processors-peripherals/niosv.html
(25)AN 980: Nios V Processor Quartus Prime Software Support
https://www.intel.com/content/www/us/en/docs/programmable/778829/current/overview.html
(26)Nios V Processor Intel FPGA IP Release Notes
https://www.intel.com/content/www/us/en/docs/programmable/683098/current/processor-release-notes-40733.html
(27)Nios V Embedded Processor Design Handbook
https://www.intel.com/content/www/us/en/docs/programmable/726952/current/about-the-embedded-processor.html
(28)Ashling* RiscFree* Integrated Development Environment (IDE) for Intel® FPGAs User Guide
https://www.intel.com/content/www/us/en/docs/programmable/730783/current/about-the-ide.html
(29)Porting to a new platform
https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/docs/new_platform_support.md
(30)Quartus Prime Pro Edition User Guide: Platform Designer
https://www.intel.com/content/www/us/en/docs/programmable/683609/24-3/faq.html

コメントを残す