aboutsummaryrefslogtreecommitdiff
path: root/src/tb/tb_sha512_core.v
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-04-03 11:59:25 +0200
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-04-03 11:59:25 +0200
commit00f002c478e718d8bc6a71d148816820a8e65fc7 (patch)
treef3d12d970150ec8cfd69697a74c8d5016917432e /src/tb/tb_sha512_core.v
parent285a7830994783cd04307e4274749a84123a26b5 (diff)
Non functional cleanups: (1) Changed name of round counter to show what is used for. (2) Fixed timescale and empty parentheses of tasks in testbenches. (3) Fixed targets in Makefile to build if needed.
Diffstat (limited to 'src/tb/tb_sha512_core.v')
-rw-r--r--src/tb/tb_sha512_core.v21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/tb/tb_sha512_core.v b/src/tb/tb_sha512_core.v
index b8523a0..8aeaa33 100644
--- a/src/tb/tb_sha512_core.v
+++ b/src/tb/tb_sha512_core.v
@@ -37,11 +37,6 @@
//
//======================================================================
-//------------------------------------------------------------------
-// Simulator directives.
-//------------------------------------------------------------------
-`timescale 1ns/10ps
-
//------------------------------------------------------------------
// Test module.
@@ -134,7 +129,7 @@ module tb_sha512_core();
//
// Dump the state of the dut.
//----------------------------------------------------------------
- task dump_dut_state();
+ task dump_dut_state;
begin
$display("State of DUT");
$display("------------");
@@ -160,8 +155,8 @@ module tb_sha512_core();
dut.state_init, dut.state_update);
$display("first_block = 0x%01x, ready_flag = 0x%01x, w_init = 0x%01x",
dut.first_block, dut.ready_flag, dut.w_init);
- $display("t_ctr_inc = 0x%01x, t_ctr_rst = 0x%01x, t_ctr_reg = 0x%02x",
- dut.t_ctr_inc, dut.t_ctr_rst, dut.t_ctr_reg);
+ $display("round_ctr_inc = 0x%01x, round_ctr_rst = 0x%01x, round_ctr_reg = 0x%02x",
+ dut.round_ctr_inc, dut.round_ctr_rst, dut.round_ctr_reg);
$display("");
$display("State registers:");
@@ -189,7 +184,7 @@ module tb_sha512_core();
//
// Dump the state of the dut wmem.
//----------------------------------------------------------------
- task dump_dut_wmem();
+ task dump_dut_wmem;
begin
$display("State of DUT WMEM");
$display("-----------------");
@@ -215,7 +210,7 @@ module tb_sha512_core();
//
// Toggle reset to put the DUT into a well known state.
//----------------------------------------------------------------
- task reset_dut();
+ task reset_dut;
begin
$display("*** Toggle reset.");
tb_reset_n = 0;
@@ -231,7 +226,7 @@ module tb_sha512_core();
// Initialize all counters and testbed functionality as well
// as setting the DUT inputs to defined values.
//----------------------------------------------------------------
- task init_sim();
+ task init_sim;
begin
cycle_ctr = 0;
error_ctr = 0;
@@ -254,7 +249,7 @@ module tb_sha512_core();
//
// Display the accumulated test results.
//----------------------------------------------------------------
- task display_test_result();
+ task display_test_result;
begin
if (error_ctr == 0)
begin
@@ -277,7 +272,7 @@ module tb_sha512_core();
// when the dut is actively processing and will in fact at some
// point set the flag.
//----------------------------------------------------------------
- task wait_ready();
+ task wait_ready;
begin
while (!tb_ready)
begin