PoC: tb: Fix tb_tk1 test10 (SPI loop back test)

Fix test10. It broke while implementing interrupt based syscalls.

Cleaning up after the previous test. We reset the memory bus to a known
idle state. We also reset the DUT to make the SPI master visible.
This commit is contained in:
Mikael Ågren 2025-01-29 14:55:26 +01:00
parent d07abc7ad2
commit 4a27940bf1
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46

View File

@ -296,6 +296,25 @@ module tb_tk1 ();
endtask // init_sim 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() // write_word()
// //
@ -674,6 +693,9 @@ module tb_tk1 ();
tb_monitor = 0; tb_monitor = 0;
tb_spi_monitor = 0; tb_spi_monitor = 0;
restore_mem_bus();
reset_dut();
$display(""); $display("");
$display("--- test10: Loopback in SPI Master started."); $display("--- test10: Loopback in SPI Master started.");