From 2098f48acca4a77154ea30194698f96b329d031a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 23 Aug 2016 16:33:29 +0200 Subject: Writing test data into the core regs. --- src/tb/tb_sha3.v | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tb/tb_sha3.v b/src/tb/tb_sha3.v index 95fe048..06f6546 100644 --- a/src/tb/tb_sha3.v +++ b/src/tb/tb_sha3.v @@ -111,7 +111,6 @@ module tb_sha3(); begin $display("State of the DUT"); $display("----------------"); - $display(""); $display("st[00] = 0x%016x, st[01] = 0x%016x", dut.st[00], dut.st[01]); $display("st[02] = 0x%016x, st[03] = 0x%016x", dut.st[02], dut.st[03]); $display("st[04] = 0x%016x, st[05] = 0x%016x", dut.st[04], dut.st[05]); @@ -217,8 +216,23 @@ module tb_sha3(); // zero data input. //---------------------------------------------------------------- task simple_test; - begin + reg [7 : 0] i; + + begin : stest; + + dump_state(); + + for (i = 0 ; i < 64 ; i = i + 1) + begin + tb_write_data = {i, i, i, i}; + tb_address = i[6 : 0]; + tb_we = 1; + #(CLK_PERIOD); + tb_we = 0; + end + dump_state(); + end endtask // simple_test -- cgit v1.2.3