Skip to content

Commit

Permalink
[capture] Fix bug in capture_ibex
Browse files Browse the repository at this point in the history
We only should write the trace once when not in batch mode.

Signed-off-by: Pascal Nasahl <[email protected]>
  • Loading branch information
nasahlpa committed Dec 3, 2024
1 parent 298b11c commit 58657c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions capture/capture_ibex.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ def capture(scope: Scope, ot_ibex: OTIbex, ot_prng: OTPRNG,
data_bytes = []
for d in data:
data_bytes.append(d.to_bytes(4, "little"))
# Sanity check retrieved data (wave).
assert len(waves[0, :]) >= 1
# Store trace into database.
project.append_trace(wave = waves[0, :],
plaintext = b''.join(data_bytes),
ciphertext = None,
key = None)
# Sanity check retrieved data (wave).
assert len(waves[0, :]) >= 1
# Store trace into database.
project.append_trace(wave = waves[0, :],
plaintext = b''.join(data_bytes),
ciphertext = None,
key = None)

# Memory allocation optimization for CW trace library.
num_segments_storage = project.optimize_capture(num_segments_storage)
Expand Down

0 comments on commit 58657c0

Please sign in to comment.