From f20979faa37d4f272fcce51af18b829027778614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Fri, 14 Sep 2018 16:07:25 +0200 Subject: Adding instatiation of the mkmif in the keywrap top level wrapper. Updated testbench anf Makefile to build with instantiated mkmif. The mkmif is not yet used by the keywrap. --- src/tb/tb_keywrap.v | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/tb') diff --git a/src/tb/tb_keywrap.v b/src/tb/tb_keywrap.v index 4d1c25c..1f1dabf 100644 --- a/src/tb/tb_keywrap.v +++ b/src/tb/tb_keywrap.v @@ -97,6 +97,10 @@ module tb_keywrap(); reg tb_clk; reg tb_reset_n; + wire tb_mkm_spi_sclk; + wire tb_mkm_spi_cs_n; + reg tb_mkm_spi_do; + wire tb_mkm_spi_di; reg tb_cs; reg tb_we; reg [(ADDR_BITS -1 ) : 0] tb_address; @@ -111,6 +115,10 @@ module tb_keywrap(); keywrap dut( .clk(tb_clk), .reset_n(tb_reset_n), + .mkm_spi_sclk(tb_mkm_spi_sclk), + .mkm_spi_cs_n(tb_mkm_spi_cs_n), + .mkm_spi_do(tb_mkm_spi_do), + .mkm_spi_di(tb_mkm_spi_di), .cs(tb_cs), .we(tb_we), .address(tb_address), @@ -330,15 +338,17 @@ module tb_keywrap(); //---------------------------------------------------------------- task init_sim; begin - cycle_ctr = 0; - error_ctr = 0; - tc_ctr = 0; + cycle_ctr = 1'h0; + error_ctr = 1'h0; + tc_ctr = 1'h0; - tb_clk = 0; - tb_reset_n = 1; + tb_clk = 1'h0; + tb_reset_n = 1'h1; - tb_cs = 0; - tb_we = 0; + tb_mkm_spi_do = 1'h1; + + tb_cs = 1'h0; + tb_we = 1'h0; tb_address = 8'h0; tb_write_data = 32'h0; end -- cgit v1.2.3