Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[capture] CW databases broken #274

Closed
vogelpi opened this issue Jan 8, 2024 · 4 comments · Fixed by #275
Closed

[capture] CW databases broken #274

vogelpi opened this issue Jan 8, 2024 · 4 comments · Fixed by #275
Assignees
Labels
bug Something isn't working Priority:P0

Comments

@vogelpi
Copy link
Collaborator

vogelpi commented Jan 8, 2024

Currently, our tvla script seems to only extract the first 20k traces of a CW database. I have several databases holding 2M and 10M AES traces but only the first 20k traces are effectively read out.

Does anyone know why this is the case and how to fix it? @nasahlpa @vrozic ?

@vogelpi vogelpi added bug Something isn't working Priority:P0 labels Jan 8, 2024
@johannheyszl
Copy link
Collaborator

oh, back in October/November when I last used the script, it reported on stdout that it would use larger numbers. Does it report 20k on stdout now?

@nasahlpa
Copy link
Member

nasahlpa commented Jan 8, 2024

I am not aware of such a limit - could you please provide me with the DB file and I try to reproduce & fix it.

@vogelpi
Copy link
Collaborator Author

vogelpi commented Jan 8, 2024

Hm, this is strange. I've now switched to an old version and it still just takes the first 20k traces. I am wondering if maybe the database is actually broken.

@vogelpi vogelpi changed the title [tvla] Reading of CW databases broken [capture] CW databases broken Jan 8, 2024
@vogelpi
Copy link
Collaborator Author

vogelpi commented Jan 8, 2024

A quick investigation of the generated CW project files reveals that all but the last two 10k segments are "disabled". When storing the segments or at the very end of the capture, we have to enable them. This seems to have gone wrong when reworking the capture setup. I'll adjusted the title accordingly and will file a PR.

vogelpi added a commit to vogelpi/ot-sca that referenced this issue Jan 8, 2024
When using the CW trace database format, we disable all but the last two
trace storage segments during captures to maintain high capture rates.
Before storing the database to disk at the end of the capture, all trace
storage segments need to be re-enabled. Otherwise, only 20k traces are
read from the database upon loading.

This resolves lowRISC#274.

Signed-off-by: Pirmin Vogel <[email protected]>
@vogelpi vogelpi self-assigned this Jan 8, 2024
vogelpi added a commit that referenced this issue Jan 9, 2024
When using the CW trace database format, we disable all but the last two
trace storage segments during captures to maintain high capture rates.
Before storing the database to disk at the end of the capture, all trace
storage segments need to be re-enabled. Otherwise, only 20k traces are
read from the database upon loading.

This resolves #274.

Signed-off-by: Pirmin Vogel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants