Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Run SHA-256 test vectors on circuit #905

Merged
merged 5 commits into from
Aug 18, 2021

Conversation

jadephilipoom
Copy link
Contributor

@jadephilipoom jadephilipoom commented Aug 17, 2021

For #880

Attempting to run the SHA-256 test vectors on the circuit. Two problems I'd like help on (@blaxill ?):

  • I can't figure out how long the circuit is expected to run; test1 ("abc", 1 block, 3 bytes) takes 64*1+17 cycles, but test2 (2 blocks, 14 bytes) takes 64*2+21. For bigger tests I can't tell, because...
  • When I try to run test3, the circuit doesn't ever switch the "done" flag to 1, even when run for 500 cycles, and as far as I can tell doesn't ever get to the correct answer. I also tried running a 4-block test (the 4-byte word derived from "abcd" repeated 48 times) with the same result; it didn't ever seem to finish the computation.

@jadephilipoom
Copy link
Contributor Author

I am marking this "ready for review" because it will be affected by the reorganization discussed in #893 and the failing test is currently commented out, so it's probably easiest to just merge it now and then uncomment the test once the bug is fixed. Also, fixing the bug might be easier on top of this PR!

@jadephilipoom jadephilipoom merged commit 6567bb8 into project-oak:main Aug 18, 2021
@jadephilipoom jadephilipoom deleted the sha-tests branch August 18, 2021 09:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants