diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 4ebbcc116..0a1bb7b94 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -22,9 +22,9 @@ jobs: displayName: "Pull LFS binaries" - bash: | pushd ci - ./ci_capture_aes_fvsr.sh + ./ci_capture_aes.sh popd - displayName: "Capture traces" - - publish: ./ci/ci_projects/opentitan_simple_aes_data/ + displayName: "Capture traces AES " + - publish: ./ci/tmp/ artifact: traces - displayName: "Upload traces" + displayName: "Upload traces AES." diff --git a/ci/ci_capture_aes.sh b/ci/ci_capture_aes.sh new file mode 100755 index 000000000..99c500b8a --- /dev/null +++ b/ci/ci_capture_aes.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +# Simple script to test AES captures +# Create results folder. +mkdir -p tmp + +# AES +MODE="aes" +BOARD=cw310 +declare -A aes_test_list +aes_test_list["aes-random"]=100 +aes_test_list["aes-random-batch"]=1000 +aes_test_list["aes-fvsr-key"]=100 +aes_test_list["aes-fvsr-key-batch"]=1000 + +ARGS="--force-program-bitstream" +for test in ${!aes_test_list[@]}; do + echo Testing ${test} on CW310 - `date` + NUM_TRACES=${aes_test_list[${test}]} + ../cw/capture.py --cfg-file ci_capture_aes_cw310.yaml capture ${test} \ + --num-traces ${NUM_TRACES} ${ARGS} &>> "tmp/test_capture.log" + + mv ./ci_projects/sample_traces_${MODE}.html tmp/${test}_traces.html + ARGS="" +done diff --git a/ci/ci_capture_aes_cw310.yaml b/ci/ci_capture_aes_cw310.yaml index 85532f0c4..0731ff547 100644 --- a/ci/ci_capture_aes_cw310.yaml +++ b/ci/ci_capture_aes_cw310.yaml @@ -1,6 +1,6 @@ device: fpga_bitstream: ../cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit - force_program_bitstream: True + force_program_bitstream: False fw_bin: ../cw/objs/aes_serial_fpga_cw310.bin pll_frequency: 100000000 baudrate: 115200 @@ -25,6 +25,6 @@ capture: project_name: ci_projects/opentitan_simple_aes waverunner_ip: 192.168.1.228 plot_capture: - show: False + show: true num_traces: 100 - trace_image_filename: null + trace_image_filename: ci_projects/sample_traces_aes.html diff --git a/ci/ci_capture_aes_fvsr.sh b/ci/ci_capture_aes_fvsr.sh deleted file mode 100755 index 8c4d75d71..000000000 --- a/ci/ci_capture_aes_fvsr.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Copyright lowRISC contributors. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -# Simple script to test AES fvsr-key capture -../cw/capture.py --cfg-file ci_capture_aes_cw310.yaml capture aes-fvsr-key-batch -if [ -d "./ci_projects/opentitan_simple_aes_data" ]; -then - echo "Directory ./ci_projects/opentitan_simple_aes_data exists" -else - echo "Error: Directory ./ci_projects/opentitan_simple_aes_data does not exists." - exit 1 -fi