aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@secworks.se>2018-11-23 08:17:37 +0100
committerJoachim StroĢˆmbergson <joachim@secworks.se>2018-11-23 08:17:37 +0100
commit4e4a87a035e98cc8fbcc6d33b9c6009919213a64 (patch)
treea8cb542b0b4680a10fce63dee8d1a50cbdd83f01
parent42e3fcaaec5fe0ae0788d3e1c02da1751cbc9c5b (diff)
Enabled spi observation and can see that SPI interface is alive when pulling init.
-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();