diff --git a/testbench/openocd_scripts/jtag_cg.tcl b/testbench/openocd_scripts/jtag_cg.tcl index 1c8dbce3b96..51291eecd4d 100644 --- a/testbench/openocd_scripts/jtag_cg.tcl +++ b/testbench/openocd_scripts/jtag_cg.tcl @@ -29,10 +29,12 @@ puts "" riscv set_mem_access sysbus -set addr1 0x00020008 -set addr2 0x00020508 +set addr1 0xFFFF0000 +set addr2 0x0000FFF0 +set addr3 0x0000FFFF set data1 0x05050505 -set data2 0x12345678 +set data2 0xFAFAFAFA +set data3 0xAB puts "Write few bytes" write_memory $addr1 32 $data1 phys @@ -61,6 +63,15 @@ if {[compare $actual $data1] != 0} { shutdown error } +puts "Write 1 byte" +write_memory $addr3 8 $data3 phys + +puts "Read 1 byte" +set actual [read_memory $addr3 8 1 phys] +if {[compare $actual $data3] != 0} { + shutdown error +} + # Send signal to call $finish write_memory 0xd0580000 8 0xFF phys