Commit da6d8a9f by Enrico Pozzobon

trying to make test measurements more stable

parent 6eb71c50
...@@ -5,3 +5,7 @@ cd all-lwc-submission-files ...@@ -5,3 +5,7 @@ cd all-lwc-submission-files
wget https://csrc.nist.gov/CSRC/media/Projects/Lightweight-Cryptography/documents/round-1/submissions/all-lwc-submission-files.zip wget https://csrc.nist.gov/CSRC/media/Projects/Lightweight-Cryptography/documents/round-1/submissions/all-lwc-submission-files.zip
unzip all-lwc-submission-files.zip unzip all-lwc-submission-files.zip
cd .. cd ..
mkdir -p all-lwc-submission-files/aes-gcm/Implementations/crypto_aead/aesgcm128-128
cp -r mbed_aes_gcm/ all-lwc-submission-files/aes-gcm/Implementations/crypto_aead/aesgcm128-128/ref
...@@ -139,7 +139,7 @@ def begin_measurement(): ...@@ -139,7 +139,7 @@ def begin_measurement():
sal = saleae.Saleae() sal = saleae.Saleae()
sal.set_active_channels([0, 1, 2, 3], []) sal.set_active_channels([0, 1, 2, 3], [])
sal.set_sample_rate(sal.get_all_sample_rates()[0]) sal.set_sample_rate(sal.get_all_sample_rates()[0])
sal.set_capture_seconds(1000) sal.set_capture_seconds(6000)
sal.capture_start() sal.capture_start()
time.sleep(1) time.sleep(1)
if sal.is_processing_complete(): if sal.is_processing_complete():
...@@ -148,11 +148,14 @@ def begin_measurement(): ...@@ -148,11 +148,14 @@ def begin_measurement():
def end_measurement(sal): def end_measurement(sal):
import time import time
if sal.is_processing_complete():
raise Exception("Capture finished before expected")
time.sleep(1) time.sleep(1)
sal.capture_stop(); sal.capture_stop();
time.sleep(.1)
for attempt in range(3): for attempt in range(3):
if not sal.is_processing_complete(): if not sal.is_processing_complete():
print("waiting for capture to complete") print("Waiting for capture to complete...")
time.sleep(1) time.sleep(1)
continue continue
outfile = "measurement_%s.csv" % time.strftime("%Y%m%d-%H%M%S") outfile = "measurement_%s.csv" % time.strftime("%Y%m%d-%H%M%S")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment