From f7c9cd18767f30259a285c3fd20a0905bea2b2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Thu, 17 Jan 2019 13:02:13 +0100 Subject: Added non-zero default timeout value in core. This fixes the keywrap problems by not automatically reset the key in the API. Enabled all testcases and disabled excessive debug outputs. --- src/tb/tb_keywrap.v | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/tb') diff --git a/src/tb/tb_keywrap.v b/src/tb/tb_keywrap.v index c900b2a..b232ab3 100644 --- a/src/tb/tb_keywrap.v +++ b/src/tb/tb_keywrap.v @@ -39,7 +39,7 @@ module tb_keywrap(); - parameter DEBUG = 1; + parameter DEBUG = 0; parameter DUMP_TOP = 1; parameter DUMP_CORE = 1; parameter DUMP_TIMEOUT = 1; @@ -299,17 +299,17 @@ module tb_keywrap(); $display("keywrap_core_ctrl_reg = 0x%0x", dut.core.keywrap_core_ctrl_reg); $display("keywrap_core_ctrl_new = 0x%0x", dut.core.keywrap_core_ctrl_new); $display("keywrap_core_ctrl_we = 0x%0x", dut.core.keywrap_core_ctrl_we); + $display(""); end if (DUMP_TIMEOUT) begin - $display("timeout signals:"); - + $display("timeout state:"); $display("api_timeout_reg = 0x%04x api_timeout_we = 0x%x", dut.timeout_reg, dut.timeout_we); - $display("timeout = 0x%04x ping = 0x%x zeroise = 0x%x loaded = 0x%x", - dut.core.timeout, dut.core.ping, dut.core.zeroise, dut.core.loaded); - $display("key_timeout_ctr_reg = 0x%04x key_timeout_ctr_new = 0x%04x", - dut.core.key_timeout_ctr_reg, dut.core.key_timeout_ctr_new); + $display("timeout_delay = 0x%04x timeout = 0x%x ping = 0x%x zeroise = 0x%x loaded = 0x%x", + dut.core.timeout_delay, dut.core.timeout, dut.core.ping, dut.core.zeroise, dut.core.loaded); + $display("key_timeout_ctr_reg = 0x%04x key_timeout_ctr_new = 0x%04x key_timeout_ctr_we = 0x%x", + dut.core.key_timeout_ctr_reg, dut.core.key_timeout_ctr_new, dut.core.key_timeout_ctr_we); $display("key_timeout = 0x%x key_timeout_ctr_we = 0x%x key_timeout_ctr_set = 0x%x key_timeout_ctr_dec = 0x%x", dut.core.key_timeout, dut.core.key_timeout_ctr_we, dut.core.key_timeout_ctr_set, dut.core.key_timeout_ctr_dec); @@ -1531,15 +1531,15 @@ module tb_keywrap(); test_core_access(); test_kwp_ae_128_1(); -// test_kwp_ad_128_1(); -// test_kwp_ae_128_2(); -// test_kwp_ad_128_2(); -// test_big_wrap_256(); + test_kwp_ad_128_1(); + test_kwp_ae_128_2(); + test_kwp_ad_128_2(); + test_big_wrap_256(); reset_dut(); -// test_zeroise1(); -// test_zeroise2(); -// test_zeroise3(); + test_zeroise1(); + test_zeroise2(); + test_zeroise3(); display_test_results(); -- cgit v1.2.3