aboutsummaryrefslogtreecommitdiff
path: root/src/tb
diff options
context:
space:
mode:
Diffstat (limited to 'src/tb')
-rw-r--r--src/tb/tb_keywrap_mkmif.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tb/tb_keywrap_mkmif.v b/src/tb/tb_keywrap_mkmif.v
index 1acce3d..ccb8ff3 100644
--- a/src/tb/tb_keywrap_mkmif.v
+++ b/src/tb/tb_keywrap_mkmif.v
@@ -195,10 +195,14 @@ module tb_keywrap_mkmif();
task reset_dut;
begin
$display("Asserting reset.");
+ $display();
+
tb_reset_n = 0;
#(2 * CLK_PERIOD);
tb_reset_n = 1;
+
$display("Deasserting reset.");
+ $display();
end
endtask // reset_dut
@@ -210,10 +214,13 @@ module tb_keywrap_mkmif();
//----------------------------------------------------------------
task wait_ready;
begin
+ #(2 * CLK_PERIOD);
+
while (!tb_ready)
#(CLK_PERIOD);
$display("Ready has been set.");
+ $display();
end
endtask // wait_ready
@@ -229,10 +236,12 @@ module tb_keywrap_mkmif();
$display("Check that the memory is configured when pulling init.");
$display();
+ show_spi = 1;
tb_init = 1'h1;
#(CLK_PERIOD);
tb_init = 1'h0;
wait_ready();
+ show_spi = 0;
$display("TEST INIT-MEM END");
$display("");
@@ -281,6 +290,7 @@ module tb_keywrap_mkmif();
$display("");
init_sim();
+ reset_dut();
test_init_mem();
test_write_status();