Skip to content

Commit df9992b

Browse files
committed
Added missing information to the tutorial about running tests in energy mode
1 parent 692bb82 commit df9992b

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

benchmark/TUTORIAL.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,20 @@ The image classification, anomaly detection, keyword spotting and person detecti
3737

3838
Next, build the firmware for the desired benchmark by executing `mbed compile -m NUCLEO_L4R5ZI -t GCC_ARM` in the benchmark directory, then flash the firmware to the board by copying the compiled .bin file to the STM32 Nucleo board. This can be achieved through the command line, through the file explorer, or through the use of the STM32 Cube Programmer application.
3939

40-
To run any of the tests in energy mode, connect the energy board to the USB port on the computer and connect the reference board to the energy board as shown below. Make sure to disconnect the reference board from the computer after flashing the firmware if running the test in energy mode.
40+
To run any of the tests in energy mode, connect the power board and the interface board to the reference board as shown below, and connect the interface board and the power board to the computer via USB. Load the firmware from *[interface/benchmark_interface.elf](interface/benchmark-interface.elf)* to the interface board using the STM32 Cube Programmer. Then, navigate to the `submitter_implemented.h` file in the desired benchmark, modify the line `#define EE_CFG_ENERGY_MODE 0` to `#define EE_CFG_ENERGY_MODE 1`, then recompile the firmware and load the compiled .bin file to the reference board.
4141

42+
The interface board runs at 3.3V, so if the DUT is running at any other supply voltage, the logic levels must be shifted. The TXB0108, available in a [breakout board](https://www.adafruit.com/product/395) from Adafruit, support low-side voltages from 1.2V to 3.6V.
43+
44+
#### Power board (LPM01A)
4245
![LPM01A Wiring](runner/img/LPM01A.png)
4346

47+
#### Interface board (STM32H573I-DK)
48+
![STM32H573I-DK Top Wiring](runner/img/STM32H573I-DK-Top.png)
49+
![STM32H573I-DK Bottom Wiring](runner/img/STM32H573I-DK-Bottom.png)
50+
51+
#### Device under test (L4R5ZI) with level shifter
52+
![DUT Wiring](runner/img/L4R5Zi.png)
53+
4454
Once the hardware is configured, navigate to the [runner](./runner/) directory and execute the runner. Commands to run specific benchmarks are below.
4555
* Image Classification
4656
* Energy: `python main.py --dataset_path=/path/to/datasets/ --test_script=tests_energy.yaml --device_list=devices_kws_ic_vww.yaml --mode=e`
@@ -60,20 +70,9 @@ Once the hardware is configured, navigate to the [runner](./runner/) directory a
6070
* Accuracy: `python main.py --dataset_path=/path/to/datasets/ --test_script=tests_accuracy.yaml --device_list=devices_ad.yaml --mode=a`
6171

6272
### Streaming wakeword benchmark
63-
The streaming wakeword benchmark uses the STM32 Cube SDK and consists of two parts that must be installed independently. First, open the STM32 Cube IDE and import the *[sww_ref_l4r5zi](./reference_submissions/streaming_wakeword/sww_ref_l4r5zi/)* project. Navigate to the debug configurations dialog by right-clicking the project name and selecting *Debug As -> Debug Configurations* and change the ST-Link device on the *Debugger* tab to the device plugged into the computer by pressing *Scan* and selecting the device from the drop-down menu. Then, compile and run the program by pressing the *Debug* button and pressing *Resume* when the debugger connects. Disconnect the debugger and disconnect the Nucleo reference board.
64-
65-
Next, connect the power board to the reference board as shown above, connect the interface board to the reference board as shown below, and connect the interface board and the power board to the computer via USB. Load the firmware from *[interface/benchmark_interface.elf](interface/benchmark-interface.elf)* to the interface board using the STM32 Cube Programmer.
73+
The streaming wakeword benchmark uses the STM32 Cube SDK and consists of two parts that must be installed independently. First, open the STM32 Cube IDE and import the *[sww_ref_l4r5zi](./reference_submissions/streaming_wakeword/sww_ref_l4r5zi/)* project. Navigate to the debug configurations dialog by right-clicking the project name and selecting *Debug As -> Debug Configurations* and change the ST-Link device on the *Debugger* tab to the device plugged into the computer by pressing *Scan* and selecting the device from the drop-down menu. Then, compile and run the program by pressing the *Debug* button and pressing *Resume* when the debugger connects. Disconnect the debugger and disconnect the Nucleo reference board. Then, connect the reference board, power board and interface board in the energy measurement configuration as shown above.
6674

67-
The interface board runs at 3.3V, so if the DUT is running at any other supply voltage, the logic levels must be shifted. The TXB0108, available in a [breakout board](https://www.adafruit.com/product/395) from Adafruit, support low-side voltages from 1.2V to 3.6V.
68-
69-
The STM32H573I-DK board has a slot for a micro-SD card. The SD card must be loaded with the WAV files containing the wakewords to be streamed from the *[runner/sww_data_dir](runner/sww_data_dir/)* folder. Ensure that it is formatted as an MS-DOS (FAT32) disk. A 1GB card is plenty for the current benchmarks. **This data must also be stored in a folder named sww01 under the dataset path specified in the next steps otherwise the runner will fail to detect (e.g., in a the folder [evaluation/datasets/sww01](evaluation/datasets/sww01/) if the specified dataset path is [evaluation/datasets](evaluation/datasets)).**
70-
71-
### Interface board (STM32H573I-DK)
72-
![STM32H573I-DK Top Wiring](runner/img/STM32H573I-DK-Top.png)
73-
![STM32H573I-DK Bottom Wiring](runner/img/STM32H573I-DK-Bottom.png)
74-
75-
### Device under test (L4R5ZI) with level shifter
76-
![DUT Wiring](runner/img/L4R5Zi.png)
75+
The interface board has a slot for a micro-SD card. The SD card must be loaded with the WAV files containing the wakewords to be streamed from the *[runner/sww_data_dir](runner/sww_data_dir/)* folder. Ensure that it is formatted as an MS-DOS (FAT32) disk. A 1GB card is plenty for the current benchmarks. **This data must also be stored in a folder named sww01 under the dataset path specified in the next steps otherwise the runner will fail to detect (e.g., in a the folder [evaluation/datasets/sww01](evaluation/datasets/sww01/) if the specified dataset path is [evaluation/datasets](evaluation/datasets)).**
7776

7877
This benchmark runs performance, accuracy and energy tests in a single run, and should be run in energy mode.
7978

0 commit comments

Comments
 (0)