mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-03-12 18:16:55 -04:00
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:
parent
d07abc7ad2
commit
4a27940bf1
@ -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.");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user