Skip to content

Commit

Permalink
Change read/write commands to test each bit of addr and data
Browse files Browse the repository at this point in the history
Internal-tag: [#60812]
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Jul 19, 2024
1 parent 78304ce commit 514dc39
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions testbench/openocd_scripts/jtag_cg.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 514dc39

Please sign in to comment.