Skip to content

Commit

Permalink
[ci] extend CI with AES capture tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Rozic <[email protected]>
  • Loading branch information
vrozic committed Oct 9, 2023
1 parent 0cb37ac commit 05530fc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 22 deletions.
10 changes: 5 additions & 5 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
artifact: traces
displayName: "Upload traces"
displayName: "Capture traces AES "
- publish: ./ci/tmp/
artifact: aes-fvsr-key-batch_traces.html
displayName: "Upload traces AES fvsr"
28 changes: 28 additions & 0 deletions ci/ci_capture_aes.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions ci/ci_capture_aes_cw310.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
14 changes: 0 additions & 14 deletions ci/ci_capture_aes_fvsr.sh

This file was deleted.

0 comments on commit 05530fc

Please sign in to comment.