You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* updated example har smartphone for GNU toolchain
* fixed link and cmd line
* updated README.md
* updated Makefile - renamed PUBLIC_DIR variable. added creation of a bin directory for external lib.
* updated README.md - Added some Notes for GNU part
* fixed link to specific paragraph
* added folder for prebuilt library, added README.md
* Update README.md
* Update README.md
* Update README.md
Copy file name to clipboardExpand all lines: examples/example_har_smartphone/README.md
+71-11Lines changed: 71 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,18 @@ Example shows how to work with recurrent primitives (LSTM and basic RNN) impleme
10
10
11
11
Quick Start
12
12
--------------
13
-
Here we will consider building for hw/em9d.tcf template.
14
13
15
-
0. embARC MLI Library must be built for required hardware configuration first. See [embARC MLI Library building and quick start](public/README.md).
14
+
Example supports building using MetaWare Development tools and ARC GNU toolchain and running with MetaWare Debuger on nSim simulator.
15
+
16
+
### Build with MetaWare Development tools
17
+
18
+
Build requirements:
19
+
- MetaWare Development tools version 2018.12 or higher
20
+
- gmake
21
+
22
+
Here we will consider building for [/hw/em9d.tcf](/hw/em9d.tcf) template. This template is a default template for this example. Other templated can be also used.
23
+
24
+
0. embARC MLI Library must be built for required hardware configuration first. See [embARC MLI Library building and quick start](/README.md#building-and-quick-start).
16
25
17
26
1. Open command line and change working directory to './examples/example_har_smartphone'
18
27
@@ -24,11 +33,54 @@ Here we will consider building for hw/em9d.tcf template.
24
33
25
34
gmake TCF_FILE=../../hw/em9d.tcf
26
35
27
-
4. Run example
36
+
###Run example with MetaWare Debuger on nSim simulator.
28
37
29
38
gmake run TCF_FILE=../../hw/em9d.tcf
30
39
31
-
5. Result Quality shall be "S/N=1823.9 (65.2 db)"
40
+
Result Quality shall be "S/N=1823.9 (65.2 db)"
41
+
42
+
### Build with ARC GNU toolchain
43
+
44
+
Here we will consider building with ARC GNU toolchain. As a platform for the assembly, we use the [IoT Devkit](https://embarc.org/embarc_osp/doc/build/html/board/iotdk.html) from [the embARC Open Software Platform (OSP)](https://embarc.org/embarc_osp/doc/build/html/introduction/introduction.html#)
45
+
46
+
Build requirements:
47
+
- ARC GNU toolchain version 2018.09 or higher
48
+
- embARC MLI Library prebuilt with MetaWare Development tools for IoT Devkit hardware configuration
49
+
- gmake
50
+
51
+
0. Prebuilt embARC MLI Library must be copyied into the ./examples/prebuilt folder.
52
+
53
+
1. Open command line and change working directory to './examples/example_har_smartphone'
54
+
55
+
2. Clean previous build artifacts (optional)
56
+
57
+
gmake TOOLCHAIN=gnu clean
58
+
59
+
3. Build example
60
+
61
+
gmake TOOLCHAIN=gnu
62
+
63
+
Notes: IoT Devkit hardware configuration is specifed in Makefile. Additionally used memory.x linkscript file for GNU linker.
64
+
65
+
### Run example with MetaWare Debuger on nSim simulator.
66
+
67
+
Run requirements:
68
+
- MetaWare Development tools version 2018.12 or higher
69
+
- arcem9d.tcf file with hardware configuration of IoT Devkit for setup nSim.
70
+
71
+
0. Copy the [arcem9d.tcf](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp/blob/master/board/iotdk/configs/10/tcf/arcem9d.tcf) file into example folder.
72
+
73
+
1. Run example
74
+
75
+
gmake run TOOLCHAIN=gnu TCF_FILE=arcem9d.tcf
76
+
77
+
Result Quality shall be "S/N=1823.9 (65.2 db)"
78
+
79
+
Notes: Example built by ARC GNU tools is run using mdb_com_gnu script file. Modify this file to customize the example run mode. See [More Options on Building and Running](README.md#more-options-on-building-and-running)
80
+
81
+
### Run example without MetaWare Development tools
82
+
83
+
See documentation on [IoT Devkit](https://embarc.org/embarc_osp/doc/build/html/board/iotdk.html) on how to run executable built with [ARC GNU](https://embarc.org/toolchain/index.html) and [ARC open source development tools](https://embarc.org/embarc_osp/doc/build/html/index.html) on IoT Devkit.
32
84
33
85
34
86
Example Structure
@@ -48,8 +100,13 @@ Structure of example application may be divided logically on three parts:
48
100
* ../auxiliary/tests_aux.h(.c)
49
101
* ../auxiliary/idx_file.h(.c)
50
102
51
-
Example structure also contains test vector set including small subset of pre-processed UCI HAR Smartphones dataset (20 vectors organized in IDX file format).
52
-
103
+
Example structure contains test vector set including small subset of pre-processed UCI HAR Smartphones dataset (20 vectors organized in IDX file format).
104
+
105
+
Example structure also contains auxiliary files for development tools:
106
+
* arcem9d.lcf - linkscript file for MetaWare linker.
107
+
* memory.x - linkscript file for GNU linker.
108
+
* mdb_com_gnu - command script file for MetaWare Debugger.
109
+
53
110
More Options on Building and Running
54
111
---------------------------------------
55
112
Coefficients for trained NN model are stored in the separate compile unit (*coefficients.c) as wrapped float numbers. This allows to transform coefficients into quantized fixed point values in compile time.
@@ -69,15 +126,18 @@ No application input arguments.
69
126
70
127
gmake run TCF_FILE=../../hw/em9d.tcf
71
128
72
-
2.**Accuracy measurement for testset.** Reads vectors from input IDX file, passes it to the model, and accumulates number of successive classifications according to labels IDX file.
129
+
2.**External test-set processing.** Reads vectors from input IDX file, passes it to the model, and writes it's output to the other IDX file (if input is *tests.idx* then output will be *tests.idx_out*).
130
+
Input test-set path is required as argument
131
+
132
+
gmake run TCF_FILE=../../hw/em9d.tcf RUN_ARGS="small_test_base/tests.idx"
133
+
134
+
3.**Accuracy measurement for testset.** Reads vectors from input IDX file, passes it to the model, and accumulates number of successive classifications according to labels IDX file.
73
135
Input test-set and labels paths are required as argument.
74
136
75
137
gmake run TCF_FILE=../../hw/em9d.tcf RUN_ARGS="small_test_base/tests.idx small_test_base/labels.idx"
76
138
77
-
3.**External test-set processing.** Reads vectors from input IDX file, passes it to the model, and writes it's output to the other IDX file (if input is *tests.idx* then output will be *tests.idx_out*).
78
-
Input test-set path is required as argument
79
-
80
-
gmake run TCF_FILE=../../hw/em9d.tcf RUN_ARGS="small_test_base/tests.idx"
139
+
Notes: If the example is compiled with GNU tools, then these modes are transferred to the application using mdb_com_gnu command script file for MetaWare Debugger.
140
+
Modify this file to customize the example run mode.
0 commit comments