diff --git a/hw/application_fpga/core/tk1/tb/tb_tk1.v b/hw/application_fpga/core/tk1/tb/tb_tk1.v index d4026e5..a8d0fc0 100644 --- a/hw/application_fpga/core/tk1/tb/tb_tk1.v +++ b/hw/application_fpga/core/tk1/tb/tb_tk1.v @@ -296,6 +296,25 @@ module tb_tk1 (); endtask // init_sim + //---------------------------------------------------------------- + // restore_mem_bus() + // + // Restore memory bus to its initial state + //---------------------------------------------------------------- + task restore_mem_bus(); + begin : restore_mem_bus + tb_cpu_addr = 32'h0; + tb_cpu_instr = 1'h0; + tb_cpu_valid = 1'h0; + + tb_cs = 1'h0; + tb_we = 1'h0; + tb_address = 8'h0; + tb_write_data = 32'h0; + end + endtask + + //---------------------------------------------------------------- // write_word() // @@ -674,6 +693,9 @@ module tb_tk1 (); tb_monitor = 0; tb_spi_monitor = 0; + restore_mem_bus(); + reset_dut(); + $display(""); $display("--- test10: Loopback in SPI Master started.");