[Cryptech-Commits] [core/cipher/aes_speed] branch master updated: Adding task to wait for ready to be set. This allows us to measure the number of cycles spent doing operations.
git at cryptech.is
git at cryptech.is
Mon May 21 13:49:15 UTC 2018
This is an automated email from the git hooks/post-receive script.
joachim at secworks.se pushed a commit to branch master
in repository core/cipher/aes_speed.
The following commit(s) were added to refs/heads/master by this push:
new 0286e46 Adding task to wait for ready to be set. This allows us to measure the number of cycles spent doing operations.
0286e46 is described below
commit 0286e465ee438cfe1abdb4fd374de19b2572a06a
Author: Joachim Strömbergson <joachim at secworks.se>
AuthorDate: Mon May 21 15:49:06 2018 +0200
Adding task to wait for ready to be set. This allows us to measure the number of cycles spent doing operations.
---
src/tb/tb_aes.v | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/tb/tb_aes.v b/src/tb/tb_aes.v
index 188a21a..9fdb601 100644
--- a/src/tb/tb_aes.v
+++ b/src/tb/tb_aes.v
@@ -305,6 +305,24 @@ module tb_aes();
end
endtask // read_word
+ //----------------------------------------------------------------
+ // wait_ready
+ //
+ // Wait for the DUT to signal that the result is ready
+ //----------------------------------------------------------------
+ task wait_ready;
+ begin : wait_ready
+ reg rdy;
+ rdy = 0;
+
+ while (rdy != 1)
+ begin
+ read_word(ADDR_STATUS);
+ rdy = tb_read_data[0];
+ end
+ end
+ endtask // wait_ready
+
//----------------------------------------------------------------
// read_result()
@@ -386,8 +404,9 @@ module tb_aes();
write_word(ADDR_CONFIG, (8'h00 + (key_length << 1)+ encdec));
write_word(ADDR_CTRL, 8'h02);
- #(100 * CLK_PERIOD);
-
+ wait_ready();
+ $display("*** Ready has been set!");
+ dump_dut_state();
read_result();
if (result_data == expected)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Commits
mailing list