Skip to content

Commit

Permalink
set remote timeout in GDB to access ICache registers
Browse files Browse the repository at this point in the history
  • Loading branch information
wsipak committed Oct 23, 2024
1 parent e26304d commit e92e9fd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
45 changes: 22 additions & 23 deletions .github/scripts/openocd/veer-el2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,38 @@ $_TARGETNAME.0 configure -event halted {
reg csr_dicad0h
reg csr_dicad1

# TODO this section is commented because it causes a segfault in OpenOCD
# echo "Starting ICache line write"
echo "Starting ICache line write"
# 1. Write dicawics: array=0 way=0 index=8
# reg csr_dicawics 64
reg csr_dicawics 64
# 2. Write instruction data to dicad0 and dicad0h, and parity to dicad1
# [31:16] have two ones and [15:0] have two ones in order to make parity 0
# reg csr_dicad0 0x30c00
# reg csr_dicad0h 0xc00c0
# [31:16] have two ones and [15:0] have two ones in order to make parity 0
reg csr_dicad0 0x30c00
reg csr_dicad0h 0xc00c0
# parity is 0.
# TODO do we need to set anything ECC-related?
# reg csr_dicad1 0x0
# TODO do we need to set anything ECC-related?
reg csr_dicad1 0x0
# 3. Write 1 to dicago to trigger Icache write operation
# reg csr_dicago 1
reg csr_dicago 1

# TODO this section is commented because it causes a segfault in OpenOCD
# echo "Starting ICache tag and status read"
echo "Starting ICache tag and status read"
# 1. Write dicawics: array=1 way=0 index=8
# reg csr_dicawics 0x1000040
reg csr_dicawics 0x1000040
# 2. Read to dicago to trigger Icache read operation
# reg csr_dicago
reg csr_dicago
# 3. get tag from dicad0, and parity from dicad1
# reg csr_dicad0
# reg csr_dicad1

# TODO this section is commented because it causes a segfault in OpenOCD
# echo "Starting ICache tag and status write"
reg csr_dicad0
reg csr_dicad1

echo "Starting ICache tag and status write"
# 1. Write dicawics: array=1 way=0 index=8
# reg csr_dicawics 0x1000040
# 2. Write tag, valid, LRU information to dicad0, and parity to dicad1
# reg csr_dicad0 0x0
# reg csr_dicad1 0x0
reg csr_dicawics 0x1000040
# 2. Write tag, valid, LRU information to dicad0, and parity to dicad1
reg csr_dicad0 0x0
reg csr_dicad1 0x0
# 3. Write 1 to dicago to trigger Icache write operation
# reg csr_dicago 1
reg csr_dicago 1

echo "ICache test done."
}

# Mem access mode
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/test.gdb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
echo Connecting to OpenOCD...\n
set architecture riscv:rv32
set remotetimeout 30
set remotetimeout 99999
target extended-remote :3333

echo Connected, waiting...\n
Expand Down

0 comments on commit e92e9fd

Please sign in to comment.