diff options
Diffstat (limited to 'src/tb/tb_sha256_core.v')
-rw-r--r-- | src/tb/tb_sha256_core.v | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/tb/tb_sha256_core.v b/src/tb/tb_sha256_core.v index 2f2a288..df0cafc 100644 --- a/src/tb/tb_sha256_core.v +++ b/src/tb/tb_sha256_core.v @@ -6,7 +6,8 @@ // // // Author: Joachim Strombergson -// Copyright (c) 2014 SUNET +// Copyright (c) 2014, SUNET +// All rights reserved. // // Redistribution and use in source and binary forms, with or // without modification, are permitted provided that the following @@ -52,6 +53,7 @@ module tb_sha256_core(); parameter DEBUG = 0; parameter CLK_HALF_PERIOD = 2; + parameter CLK_PERIOD = 2 * CLK_HALF_PERIOD; //---------------------------------------------------------------- @@ -243,7 +245,7 @@ module tb_sha256_core(); begin while (!tb_ready) begin - #(2 * CLK_HALF_PERIOD); + #(CLK_PERIOD); end end endtask // wait_ready @@ -263,8 +265,7 @@ module tb_sha256_core(); tb_block = block; tb_init = 1; - #(2 * CLK_HALF_PERIOD); - tb_init = 0; + #(CLK_PERIOD); wait_ready(); @@ -308,8 +309,7 @@ module tb_sha256_core(); $display("*** TC %0d first block started.", tc_number); tb_block = block1; tb_init = 1; - #(2 * CLK_HALF_PERIOD); - tb_init = 0; + #(CLK_PERIOD); wait_ready(); db_digest1 = tb_digest; $display("*** TC %0d first block done.", tc_number); @@ -317,8 +317,7 @@ module tb_sha256_core(); $display("*** TC %0d second block started.", tc_number); tb_block = block2; tb_next = 1; - #(2 * CLK_HALF_PERIOD); - tb_next = 0; + #(CLK_PERIOD); wait_ready(); $display("*** TC %0d second block done.", tc_number); |