From: Dongju Chae Date: Fri, 11 Jun 2021 02:24:54 +0000 (+0900) Subject: [Docs] Add some document for DBus application X-Git-Tag: accepted/tizen/unified/20220103.130045~131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36ba6f04d1ab216ca7797bf0f5398b861d8e00e5;p=platform%2Fadaptation%2Fnpu%2Ftrix-engine.git [Docs] Add some document for DBus application This patch adds some document for DBus application. Signed-off-by: Dongju Chae --- diff --git a/docs/markdown/DBusApp.md b/docs/markdown/DBusApp.md new file mode 100644 index 0000000..1abac74 --- /dev/null +++ b/docs/markdown/DBusApp.md @@ -0,0 +1,59 @@ +--- +title: DBus App +short-description: DBus Application with NPU-DDK +... + +# DBus Application with NPU-DDK + +This page describes how to prepare DBus-compatible environment in the FastModel simulator, +and how to run our test program using DBus. + +## Setting up DBus + +First of all, you should install `dbus` package in the FastModel. + +```console +$ telnet localhost 5000 +Trying 127.0.0.1... +Connected to localhost. +Escape character is '^]'. +... +sh-3.2# zypper install dbus +... +``` + +Also, make sure that DBus's runtime directory exists. If don't, just create it. +```console +sh-3.2# ls /run/dbus +cannot access /run/dbus: No such file or directory +sh-3.2# mkdir -p /run/dbus +``` + +Then, you can start the dbus daemon. We recommend to append this to your `/init` script. +```console +sh-3.2# /usr/bin/dbus-daemon --system --nopidfile --syslog-only +sh-3.2# ls /run/dbus +pid system_bus_socket +``` + +## Starting DBus Service + +We provide sample DBus application which emulates VD NPU Manager. Note that it's not real one +and just uses the provided interface only. +```console +sh-3.2# zypper install npu-engine-example +... +sh-3.2# ls /usr/share/dbus-1/system.d/ +sr.odl.NPUManager.conf +sh-3.2# /usr/bin/dbus-daemon --system --nopidfile --syslog-only +sh-3.2# /usr/lib64/npu-engine/bin/apptests/npumgr/dummy_npumgr +sh-3.2# /usr/lib64/npu-engine/bin/apptests/npumgr/apptest_npumgr \ + /usr/share/npu-engine/testdata/TRIV235_2TOPS/MOBILENET_V1 +[ 25.222285] triv2 30410000.triv2: Execution Cycles: 114545 +[APPTEST] /usr/lib64/npu-engine/bin/apptests/npumgr/apptest_npumgr: PASSED +``` + +## Additional Notes + +Because our FastModel simulator only supports a single host CPU core, a multi-thread daemon such as DBus may make the overall system slow down. +So, please terminate the DBus daemon when you don't use it anymore. diff --git a/docs/sitemap.txt b/docs/sitemap.txt index 1189e08..80c8709 100644 --- a/docs/sitemap.txt +++ b/docs/sitemap.txt @@ -10,5 +10,6 @@ index.md Examples.md CommandLine.md TizenSample.md + DBusApp.md Debugging.md TestingGuide.md