PoC: fpga/tb: Allow access to syscall irq trigger area

This commit is contained in:
Mikael Ågren 2025-02-12 17:14:30 +01:00
parent 1968b3614c
commit b02c2d67d6
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46
2 changed files with 18 additions and 1 deletions

View File

@ -456,7 +456,14 @@ module tk1 #(
end end
// In unused space // In unused space
if ((cpu_addr[29 : 24] > 6'h10) && (cpu_addr[29 : 24] < 6'h3f)) begin if ((cpu_addr[29 : 24] > 6'h10) && (cpu_addr[29 : 24] < 6'h21)) begin
force_trap_set = 1'h1;
end
// Entire IRQ31 trigger area is accessible
// In unused space
if ((cpu_addr[29 : 24] > 6'h21) && (cpu_addr[29 : 24] < 6'h3f)) begin
force_trap_set = 1'h1; force_trap_set = 1'h1;
end end

View File

@ -1046,6 +1046,16 @@ module tb_tk1 ();
// Unused trap range: 0xd1000000-0xfeffffff // Unused trap range: 0xd1000000-0xfeffffff
$display("--- test11: Unused"); $display("--- test11: Unused");
cpu_read_check_range_should_trap(32'hd1000000, 32'hd100000f); cpu_read_check_range_should_trap(32'hd1000000, 32'hd100000f);
cpu_read_check_range_should_trap(32'he0fffff0, 32'he0ffffff);
// IRQ31 No trap range. Entire 0xe1 range is accessible.
cpu_read_check_range_should_not_trap(32'he1000000, 32'he100000f);
cpu_read_check_range_should_not_trap(32'he1fffff0, 32'he1ffffff);
// Unused trap range: 0xe2000000-0xfeffffff
//
$display("--- test11: Unused");
cpu_read_check_range_should_trap(32'he2000000, 32'he200000f);
cpu_read_check_range_should_trap(32'hfefffff0, 32'hfeffffff); cpu_read_check_range_should_trap(32'hfefffff0, 32'hfeffffff);
// TK1 trap range: 0xff000400-0xffffffff // TK1 trap range: 0xff000400-0xffffffff