PoC: tb: Fix tb_tk1 test3 (CDI)

Fix test1. It broke while implementing interrupt based syscalls.

Instead of writing to ADDR_SYSTEM_MODE_CTRL, app mode is now entered
automatically when executing outside of ROM.
This commit is contained in:
Mikael Ågren 2024-12-18 09:02:39 +01:00
parent e9f72a8530
commit fe16cc9f72
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46

View File

@ -62,6 +62,7 @@ module tb_tk1 ();
localparam ADDR_SPI_XFER = 8'h81;
localparam ADDR_SPI_DATA = 8'h82;
localparam APP_RAM_START = 32'h40000000;
//----------------------------------------------------------------
// Register and Wire declarations.
@ -468,7 +469,7 @@ module tb_tk1 ();
read_check_word(ADDR_CDI_LAST + 0, 32'h70717273);
$display("--- test3: Switch to app mode.");
write_word(ADDR_SYSTEM_MODE_CTRL, 32'hdeadbeef);
fetch_instruction(APP_RAM_START);
$display("--- test3: Try to write CDI again.");
write_word(ADDR_CDI_FIRST + 0, 32'hfffefdfc);